On tree chain subdivision

Tree chain subdivision Template question As the name suggests, it is to express the shape of the tree with a linear linked list. Then the first thing is to build a tree. ll siz[N],dep[N],son[N],fa[N];//Son is the coordinate of the great son whose ancestor is x void build_tree(int now) { siz[now]=1;//Size of initialization tree for(int i=h ...

Posted by sonic_2k_uk on Sat, 19 Feb 2022 22:39:54 +0100

P4428-[BJOI2018] binary [tree array, set]

Topic Title Link: https://www.luogu.com.cn/problem/P4428 General idea of the topic Count Reg n n n 0 / 1 0/1 0 / 1 string requires su ...

Posted by bruceg on Wed, 19 Jan 2022 12:15:46 +0100