摘要:
"题目描述" Solution 这道题考试的时候竟然没有仔细想,结果只拿了暴力分... 其实就是一个 DFS序+树状数组。 我们先把用 DFS 把它变成一个序列,同时记录它们的 $siz$。 那么我们每一次连一条边之后就是对它的子树产生影响。 在树状数组里面维护就好了。 代码 cpp include 阅读全文
摘要:
题目描述 For his birthday present little Johnny has received from his parents a new plaything which consists of a tube and a set of disks. The aforementio 阅读全文