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

Автор CantLoseNow, история, 4 года назад, По-английски

i was solving this problem 1738B - Prefix Sum Addicts . my submission 177418929 gives error on 1 testcase....help me please....otherwise i wont be able to move myself to other problems.

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

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

Solve this question after some days with fresh mind.

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

Ok so your general idea is correct but the problem is that youre summing the whole remainder (your "disremain" variable) in the last number when you can sum 1 in the last "disremain" numbers.