Sunday, October 17, 2010

10928 - My Dear Neighbours - UVA

graph representation or Ad Hoc

In this problem you have to count the OUT-DEGREE of each node and find the minimum OUT-DEGREE and print nodes with the minimum OUT-DEGREE sequentially.
What you have to concern is type of input. I get input using stringstream and getline and count the neighbors of each node.

No comments:

Post a Comment

USACO - Prime Palindromes

I just skimmed the problem statement and panicked of the high boundary of the input, but something inside told me don't worry everyth...