l-.-l's blog

By l-.-l, 14 years ago, In English

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!

  • Vote: I like it
  • +3
  • Vote: I do not like it

| Write comment?
»
14 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

It seems like, there is exists greedy approach

»
14 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

i think this problem is similar to this problem [ http://lightoj.com/volume_showproblem.php?problem=1152 ]

check the test case:

2
5 8
oo**oooo
*oo*ooo*
******oo
*o*oo*oo
******oo
3 4
**oo
**oo
*oo*

correct output is:

11
4