why is this showing runtime error in my code?? CodeChef: Practical coding for everyone
The value of t (what you are callling
n in your code) can be as high as 10^6, but the array
arr you are storing these t values in has room for only 1000 values.