
二分
二分算法
lwgkzl
海风和着歌声,星空伴着代码
展开
-
Aggressive cows POJ 2456 (二分,最大化最小值)
Aggressive cows Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 14977 Accepted: 7219 Description Farmer John has built a new long barn, with N (2 His原创 2017-07-25 01:16:53 · 506 阅读 · 0 评论 -
can you find it?
Description Give you three sequences of numbers A, B, C, then we give you a number X. Now you need to calculate if you can find the three numbers Ai, Bj, Ck, which satisfy the formula Ai+Bj+Ck = X.原创 2016-07-22 23:15:31 · 488 阅读 · 0 评论 -
Can you solve this equation
Description 现在,给出等式8* X^4+ 7* X^3+ 2* X^2+ 3 * X +6= Y,请找出他在0和100之间的解(包含0和100)。 现在,请你试试运气。。。。 Input 输入的第一行包含一个整数T(1 10); Output 对于每个测试用例,如果有解,你应该输出一个实数(精确到小数点后4位,四原创 2016-07-22 23:31:30 · 374 阅读 · 0 评论 -
4 Values whose Sum is 0 POJ - 2785 (二分)
4 Values whose Sum is 0 Time Limit: 15000MS Memory Limit: 228000K Total Submissions: 22637 Accepted: 6848 Case Time Limit: 5000MS Description The SUM problem can原创 2017-07-25 23:30:08 · 407 阅读 · 0 评论 -
Monthly Expense POJ - 3273 (二分答案)
Monthly Expense Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 27592 Accepted: 10541 Description Farmer John is an astounding accounting wizard and has原创 2017-07-25 23:38:16 · 378 阅读 · 0 评论 -
Drying POJ - 3104 (二分)
Drying Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 16738 Accepted: 4243 Description It is very hard to wash and especially to dry clothes in winter.原创 2017-07-25 23:43:00 · 296 阅读 · 0 评论 -
River Hopscotch POJ - 3258 (二分)
River Hopscotch Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 14623 Accepted: 6210 Description Every year the cows hold an event featuring a peculiar v原创 2017-07-25 23:47:13 · 450 阅读 · 0 评论 -
K Best POJ 3111 (二分,最大化平均値)
K Best Time Limit: 8000MS Memory Limit: 65536K Total Submissions: 10565 Accepted: 2717 Case Time Limit: 2000MS Special Judge Description Demy has n jewels.原创 2017-07-26 11:22:41 · 280 阅读 · 0 评论 -
leetcode 911. 在线选举(二分)
题目: 有N个人,每个人会在ti时间投per[i]一张票,给一个时间数组tim[i],问在tim[i]的时候票最多的是谁,如果有相同的票数,最近获得票的那个最多者是谁。 思路: 用vector存储投票时间ti,和投票时的票最多的人。 然后在时间数列中,对于每一个tim[i],都在vector中二分查找第一个大于tim[i]时间的那个位置即可。然后这个位置之前的那个位置就是我们需要得到的位置...原创 2018-09-26 12:57:13 · 877 阅读 · 0 评论