Reachability from the Capital

Problem Name:
Reachability from the Capital
Site:CodeForces
Links:
Tags:
Problem setters: