I am getting RE (SIGXFSZ) in one of the question in April Long Challange Div 2

I am getting RE (SIGXFSZ) in one of the question in April Long Challenge Div 2, in just one of the cases, rest two case are correct. For this case time taken is also within limits. I have found that this happens when Output limit exceeds. What does this exactly means. Is there anything which i can do.

Definitely your code is wrong, think about some edge cases.

Thanks, it may be the case. But, i have spent a lot of time and couldn’t find anything because of which size will exceed.
Any idea about how much is the limit???

Don’t print extra whitespace. it will be resolved after that if your code is correct.

Thanks, but there’s just compulsory white spaces and new lines…

say suppose you are printing 6 10 12 then it should be like 6 space 10 space 12 and then new line no space after 12. its how mine got ressolved. Hope i am not breaking any rule here regarding live contest. if so tell me?


Well the answer to this is definitely some edge cases because in another thing would give wrong answer. Well i have few guess which could think of but It’s an ongoing contest so can’t tell you those thing.

this is the correct answer to your problem definitely go with it because same was happening with me

1 Like

Bro, you are genius. True genius. Your idea worked. Thanks a lot…:pray::pray::pray::pray::pray::pray:

Ya it worked…

Happy to help.

Thanks for the help. Why do you think we are facing this issue in this particular problem? Like I am pretty sure extra whitespaces are not something we take care of and it has never given error before.

Is it because of the fault of problem setter, who did not take into account the size of file with whitespaces before setting the problem?

well am not sure but there is a limit on the size of output file and since the output of this code is large so it might happen that the extra whitespace exceeded the size of output file.
Can’t say about wether the problem setter have taken this into consideration or not, maybe there can be other issue. Hope they clarify.

Thank you so much, i was getting same error your answer worked.