![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
二分 三分
sigh_
这个作者很懒,什么都没留下…
展开
-
HDU_6274 Master of Sequence(二分)
Master of Sequence Time Limit: 20000/10000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Problem Description There are two sequencesa1,a2,⋅⋅⋅,ana_1, a_2, · · · , a_na1,a2,⋅⋅⋅,an, b1,b2,⋅⋅⋅,bnb_1, b_2, · · · , b_nb1,b2,⋅⋅⋅,bn. Let S(t原创 2020-10-21 21:56:44 · 80 阅读 · 0 评论 -
CodeForces_920G List Of Integers(二分+容斥)
List Of Integers time limit per test:5 seconds memory limit per test:256 megabytes Problem Description Let’s denote as L(x, p)L(x, p)L(x, p) an infinite sequence of integers yyy such that gcd(p, y) = 1gcd(p, y) = 1gcd(p, y) = 1 and y > xy > xy > x原创 2020-10-01 10:38:22 · 103 阅读 · 0 评论 -
洛谷_1485 火枪打怪(二分+贪心)
火枪打怪 题目链接:https://www.luogu.com.cn/problem/P1485 题解: 二分枚举p,判断能否满足题目要求即可。 check:因为每颗子弹只会向左溅射,所以从右向左考虑每个怪物需要多少次攻击。在考虑当前状态时,需要减去怪物被子弹溅射所受的伤害。当第iii只怪物在攻击jjj时溅射范围内时,其受到的伤害为p−(i−j)2=p−i2−j2+2∗i∗jp-(i-j)^2 = p-i^2-j^2+2*i*jp−(i−j)2=p−i2−j2+2∗i∗j。其中p,ip,ip,i已知,统计攻原创 2020-09-11 16:41:04 · 261 阅读 · 0 评论 -
洛谷_1084 疫情控制(贪心+倍增+二分)
疫情控制 题目链接:https://www.luogu.com.cn/problem/P1084 题解: 对答案进行二分,然后check在时限内,能否满足题目条件。(若军队数目小于1号节点的子节点数,则无解) check:显然在规定时间内,军队的移动越靠近根节点更好。所以可以先求出时限内,每支军队能移动到的最靠近根节点的位置,可以利用倍增快速计算。 将所有能移动至根节点的军队标记为未驻扎状态,单独记录其到根节点已花费的时间,以及来自根节点的哪个子树。 DFS判断根节点每个子节点所在子树是否满足要求,若不满足原创 2020-06-11 23:52:18 · 570 阅读 · 0 评论 -
CodeForces_1355E Restorer Distance(三分)
Restorer Distance time limit per test:1 seconds memory limit per test:256 megabytes Problem Description You have to restore the wall. The wall consists of N pillars of bricks, the height of the i-th pillar is initially equal to hi, the height is measured i原创 2020-05-17 09:35:21 · 368 阅读 · 0 评论