HDU 6000 - Wash】的更多相关文章

/* HDU 6000 - Wash [ 贪心 ] 题意: L 件衣服,N 个洗衣机,M 个烘干机,给出每个洗衣机洗一件衣服的时间和烘干机烘干一件衣服的时间,问需要的最少时间是多少 分析: 先求出L件衣服最优洗衣时间的数组,再求出最优烘干时间的数组 然后排序按最小值+最大值的思路贪心,取最大值 可以看成排序后两数组咬合 */ #include <bits/stdc++.h> using namespace std; #define LL long long const int N = 1e5+…
题意:已知有L件衣服,M个洗衣机,N个烘干机,已知每个机器的工作时间,且每个机器只能同时处理一件衣服,问洗烘完所有衣服所需的最短时间. 分析: 1.优先队列处理出每件衣服最早的洗完时间. 2.优先队列处理出每件衣服最早的烘完时间. 3.用最大的洗完时间与最小的烘完时间相加,取最大值. #include<cstdio> #include<cstring> #include<cstdlib> #include<cctype> #include<cmath&…
Problem Description Mr.Panda is about to engage in his favourite activity doing laundry! He's brought L indistinguishable loads of laundry to his local laundromat, which has N washing machines and M dryers.The ith washing machine takes Wi minutes to…
[链接] 我是链接,点我呀:) [题意] 在这里输入题意 [题解] 因为每件衣服都是没有区别的. 只有洗衣机不同会影响洗衣时间. 那么我们把每台洗衣机洗衣的时间一开始都加入到队列中. 比如{2,3,6,7} 这个队列里面的数字就代表了如果某件衣服用这台洗衣机洗的话,要在什么时刻洗好. 对于每一件衣服i. 取出队列的头. 这里为2 那么就a[i] = 2,表示第i件衣服最早在a[i] = 2时刻洗好 然后再把2+t[i]加入到队列中即{3,2+t[i],6,7} (这里t[i]即等于2) 每次都取…
A. HDU 5999 The Third Cup is Free 简单模拟. B. HDU 6000 Wash n 件衣服, m 个洗衣机,k 个烘干机.每个洗衣机和烘干机需要不同的时间.问 n 件衣服洗完 + 烘干最小时间. 看做两部:洗 + 烘干,用洗需要时间长的去配烘干需要时间短的,所有衣服取max. 优先队列维护,取最小的,加上时长再放进去. #include <cstdio> #include <cstring> #include <algorithm> #…
地址:http://acm.split.hdu.edu.cn/showproblem.php?pid=6000 题目: Wash Time Limit: 20000/10000 MS (Java/Others)    Memory Limit: 64000/64000 K (Java/Others)Total Submission(s): 1250    Accepted Submission(s): 331 Problem Description Mr.Panda is about to en…
G - FatMouse's Speed Time Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64u Submit Status Practice HDU 1160 Appoint description: Description FatMouse believes that the fatter a mouse is, the faster it runs. To disprove this, you…
Computer Virus on Planet Pandora Time Limit: 6000/2000 MS (Java/Others)    Memory Limit: 256000/128000 K (Java/Others)Total Submission(s): 2578    Accepted Submission(s): 713 Problem Description     Aliens on planet Pandora also write computer progra…
Computer Virus on Planet Pandora Time Limit: 6000/2000 MS (Java/Others)    Memory Limit: 256000/128000 K (Java/Others) Total Submission(s): 4090    Accepted Submission(s): 1072 Problem Description     Aliens on planet Pandora also write computer prog…
FatMouse's Speed Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 14980    Accepted Submission(s): 6618 Special Judge Problem Description FatMouse believes that the fatter a mouse is, the faster…