Strongest fighter question

i am getting TLE in 4 cases …please tell the mistake

Hey @lovish2552
You are not getting TLE but segmentation instead since array can be as long as N=10^7
So declare this int a[10000001]; globally and remove from main

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.