" https://codeforces.com/contest/1133/problem/F2 "
logic ye lagaya ki:
- counted all bridges having vertex 1
- checked that “d” ke value kam se kam bridges ke equal ya greater hone chaheye and less than all_edges of node 1
- agar ye sab satisfy hore hai to fir remaining edges ko maine node 1 pe assign karna start kiya. . . agar assign hogye then YES agar nahi hopaye then NO
JITNA maine check kiya logic me problem to nahi lagrahi . . . . . mera 37th testcase WA ara hai kyoki maine sare (child,parent) pair print nahi kiye. . . . . . .aur kon se miss hohye ye muje nahi pata chalra … . . . . . .MERA code just in case . . . . .“https://ideone.com/t7TNO6”