aajjbb's blog

By aajjbb, 13 years ago, In English

Hi, the South American ICPC regional phase took part yesterday. I wasn't able to solve the problem Link. Some contestants said to me that it's solved by max flow, do someone know another solution or have a clue on how to build the flow graph ? Thanks in advance.

  • Vote: I like it
  • 0
  • Vote: I do not like it

»
13 years ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

Maybe you find these useful:

TopCoder max flow tutorial with the example problem of rooks.

RookAttack

»
13 years ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

The idea is convert each '.' in a two nodes left and right, then for each pair of '.' that we can't take at the same time add a undirected edge from left to right. The result will be the (http://en.wikipedia.org/wiki/Maximal_independent_set) Maximal independent set / 2 that in a bipartite graph is (nodes — matching).

»
13 years ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

There was a problem from SWERC 2012 that the solution is very similar (Sentry Robots). I guess the judges were not expecting that many teams would solve this problem.