![](https://img-blog.csdnimg.cn/20190828130707919.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
暴力/尺取/二分/三分
文章平均质量分 77
KetchupZ
退役acmer一名,CCPC银+ICPC铜(欢迎大家访问我的Github地址:https://github.com/LieLieLiekey)
展开
-
2019CCPC哈尔滨Artful Paintings(二分+差分约束)
2019CCPC哈尔滨Artful Paintings(二分+差分约束)题目链接:传送门思路:这题现场赛的时候TLE了,赛后才发现spfa可以剪枝,而且还缺少一约束。我们假设答案是k,那么k+1也可行,所以可行性具有单调性。设函数S( i )为前 i 个cube画的个数。那么有约束1≥S(i)−S(i−1)≥01\ge S(i)-S(i-1)\ge01≥S(i)−S(i−1)≥0...原创 2019-11-16 09:02:15 · 303 阅读 · 0 评论 -
[2012年NOIP全国联赛提高组] 1022 借教室
[2012年NOIP全国联赛提高组] 1022: 借教室题目描述在大学期间,经常需要租借教室。大到院系举办活动,小到学习小组自习讨论,都需要向学校申请借教室。教室的大小功能不同,借教室人的身份不同,借教室的手续也不一样。面对海量租借教室的信息,我们自然希望编程解决这个问题。我们需要处理接下来n天的借教室信息,其中第i天学校有ri个教室可供租借。共有m份订单,每份订单用三个正整数描述,分别...原创 2019-05-01 13:20:43 · 152 阅读 · 0 评论 -
1156C - Match Points(二分 贪心)
1156C - Match Points(二分 贪心)题意: 给出一个整数n和一个整数z。代表下面有n个数,如果 abs(a[i]−a[j])>=zabs(a[i]-a[j])>=zabs(a[i]−a[j])>=z 则i j 两数可匹配。 求数组中最大的匹配数思路: 我们考虑匹配数为kkk的时候是否可以满足,那么按照贪心的思想,我们只需取出数组前...原创 2019-05-02 21:42:40 · 314 阅读 · 0 评论 -
J 分班(class)(NYIST 2019年校赛)
J 分班(class)(NYIST 2019年校赛)内存限制:256MB 时间限制:1s Special Judge: No题目描述:jsb 是 XX 市第一中学的校长。一轮模拟考试结束后,jsb 想让所有学生重新分班。XX 市第一中学共有 n 位学生,其中第 i 个学生的该次模拟考试的成绩为 bi。jsb 打算将所 有学生分配到 m 个班级里,第 i 个班级的人数为 ai,即需...原创 2019-03-16 11:01:11 · 235 阅读 · 0 评论 -
POJ--3104
题目链接It is very hard to wash and especially to dry clothes in winter. But Jane is a very smart girl. She is not afraid of this boring process. Jane has decided to use a radiator to make dryi...原创 2018-04-02 20:09:17 · 294 阅读 · 1 评论 -
F - 只包含因子2 3 5的数
题目:K的因子中只包含2 3 5。满足条件的前10个数是:2,3,4,5,6,8,9,10,12,15。所有这样的K组成了一个序列S,现在给出一个数n,求S中 >= 给定数的最小的数。例如:n = 13,S中 >= 13的最小的数是15,所以输出15。Input第1行:一个数T,表示后面用作输入测试的数的数量。(1 <= T <= 10000)第2 ...原创 2018-09-18 20:55:33 · 462 阅读 · 0 评论 -
C - A very hard mathematic problem (暴力枚举加二分)
Haoren is very good at solving mathematic problems. Today he is working a problem like this: Find three positive integers X, Y and Z (X < Y, Z > 1) that holds X^Z + Y^Z + XYZ = K whe...原创 2018-05-09 11:53:05 · 441 阅读 · 0 评论 -
三分求函数极值详解
问题:假设现在有一个开头向上的抛物线,怎么快速求出其极值点呢?例子:当然就是三分了图片借用https://www.cnblogs.com/whywhy/p/4886641.html博主假设在[L,R]区间内仅有一极值点,要求该极值点,则可令M1=L+(R-L)/3,M2=R-(R-L)/3。如果像上面的抛物线一下具有则极小值点,那么存在下列性质:因为M1<...原创 2019-01-16 21:26:50 · 577 阅读 · 0 评论 -
H - Turn the corner hdu2438(三分)
Mr. West bought a new car! So he is travelling around the city.One day he comes to a vertical corner. The street he is currently in has a width x, the street he wants to turn to has a width y. The c...原创 2019-01-16 21:01:01 · 106 阅读 · 0 评论 -
G - Light Bulb(几何/三分)
G - Light BulbCompared to wildleopard’s wealthiness, his brother mildleopard is rather poor. His house is narrow and he has only one light bulb in his house. Every night, he is wandering in his incom...原创 2019-01-16 20:50:43 · 165 阅读 · 0 评论 -
E - River Hopscotch(二分)
E - River HopscotchEvery year the cows hold an event featuring a peculiar version of hopscotch that involves carefully jumping from rock to rock in a river. The excitement takes place on a long, stra...原创 2019-01-16 20:47:35 · 202 阅读 · 0 评论 -
D - Expanding Rods(二分)
D - Expanding RodsWhen a thin rod of length L is heated n degrees, it expands to a new length L’=(1+n*C)*L, where C is the coefficient of heat expansion.When a thin rod is mounted on two solid walls...原创 2019-01-16 20:46:52 · 165 阅读 · 0 评论 -
B - Bound Found(POJ2566)尺取
B - Bound FoundSignals of most probably extra-terrestrial origin have been received and digitalized by The Aeronautic and Space Administration (that must be going through a defiant phase: “But I want...原创 2019-01-16 20:46:28 · 169 阅读 · 0 评论 -
A - Jessica's Reading Problem(尺取法入门题)
A - Jessica’s Reading Problem(尺取法入门题)Jessica’s a very lovely girl wooed by lots of boys. Recently she has a problem. The final exam is coming, yet she has spent little time on it. If she wants to pas...原创 2019-01-16 20:46:07 · 266 阅读 · 0 评论 -
I - Toxophily (三分加二分)
I - ToxophilyThe recreation center of WHU ACM Team has indoor billiards, Ping Pang, chess and bridge, toxophily, deluxe ballrooms KTV rooms, fishing, climbing, and so on.We all like toxophily....原创 2019-01-16 18:05:54 · 170 阅读 · 0 评论