摘要:
题目不再重复叙述 请参考: "洛谷" "CJOJ" 题解 先来说说非完美解法,也是我去年考场上的做法 考虑一下每一只蚯蚓增加的长度, 这个值并不需要每一次依次增加, 用一个变量维护即可,每次取出蚯蚓就加上这个值,切断蚯蚓就减去这个值。 接下来如何维护最大的蚯蚓,考虑使用一个堆来进行维护 时间复杂度O 阅读全文
摘要:
题面 Dearboy, a goods victualer, now comes to a big problem, and he needs your help. In his sale area there are N shopkeepers (marked from 1 to N) which 阅读全文
摘要:
题面 On a grid map there are n little men and n houses. In each unit time, every little man can move one unit step, either horizontally, or vertically, 阅读全文
摘要:
题面 You are in charge of setting up the press room for the inaugural meeting of the United Nations Internet eXecutive (UNIX), which has an internationa 阅读全文