上一页 1 ··· 3 4 5 6 7
摘要: Slastyona and her loyal dog Pushok are playing a meaningless game that is indeed very interesting. The game consists of multiple rounds. Its rules are 阅读全文
posted @ 2020-04-22 13:57 liuzhaoxu 阅读(127) 评论(0) 推荐(0) 编辑
摘要: 本题中,我们将用符号[c]表示对c向下取整,例如:[3.0」= [3.1」=[3.9」=3。蛐蛐国最近蚯蚓成灾了!隔壁跳 蚤国的跳蚤也拿蚯蚓们没办法,蛐蛐国王只好去请神刀手来帮他们消灭蚯蚓。蛐蛐国里现在共有n只蚯蚓(n为正整 数)。每只蚯蚓拥有长度,我们设第i只蚯蚓的长度为a_i(i=1,2,... 阅读全文
posted @ 2020-04-22 13:10 liuzhaoxu 阅读(139) 评论(0) 推荐(0) 编辑
摘要: 题目 An army of ants walk on a horizontal pole of length l cm, each with a constant speed of 1 cm/s. When a walking ant reaches an end of the pole, it i 阅读全文
posted @ 2020-04-15 07:33 liuzhaoxu 阅读(215) 评论(0) 推荐(0) 编辑
摘要: 主要就是看直接连到根节点的树边。 阅读全文
posted @ 2020-04-12 23:55 liuzhaoxu 阅读(351) 评论(0) 推荐(0) 编辑
摘要: 最短下车时间,思维 阅读全文
posted @ 2020-04-11 15:47 liuzhaoxu 阅读(477) 评论(0) 推荐(0) 编辑
摘要: 这道题其实就是一道无根树上树的直径的问题: 如图,首先根据上面的做法,用两次BFS求出树的直径,即AB。 那么其实发现在实际上,问题要求max{AB+BC}(BC<AC)或max{AB+AC}(AC<BC),那么这两个式子可以合并成求max{AB+min{BC,AC}}。 只要确定了直径的端点A、B 阅读全文
posted @ 2020-04-09 17:50 liuzhaoxu 阅读(145) 评论(0) 推荐(0) 编辑
摘要: 推导式子 阅读全文
posted @ 2020-04-09 12:46 liuzhaoxu 阅读(349) 评论(0) 推荐(0) 编辑
摘要: 树形DP 阅读全文
posted @ 2020-04-07 18:11 liuzhaoxu 阅读(163) 评论(0) 推荐(0) 编辑
摘要: Farmer John has arranged his N (1 ≤ N ≤ 5,000) cows in a row and many of them are facing forward, like good cows. Some of them are facing backward, th 阅读全文
posted @ 2020-04-06 13:55 liuzhaoxu 阅读(165) 评论(0) 推荐(0) 编辑
摘要: 思维 阅读全文
posted @ 2020-04-04 22:23 liuzhaoxu 阅读(158) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7