WRONG JUDGEMENT !

May I know the reason behind the different judgement for same solutions ?? This literally costed me 2-3 hrs !

My code : CodeChef: Practical coding for everyone
AC code : CodeChef: Practical coding for everyone

@admin @vijju123 pls reply !

You have a typo on line 8:

const ll N=1e5+5;

The problems constraints are that 1 <= N <= 1e6.

Rest seems fine.

In the question, value of n ranges from 1 to 10^6 but in your code you are declaring n up to 1e5+5.

correct me if i am wrong.

but that should give RTE right ?

Accessing array out of bounds is “undefined behaviour”. Meaning, you may get a RTE if your program cannot access that memory, or your program may run if it can access that part of memory. Even if it runs, it may be overwriting some other part of memory given to your program making your program behave in unpredictable ways. That may be the reason why your program runs, but still gives WA.

thanks bro !