https://www.codechef.com/viewsolution/18891776

It is from beginner practice questions(TRACE).

Suppose n=100

So when you are calculating maximum trace at last iteration i=99 and k=98

Now i+k=197 which does not exist and thus the runtime error.

Suppose n=100

So when you are calculating maximum trace at last iteration i=99 and k=98

Now i+k=197 which does not exist and thus the runtime error.