Help Me !

Revision en1, by _Ramtin_, 2015-09-14 21:06:15

Hey guys i need help for solving this problem :

http://codeforces.net/problemset/problem/369/C

my idea was it's better to choose leaves of the tree because if there is a way that is the best and a node is chosen that is not a leave u can continue your way from this node down to the leave and the answer wont decrease

so i put a counter on bad edges and when ever i reached a leaf and the counter is not zero i add the leave to answer

my submission : http://codeforces.net/contest/369/submission/12994706

i dont know what is wrong with this please help !

Tags help, dfs

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English _Ramtin_ 2015-09-14 21:06:15 583 Initial revision (published)