《动态规划》— POJ 3211 Washing Clothes(???)

亲爱的男孩面临着一堆要洗的衣服,每件衣服都有一种颜色。他们知道每件衣服的洗涤时间,并且可以同时洗涤两件。目标是最短时间内完成所有衣服的洗涤。输入包含颜色数量、衣物数量、颜色名称和每件衣服的洗涤时间和颜色。输出是最短的洗涤时间。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Washing Clothes

Time Limit: 1000MS   Memory Limit: 131072K
Total Submissions: 10025   Accepted: 3225

Description

Dearboy was so busy recently that now he has piles of clothes to wash. Luckily, he has a beautiful and hard-working girlfriend to help him. The clothes are in varieties of colors but each piece of them can be seen as of only one color. In order to prevent the clothes from getting dyed in mixed colors, Dearboy and his girlfriend have to finish washing all clothes of one color before going on to those of another color.

From experience Dearboy knows how long each piece of clothes takes one person to wash. Each piece will be washed by either Dearboy or his girlfriend but not both of them. The couple can wash two pieces simultaneously. What is the shortest possible time they

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值