Hello,
I am trying to solve this problem (http://uva.onlinejudge.org/external/103/10349.html), I have read all the threads that I found in the web (almost all), I do not know where is my mistake.
I tried solve it, using Edmonds Karp (Max Flow). My code is http://pastebin.com/ervimVJN
Please, help me!









It seems like, there is exists greedy approach
i think this problem is similar to this problem [ http://lightoj.com/volume_showproblem.php?problem=1152 ]
check the test case:
correct output is: