UVa 336

From Algorithmist
Jump to navigation Jump to search
This is a stub or unfinished. Contribute by editing me.

This is a BFS problem. Calculate the costs by BFS traversal. Then count the vertices with costs less than TTL.

Remember source cab be reachable even with 0 cost.