Output is correct in my system but it is showing siesegv runtime error when i submit it .... please tell me what i have to change to get correct answer ... iam writing code in c language

i Want All the reasons why there is SIESEGV error in my code which was in C

You probably didn’t check for all the test cases. Try out test cases with are closer to the constraints given in the problem.

i have checked all the test cases still it is showing same error and i have changed accordingly to the reasons given in faq… but still same

In that case, sorry, i can’t really do anything unless i see your code. SIGSEGV generally comes when you have tried to allocate more memory than allowed or tried to access memory that isn’t yet allocated to your program(array out of bounds). If you have declared a huge array, try moving it to global scope. Out of curiosity, which compiler are you using? And im not talking about the test cases given in the problem itself, make your own test cases.

This same problem here.

this is my code

please reply me soon why am i getting that error

You are not supposed to read/ write from/to a file, Make sure that your i/o is being done from the console and not from the file!

1 Like

can u correct the above code of mine please

u cant discuss on ques of the ongoing contests!!!


No way !!!

Read the guidelines.

You cannot ask hints to solve the problem.