Can anybody please give a test case where my submission (https://mirror.codeforces.com/contest/1611/submission/141846174) goes wrong for this problem (https://mirror.codeforces.com/contest/1611/problem/E1).
Here's a small explanation for my logic.
I have used bfs to find the minimum distance of vlad from all nodes and stored the distances in vd vector. I used multi source bfs to find minimum distance for vlad's friends and stored the distances in fd vector. Later on compared vd and fd values for leaf nodes. If any leaf node (other than 1) have vd <= fd then answer should be yes. If no such node is found then answer should be no.
I can't figure out where my code goes wrong. If you can get any counter test case please comment.







