二分
Radiumm
你的努力还轮不上你拼天赋!
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Codeforces 626C Block Towers
C. Block Towerstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputStudents in a class are making towers of blocks. Each student makes a (non-zero) to...原创 2018-03-10 15:21:01 · 124 阅读 · 0 评论 -
Codeforces551C:GukiZ hates Boxes
C. GukiZ hates Boxestime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputProfessor GukiZ is concerned about making his way to school, because massive p...原创 2018-05-02 21:27:15 · 209 阅读 · 0 评论 -
Codeforces 975C
题意:有n个战士,分别对应n个力量值,有k次攻击,每次攻击消灭一部分战士,当所有战士被消灭的时候,所有战士复活,问每次攻击剩下多少个战士活着 分析:由于n和q是200000,直接暴力超时,所以二分.我算了前缀和,同时攻击值累加,找到比攻击值大的最小战士下标,注意判断此时的前缀和是否和攻击和相等,输出结果对应不同.注意下一次是从之前结束的战士开始(如果被消灭就是下一个) 代码: #inclu...原创 2018-08-07 19:45:50 · 212 阅读 · 0 评论
分享