POJ 3104】的更多相关文章

题目链接:http://poj.org/problem?id=3104                                                                                                      Drying Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 11128   Accepted: 2865 Description It is very…
http://poj.org/problem?id=3104 题目大意: 有n件衣服,每件有ai的水,自然风干每分钟少1,而烘干每分钟少k.求所有弄干的最短时间. 思路: 注意烘干时候没有自然风干. 能够理解为烘干时每分钟掉(k-1)的水. 这样每件衣服每分钟就都掉1水了. 二分枚举最小值就可以. #include<cstdio> #include<algorithm> using namespace std; const int MAXN=100000+10; int a[MAX…
[题目链接] http://poj.org/problem?id=3104 [题目大意] 给出n件需要干燥的衣服,烘干机能够每秒干燥k水分, 不在烘干的衣服本身每秒能干燥1水分 求出最少需要干燥的时间. [题解] 考虑将烘干机的烘干效应变为k-1,那么就是每件衣服在每秒都会自动减少一水分 如果我们知道最少需要的时间,那么每件衣服自己减少的水分数量就知道了, 在除去自然减少的水分之后,看看还需要多少k-1的水分减少才能烘干全部的衣服就可以了, 因此我们二分这个答案,验证是否可行即可. [代码] #…
题目链接:http://poj.org/problem?id=3104 Drying Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 9440   Accepted: 2407 Description It is very hard to wash and especially to dry clothes in winter. But Jane is a very smart girl. She is not afrai…
传送门 表示又是神题一道 Drying Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 9327   Accepted: 2364 Description It is very hard to wash and especially to dry clothes in winter. But Jane is a very smart girl. She is not afraid of this boring proces…
烘干衣服 题目大意:主人公有一个烘干机,但是一次只能烘干一件衣服,每分钟失水k个单位的水量,自然烘干每分钟失水1个单位的水量(在烘干机不算自然烘干的那一个单位的水量),问你最少需要多长时间烘干衣服? 简单来说题目就是要:时间允许的情况下让时间最小,时间可以无限大,这题就是“最小化最大值”,二分法 #include <iostream> #include <functional> #include <algorithm> using namespace std; ]; v…
Drying Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 7959   Accepted: 2014 Description It is very hard to wash and especially to dry clothes in winter. But Jane is a very smart girl. She is not afraid of this boring process. Jane has d…
Description It is very hard to wash and especially to dry clothes in winter. But Jane is a very smart girl. She is not afraid of this boring process. Jane has decided to use a radiator to make drying faster. But the radiator is small, so it can hold…
Drying Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 12568   Accepted: 3243 Description It is very hard to wash and especially to dry clothes in winter. But Jane is a very smart girl. She is not afraid of this boring process. Jane has…
It is very hard to wash and especially to dry clothes in winter. But Jane is a very smart girl. She is not afraid of this boring process. Jane has decided to use a radiator to make drying faster. But the radiator is small, so it can hold only one thi…