This is with respect to GERALD 3.
Please Help!!
All my codes either end up with time limit exceeded or this particular error.

Please read this FAQ for information about SIGSEGV.
TLE is caused by problems in the algorithm. Please provide links to your code and problem statement so it is convenient to help you.

Tried FAQ. But the problem persists.
Here is the link to my code.

Problem Statement:

i think you should make the string length as 50001 as you need one extra place for “\0”

Try to check out the solutions submitted before.But don’t copy or cheat.Find the problem you are facing & run again the code

50001 didnt help

your program is taking a very large amount of memory. 1500M for a C program is too high and that is crossing the limit of that particular problem which is resulting you in that error.

try to change few steps that could use less amount of stack memory or try to code again using simple arrays instead of pointers. i think use of free() is creating such a problem(not sure of it though).

1 Like

what might be the reason for increase in stack memory?

I am facing SIGSEGV runtime error . Please help me. Here is the link of my code.