Code not running

it shows run error but custom in[puts are running.

@saiyamgoyal1903
size of arr was only 10000, arr[10000] and n could be 2e5;
I strongly suggest you to try to debug the program yourself, as it will help you grow and improve.

What do you mean by 2e5 ?

2 * (10^5)…