For which test case my code is failing

https://codeforces.com/contest/1466/submission/112146818

i tried my code please tell me for which testcase my code is failing

hello @shivamgoel150

pls wait. . . . . .

ur logic looks correct, u can check test cases on codeforces

test case in which i am failing is not shown in codeforces

i can help u with logic.
guessing a test case is really difficult.

@shivamgoel150

try this case->
1
5
1 1 1 2 4

correct answer is 4

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.