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

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

I am getting MLE for the question: https://mirror.codeforces.com/contest/1855/problem/C1 (one of the recent div2 contests)

submission link : https://mirror.codeforces.com/contest/1855/submission/217028542

The approach that I am trying:
1. To increase the positive element greater than 20
2. make the index-1 greater than 0 with the help of max value index. (0 based indexing)
3. now increase the values incrementally

I am getting problem for the case, where there is a positive number present in the array ( I know this because if I assert the size, I get the runtime error )

snippet where the code gives problem
  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится