What's with the low memory limit on codechef

why there is so less memory limit on CodeChef like just 50000bytes. A simple solution
is not passing just due to a low memory limit.

3 Likes

hey !! what does source limit (50000 bytes) mean in a problem??

That’s the limit to the size of the source code you can submit.

2 Likes

Can you please explain why does a simple program gives SIGSEGV error .
(it tells that you have a invalid index or memory limit exceeded), but I don’t believe this is the case in my program. this type of situation never happened to me on codeforces or on any other platform. I rarely get this type of error.
as I am new to codechef my every 3 submit gets this kind of error.

Please link to a submission where this happens.

2 Likes

such a simple solution as this CodeChef: Practical coding for everyone gives SIGSEGV error
I checked my solution with a brute force solution and it works fine and I even have
Sanitizer.

Based on a quick glance - are you reading K and P in the wrong order?

3 Likes

same code as above but it is clearner than the previous CodeChef: Practical coding for everyone

How stupid :frowning: and I wasted like 2 hours on this.
thanks, man big help.
Respect :slight_smile:

1 Like