Codeforces #302 Div1 B. Destroying Roads

本番割とすんなり通せた。 http://codeforces.com/contest/543/problem/B