摘要:
题意:给出有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 ... 阅读全文
摘要:
DescriptionLimak is a little polar bear. He plays by building towers from blocks. Every block is a cube with positive integer length of side.... 阅读全文