Help Me !

Правка en1, от _Ramtin_, 2015-09-14 21:06:15

Hey guys i need help for solving this problem :

http://mirror.codeforces.com/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://mirror.codeforces.com/contest/369/submission/12994706

i dont know what is wrong with this please help !

Теги help, dfs

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский _Ramtin_ 2015-09-14 21:06:15 583 Initial revision (published)