摘要: 题意:给出有n个点的树,有q次询问某个点的重心是什么? Input The first line of the input contains two integers n and q (2 ≤ n ≤ 300 000, 1 ≤ q ≤ 300 000) — the size of the ... 阅读全文
posted @ 2016-07-01 23:32 HARD_UNDERSTAND 阅读(251) 评论(0) 推荐(0) 编辑
摘要: DescriptionLimak is a little polar bear. He plays by building towers from blocks. Every block is a cube with positive integer length of side.... 阅读全文
posted @ 2016-07-01 12:31 HARD_UNDERSTAND 阅读(235) 评论(0) 推荐(0) 编辑