点双部分退栈错误。
68pts:
while(s.top()!=x){
int u=s.top();s.pop();
cnt[tot]++;
e[u].push_back(tot);
e[tot].push_back(u);
}
100pts:
int u=0;
while(u!=v){
u=s.top();s.pop();
cnt[tot]++;
e[u].push_back(tot);
e[tot].push_back(u);
}
hack:
5 5
1 2
2 3
3 4
4 1
3 5
错误的圆方树:
正确的圆方树:

这个样例中考虑 (3,5) 这条边时,错误的做法会弹出4,5。而正确情况下只应该弹出5。