Hdu 3887 Counting Offspring \ Poj 3321 Apple Tree \BZOJ 1103 [POI2007]大都市meg
这几个题练习DFS序的一些应用。问题引入:给定一颗n(n
#include
#include
#include
#include
#include
#include
#include
usingnamespacestd;
#defineMaxn100005
#definelx(x>1)
intn,s;
inttotal=0;
//前向星
intfirst[Maxn];
intnext[Max