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

Автор phantom11, 13 лет назад, По-английски
During my routine practice of topcoder problems, I was troubled a lot by the HourGlass Problem.
In the editorial the author talked about a different approach in the last paragraph but failed to explain it.
Can somebody please explain me why the formula works??
  • Проголосовать: нравится
  • -10
  • Проголосовать: не нравится

»
13 лет назад, # |
  Проголосовать: нравится +3 Проголосовать: не нравится
It's much easier to code brute force solution or bfs. I wrote bfs - you can see it here.

If author writes "Exactly why this is so I don't know, but it works" then I think you don't need to understand it ^_^