Judge Programming Language Configuration

We currently support 4 programming languages on CodeDrills. You can see sample submissions for all languages in the editorial of Apples and Bananas. Here are the details about the versions and compiler arguments.

Language/version Compile command Run command Time limit multiplier Memory added
C++ 17 g++ -std=c++17 -DONLINE_JUDGE -O2 -x c++ {code} -o {output} ./{output}
Java 11 javac Main.java java -Xss128M -DONLINE_JUDGE=1 Main 2x 256 MiB added
Python 3 python {output} 3x 256 MiB added
Kotlin 1.3 kotlinc -jvm-target 11 {code} kotlin {output} 2x 256 MiB added

Note that TL multipliers are subject to contest rules. Some contests may not allow them.

For compiling step itself the following limits apply:

  • Time Limit: 20s
  • Memory Limit: 2 GiB
  • Executable/class file size limit: 25 MiB

Let us know below if you would like to have specific flags that are generally used in online judges (please include a justification).

Important Notes:

  1. C++ programs must always return 0 from the main function. Excluding that may result in a RTE verdict being returned.
  2. There is an issue in measuring memory usage, so the memory reported may not be accurate. Due to this we won’t use the reported memory to mark Memory Limit Exceeded. Programs that actually exceed the memory limit will get a Runtime Error instead of Memory Limit Exceeded.

Update: Java, Kotlin and Python all will get an additional 256 MiB.


Note that C++ programs must always return 0 else the judge might return a RTE verdict.

1 Like