Run time error

when i use my codeblocks to compile my program its working fyn…
but when i enter the same code in code chef …it is showing runtime error…

How can i overcome this problem …

THANKS IN ADVANCE

It may be due to array out of bounds problem. Check the constraints of the problem and always take the array sizes significantly more than the required amounts.

Checks:

1.Did you forget to put return 0? If no, read the next one.
2.Check for memory overflow, try larger test cases.

you can get more clear answer if you post the code here :slight_smile: