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

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

code

In this code I minimize the difference between prefix sums only, but don't consider the difference of indexes. I think there might be test where prefix sums difference is bigger, but indexes difference is small, and it can be answer.

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

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

Testcase which hack your solution

5
5 -105 -800 904 2
answer : 5
your code gives : 10