I wanted to write this question a long time ago. The result still can't grasp CF of E, too god ah ...
The first consideration is the nature of the binary graph, the so easy, there is no odd ring in the graph.
Then consider it in three different situations:
1. There is only one odd ring, delete whichever one
2. Multiple odd rings, remove the one they all cover
3. There is no odd ring, it is not a cool blow.
Then also introduced the "atavistic edge" concept, this specific can see the blog http://blog.csdn.net/DaD3zZ/article/details/50879626 too god, I'm not at all.
Which is a detailed description of the deletion, how to delete the question, similar to a prefix and the idea of each atavistic the edge of a mark.
1. If it is a atavistic edge, and on the only singular ring, then you can delete
2 If it is an odd ring edge in the tree and is covered by all the odd rings, and is not covered by a pair of rings, you can also delete
The most important thing is the DP process: Odd[i] represents the parent benchion ring of I, and even represents the even ring
voidWorkintu) {Flag[u]=1;intE=Head[u]; while(e>0) { intv=Vet[e]; if(Ont[(e+1)/2]&&flag[v]==0) {work (v); Odd[u]+=odd[v];even[u]+=Even[v]; road[(e+1)/2].o=odd[v];road[(e+1)/2].e=Even[v]; } e=Next[e]; }} Work
[bzoj4424] Fairy