We currently support 7 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} | 1x | |
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 |
JavaScript | node {output} | 3x | 256 MiB added | |
Ruby | ruby {output} | 3x | 256 MiB added | |
C# | mcs {code} | mono {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:
- C++ programs must always
return 0
from the main function. Excluding that may result in a RTE verdict being returned. - 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.