二分搜索
SSimpLe_Y
人一我百,人十我万,然而我做不到。
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
二分-0011
/*poj3273 Monthly Expense。给出一堆数值,然后要求把他们分成m块,求这m块中的最大值最小可以是多少二分一下价值,然后判断能否分成m块*/#include#include#include#includeusing namespace std;int a[100100];int l,r,n,m;bool judge(int x)原创 2016-05-22 09:44:41 · 350 阅读 · 0 评论 -
二分-浮点
/*论EPS的重要性。。。。。浮点类型二分的写法。。。。。-------------------------POJ3122-----------------------给出一堆PIZA 然后求每个人都能等体积的最大体积是多少要求每个人的PIZA都来自同一块PIZA二分一下体积 这题就卡一个二分浮点数的时候要注意EPS还有求一个块PIZA能分成多少块的时候要补充E原创 2016-05-22 09:45:30 · 578 阅读 · 0 评论 -
二分-1100
/* poj3258 River Hopscotch牛要到河对岸,在与河岸垂直的一条线上,河中有N块石头,给定河岸宽度L,以及每一块石头离牛所在河岸的距离,现在去掉M块石头,要求去掉M块石头后,剩下的石头之间以及石头与河岸的最小距离的最大值。二分一下距离然后判断的时候先跟岸边比较,注意是终点那个岸边。。。。起点不用比较。。。。。石头之间比较的时候是间隔不符合的时候拿原创 2016-05-22 09:41:34 · 373 阅读 · 0 评论 -
Codeforces Round #377 D. Exams (二分)
Vasiliy has an exam period which will continue for n days. He has to pass exams on m subjects. Subjects are numbered from 1 to m.About every day we know exam for which one of m subjects can be p原创 2016-11-02 21:14:31 · 746 阅读 · 0 评论 -
Codeforces Round #408 (Div. 2) C. Bank Hacking(二分)
Although Inzane successfully found his beloved bone, Zane, his owner, has yet to return. To search for Zane, he would need a lot of money, of which he sadly has none. To deal with the problem, he has原创 2017-04-11 12:14:04 · 1479 阅读 · 0 评论 -
Codeforces Round #433 D. Jury Meeting
Country of Metropolia is holding Olympiad of Metrpolises soon. It mean that all jury members of the olympiad should meet together in Metropolis (the capital of the country) for the problem preparation原创 2017-09-07 00:15:51 · 912 阅读 · 0 评论 -
Codeforces Round #433 C. Planning(贪心)
Helen works in Metropolis airport. She is responsible for creating a departure schedule. There are n flights that must depart today, the i-th of them is planned to depart at the i-th minute of the原创 2017-09-07 08:01:11 · 1853 阅读 · 0 评论
分享