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

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

I've been trying to solve this problem from Timus OJ using max flow. Since the constraints are small, it can be brute-forced easily (checking all subsets of teams). Can there be any possible solution using max flow?

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

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +5 Проголосовать: не нравится

No, this problem is NP hard.

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

I have had been trying to solve this problem and could not find it's proper solution on internet. I have written a brute force solution which gives me TLE on test case 7. Can you please share your brute force solution ?