Counting Necessary Nodes

Problem Name:
Counting Necessary Nodes
Site:CodeForces
Links:
Tags: