二分&&三分
文章平均质量分 77
qian言wan语
苟有恒,何必三更睡五更起。
展开
-
hdu 3763 CD(二分)
CD Time Limit: 12000/6000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 630 Accepted Submission(s): 282 Problem Description Jack and Jill have decided t原创 2015-01-09 18:14:17 · 510 阅读 · 0 评论 -
poj 1064 Cable master(二分)
Cable master Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 25331 Accepted: 5440 Description Inhabitants of the Wonderland have decided to hold a regional原创 2015-01-17 11:09:01 · 394 阅读 · 0 评论 -
总结一下二分搜索
二分搜法,是通过不断缩小解可能存在的范围,从而求得问题最优解的方法。 举个例子: 从有序数组中查找某个值: lower_bound 给定长度是n的单调不下降序列,a[0],a[1],a[2],...........a[n-1],和一个数k,求满足a[i]>=k条件的最小的i。不存在的情况下输出n. 限制条件: 1<=n<=10^6 0<=k<=10^9 0<=a[原创 2015-01-18 13:03:46 · 716 阅读 · 1 评论 -
poj 2456 Aggressive cows(贪心+二分)
Aggressive cows Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 6620 Accepted: 3327 Description Farmer John has built a new long barn, with N (2 His C原创 2015-01-13 00:39:59 · 618 阅读 · 0 评论 -
nyoj 914 Yougth的最大化(贪心+二分搜索)
Yougth的最大化 时间限制:1000 ms | 内存限制:65535 KB 难度:4 描述 Yougth现在有n个物品的重量和价值分别是Wi和Vi,你能帮他从中选出k个物品使得单位重量的价值最大吗? 输入 有多组测试数据 每组测试数据第一行有两个数n和k,接下来一行有n个数Wi和Vi。 (1 输出 输出使得单位价值的最大值。(保留两位原创 2015-01-12 22:34:14 · 1049 阅读 · 0 评论 -
hdu 2199 Can you solve this equation?
Can you solve this equation? Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 9523 Accepted Submission(s): 4403 Problem Description N原创 2015-01-10 09:44:06 · 396 阅读 · 0 评论 -
hdu 2141 Can you find it?(二分法)
Can you find it? Time Limit: 10000/3000 MS (Java/Others) Memory Limit: 32768/10000 K (Java/Others) Total Submission(s): 12626 Accepted Submission(s): 3262 Problem Description Give you th原创 2015-01-10 11:45:10 · 428 阅读 · 0 评论 -
hdu 2289 Cup(二分)
Cup Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 4554 Accepted Submission(s): 1426 Problem Description The WHU ACM Team has a big原创 2015-01-11 16:17:26 · 477 阅读 · 0 评论 -
hdu 2578 Dating with girls(1) (二分)
Dating with girls(1) Time Limit: 6000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 3457 Accepted Submission(s): 1064 Problem Description Everyone原创 2015-01-09 23:00:24 · 575 阅读 · 0 评论 -
hdu2178猜数字(二分法!!)
猜数字 Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 3813 Accepted Submission(s): 2721 Problem Description A有1数m,B来猜.B每猜一次,A就说"太大","太原创 2015-03-29 23:13:41 · 1574 阅读 · 0 评论