
二分
文章平均质量分 76
GKHack
这个作者很懒,什么都没留下…
展开
-
Codeforces Round #321 (Div. 2) 580B Kefa and Company(贪心 + 二分)
题目链接:点击打开链接第一行给出n、d,接下来n行每行两个数,代表一个人的财富程度与友好值,让你从里面选人使得友好值之和最大且任意两人财富值差值小于d。当时wa了好多发,比赛快结束时一个陌生紫名发来他的代码2333 我爆int以及思路有问题首先按照钱数从小到大排序n个结构体,b数组存储排序后前x个人的友好总值(x >= 1 && x 数差小于d的友好值最大的人,用刚刚的b数原创 2015-09-24 09:25:00 · 1037 阅读 · 0 评论 -
POJ1064 Cable master(小数二分)
DescriptionInhabitants of the Wonderland have decided to hold a regional programming contest. The Judging Committee has volunteered and has promised to organize the most honest contest ever. It wa原创 2015-08-02 19:22:12 · 1098 阅读 · 0 评论 -
POJ2456 Aggressive cows(对整数二分)
DescriptionFarmer John has built a new long barn, with N (2 His C (2 <= C <= N) cows don't like this barn layout and become aggressive towards each other once put into a stall. To prevent the原创 2015-08-02 19:25:55 · 658 阅读 · 0 评论 -
Codeforces Round #200 (Div. 2)344E Read Time(二分)
E. Read Timetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputMad scientist Mike does not use slow hard disks原创 2015-08-13 16:58:35 · 1639 阅读 · 0 评论 -
HDOJ1597 find the nth digit(二分)
Problem Description假设:S1 = 1S2 = 12S3 = 123S4 = 1234.........S9 = 123456789S10 = 1234567891S11 = 12345678912............S18 = 123456789123456789..................现在我们把所有的串连原创 2015-08-02 19:31:26 · 899 阅读 · 0 评论 -
CSU1204 Rectangles(二分)
1204: RectanglesTime Limit: 1 Sec Memory Limit: 128 MBSubmit: 770 Solved: 112[Submit][Status][Web Board]Description如果限定矩形的边长必须为整数,且周长为定值L,那么面积在[A, B]范围内不同的矩形一共有多少个呢?在这个问题中,当且仅当两个矩形原创 2015-08-17 10:32:31 · 999 阅读 · 0 评论 -
BestCoder Round #65 HDOJ5592 ZYB's Premutation(树状数组+二分)
ZYB's PremutationTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 638 Accepted Submission(s): 302Problem DescriptionZYB has原创 2015-12-08 16:24:05 · 1272 阅读 · 0 评论