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

Автор sturdyplum, история, 6 лет назад, По-английски

I've been working on this problem for a while but can't find an efficient solution. So far my solution runs in about 40 seconds worst case. However the time limit is only 6 seconds. There seems to be no editorial for this contest and it went unsolved during the contest. My solution is bellow. Basically I am doing a backtracking solution that has some amount of memoization, and uses Hungarian matching to do heavy pruning. I was wondering if anyone has solved this problem or could offer some insight to how to solve it. Thank you!

PROBLEM & DATA

MY CODE

Полный текст и комментарии »

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