Скоро Codeforces Round 1133 (Div. 1, Div. 2)! Регистрация здесь. ×

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

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

This problem was used in Arab Collegiate Programming Contest ACPC 2013. Description and solution

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

»
13 лет назад, скрыть # |
← Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится

We knew the solution from our coach mrtempo after the contest, the idea is to use meet in the middle technique, bruteforce on 3 heroes and 2 heroes separately and you can merge the answers with binary search!