二分思想
文章平均质量分 83
Jonariguez
这个作者很懒,什么都没留下…
展开
-
CodeForces 402A Nuts (二分)
A. Nutstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou have a nuts and lots of boxes. The boxes have a wonderful原创 2015-04-10 19:44:53 · 698 阅读 · 0 评论 -
POJ 3111 K Best (01分数规划+二分)
K BestTime Limit: 8000MS Memory Limit: 65536KTotal Submissions: 6658 Accepted: 1756Case Time Limit: 2000MS Special JudgeDescriptionDemy has n jewels.原创 2015-05-16 11:26:37 · 473 阅读 · 0 评论 -
POJ 3104 Drying (二分)
DryingTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 10098 Accepted: 2589DescriptionIt is very hard to wash and especially to dry clothes in winter. Bu原创 2015-05-16 10:12:05 · 564 阅读 · 0 评论 -
POJ 2976 Dropping tests (01分数规划+二分)
Dropping testsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 7360 Accepted: 2558DescriptionIn a certain course, you take n tests. If you get ai out of原创 2015-05-16 09:27:44 · 783 阅读 · 2 评论 -
POJ 3273 Monthly Expense(二分)
Monthly ExpenseTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 16813 Accepted: 6666DescriptionFarmer John is an astounding accounting wizard and has rea原创 2015-05-16 09:13:15 · 693 阅读 · 0 评论 -
POJ 3258 River Hopscotch (二分)
River HopscotchTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 8423 Accepted: 3620DescriptionEvery year the cows hold an event featuring a peculiar vers原创 2015-05-13 19:54:13 · 375 阅读 · 0 评论 -
POJ 2456 Aggressive cows 二分搜索
题目大意:给出N个点,在数轴上,然后选出C个点,然后在这C个点里面相邻的两个点的距离中的最小距离为min的话,求最大的min。即最小值最大化。思路:二分搜索。首先想说的是二分不光是查找值,还可以搜索,即先确定一个解,再判断是否可行,然后根据判断是否成立来缩小搜索区间,最后确定一个正确解。我们平时用的二分查找就是下面这样的:while(l<r){ m=(l+r)/2; if(C(m)) l=m+1; else r=m;}我们只要把l和r改一下,保证正确解在[l,r]中,我们就能用原创 2015-02-01 17:38:14 · 582 阅读 · 0 评论 -
POJ 1552 Doubles
DoublesTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 19859 Accepted: 11492DescriptionAs part of an arithmetic competency program, your students will b原创 2015-04-14 22:16:52 · 449 阅读 · 0 评论 -
CodeForces 371C Hamburgers (二分)
A -HamburgersTime Limit:1000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64uDescriptionPolycarpus loves hamburgers very much. He especially adores the hamburgers he makes w原创 2015-03-20 21:15:04 · 657 阅读 · 0 评论 -
POJ 3663 Costume Party (二分查找)
Costume PartyTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 12297 Accepted: 4891DescriptionIt's Halloween! Farmer John is taking the cows to a costume原创 2015-04-10 19:19:01 · 615 阅读 · 0 评论 -
Codeforces Round #247(Div. 2) D. Random Task 二分+前缀和
D. Random Tasktime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputOne day, after a difficult lecture a diligent原创 2016-04-05 17:00:35 · 506 阅读 · 0 评论