[HELP] : Can someone help me find the bug

Revision en1, by lecxe, 2023-08-03 21:09:49

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

submission link : https://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

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English lecxe 2023-08-03 21:09:49 1631 Initial revision (published)