Блог пользователя aajjbb

Автор aajjbb, 11 лет назад, По-английски

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.

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

»
11 лет назад, # |
  Проголосовать: нравится +1 Проголосовать: не нравится

Maybe you find these useful:

TopCoder max flow tutorial with the example problem of rooks.

RookAttack

»
11 лет назад, # |
  Проголосовать: нравится +1 Проголосовать: не нравится

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).

»
11 лет назад, # |
  Проголосовать: нравится +1 Проголосовать: не нравится

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.