Unable to solve Max-Flow problem on Spoj

Правка en1, от arun_prasad, 2016-07-23 09:14:23

I was trying to solve this problem on Spoj . Click Here.

After spending a couple of hours on this I could only come up with a dfs solution which obviously got TLE.

Then I looked for help online and i found this quora solution QUORA SOLUTION .

Can someone tell me with an example and proof of the extra nodes to be added and why maxflow should be 2 for it to be right?

Теги spoj, maxflow, help needed

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский arun_prasad 2016-07-23 09:14:23 559 Initial revision (published)