CodeMarshal algorithm contest hosting platform uses a sandboxed code execution environment for each individual submissions. Details of the compilers and runtimes used in the environment is provided below:

Compilers & Language Runtimes

CodeMarshal sandbox uses the following software configuration for compiling and executing source code submissions:

  • C
    • gcc 9.2
  • C++
    • g++ 9.2
  • Java
    • OpenJDK 8
  • Python2
    • CPython 2.7
  • Python3
    • CPython 3.8

Compilation of Submissions

Source files submitted to the system will be compiled using the following command line arguments for the respective language:

  • C
    • gcc -O2 -static program.c -lm
  • C++
    • g++ -O2 -static -std=c++11 program.cpp
  • Java
    • javac -encoding UTF-8 -J-Xmx2048m Program.java
  • Python2
    • python2 program.py
  • Python3
    • python3 program.py

Execution of Submissions

For each language, if the above compilation step is successful then the submission will be executed as follows:

  • C/C++

    • the executable file generated by the compiler will be executed to generate the output of the submission.
  • Python

    • the main source file will be executed by the CPython interpreter to generate the output of the submission.
  • Java

    • the compiled main class will be executed using the following jvm parameters:
    • java -XX:+UseSerialGC -Xss64m -Xms64m -Xmx2048m Program

The submission runtime system sandbox runs on Arch Linux 64bit server.