What does "source limit" mean?

On all the problems on CodeChef (or at least most) there’s a memory constraint of 50,000 bytes for the source.

What does this exactly mean? I assumed it meant the amount of memory that the program takes up, but I just recently solved a problem with a 1,000,000 int[] in Java. This array should have taken 4N + 24 bytes of space where N is the number of elements. However, that would mean that the array took 4,000,024 bytes which is well over the 50,000 byte limit. But, it worked.

So what does the term “source limit” exactly mean?

3 Likes

Well, source limit is the number of bytes your source file weighs and as per CodeChef its around 50,000 bytes for most of the problems.

3 Likes

@betlista how do we know how much is the size of our source code

1 Like

@kaushal101 Use the CodeChef IDE to determine the size and the execution time of your code, that will surely come in handy. :slight_smile:

3 Likes

Just an addition to that answer - @kullalok limit you are describing is memory limit - CodeChef use SPOJ under the hood. Memory limits are desribed here - Sphere Online Judge (SPOJ) Actually we use Cube cluster.

3 Likes

Save it as a text file, check its properties

1 Like

Lol that’s one way too xD