这两个欧拉序不一样!!!
void pre(int x) {
dfn[++tot] = x;
ft[x] = tot;
dfn2[++tot2] = x;
fst[x] = tot2;
for (int i = head[x]; i; i = e[i].nxt) {
int to = e[i].to;
if (fa[x] == to)continue;
fa[to] = x;
depth[to] = depth[x] + 1;
pre(to);
dfn[++tot] = x;
}
if (x != 1)dfn2[++tot2] = x, scd[x] = tot2;
}