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

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

Hi friends,can anyone suggest away of doing the following problem in O(n) time using DP. 327A - Flipping Game

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

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

A solution was posted in this editorial. The algorithm the author is referring to at the end of his solution is called Kadane's Algorithm. You can find an explanation here.

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

I don't understand why are you asking when there is an editorial? Is it so hard to click on the tutorial button on the right of the problem statement? And BTW, this is one of the few good and detailed editorials on codeforces.