差分&线段扫描
文章平均质量分 85
h1021456873
这个作者很懒,什么都没留下…
展开
-
codeforces 731 D 80-th Level Archeology (差分+线段扫描)
Archeologists have found a secret pass in the dungeon of one of the pyramids of Cycleland. To enter the treasury they have to open an unusual lock on the door. The lock consists of n words, each cons原创 2016-11-20 15:10:38 · 716 阅读 · 0 评论 -
CSU - 1335 高桥和低桥 (扫描线)
有个脑筋急转弯是这样的:有距离很近的一高一低两座桥,两次洪水之后高桥被淹了两次,低桥却只被淹了一次,为什么?答案是:因为低桥太低了,第一次洪水退去之后水位依然在低桥之上,所以不算“淹了两次”。举例说明: 假定高桥和低桥的高度分别是5和2,初始水位为1 第一次洪水:水位提高到6(两个桥都被淹),退到2(高桥不再被淹,但低桥仍然被淹) 第二次洪水:水位提高到8(高桥又被淹了),退到3。 没错,原创 2017-04-13 19:45:33 · 365 阅读 · 0 评论