I'm getting a runtime error each time and it is running in codeblocks

i’m getting a runtime error each time and it is running in code blocks

only three of the test cases are running except it all the test cases are not running

Varun share your code as well.

please help me i have shared the code

hey Varun your array size is less than given constraints, so take proper array sizes!
also I see your approach is O(n^2) so it will give TLE! try to optimize it as it can be done in O(n)

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.