The lead game

,

What is wrong in my solution…it is not accepting it?

LINK:https://www.codechef.com/viewsolution/23625909

its taking n+1 inputs for your test case…if u entered 5 as your test case it will take 5+1=6 inputs for your program…
try using n-1 in the two for loops