Programming Environment


The software configuration for the World Finals will consist of the following:

  • OS
    • Ubuntu 16.04.3 LTS Linux (64-bit)
  • Editors
    • vi/vim
    • gvim
    • emacs
    • gedit
    • geany
    • kate
  • Languages
    • Java
      • OpenJDK version 1.8.0_131
      • OpenJDK Runtime Environment (build 1.8.0_131-8u131-b11-2ubuntu1.16.04.3-b11)
      • OpenJDK 64-Bit Server VM (build 25.131-b11, mixed mode)
    • C
      • gcc (Ubuntu 5.4.0-6ubuntu116.04.4) 5.4.0 20160609
    • C++
      • g++ (Ubuntu 5.4.0-6ubuntu116.04.4) 5.4.0 20160609
  • IDEs
    • Eclipse 4.7 (Oxygen), configured with
      • Java (OpenJDK version 1.8.0_131)
      • C/C++ (CDT 9.3.0 with Ubuntu 5.4.0-6ubuntu116.04.4 5.4.0 20160609)
      • PyDev (Python) 5.8.0
    • IntelliJ (IDEA Community Edition 2017.2.3), configured with
      • Java (version TBD)
      • Kotlin plugin version 1.1.4-3
    • CLion (version 2017.2.2), configured with
      • C/C++ (version TBD)
    • Code::Blocks (version 16), configured with
      • Java (OpenJDK version 1.8.0_131)
      • C/C++ (CDT 9.3.0 with Ubuntu 5.4.0-6ubuntu116.04.4 5.4.0 20160609)

Compilation of Submissions

During the contest, teams will submit proposed solutions to the contest problems to the Judges using the DOMJudge contest control system. Source files submitted to the Judges will be compiled using the following command line arguments for the respective language:

  • Java
    • javac -encoding UTF-8 -sourcepath . -d . ${files}
  • C
    • gcc -g -O2 -std=gnu11 -static ${files} -lm
  • C++
    • g++ -g -O2 -std=gnu++14 -static ${files}

The "${files}" in the above commands represents the list of source files from the submission which will actually be compiled. Files with the following suffixes (and only files with these suffixes) will be submitted to the compiler:

  • For Java submissions: files ending with .java
  • For C submissions: files ending with .c
  • For C++ submissions: files ending with .cc, .cpp, .cxx, or .c++

Execution of Submissions

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

  • For Java: the compiled main class will be executed using the following command:
    java -Dfile.encoding=UTF-8 -XX:+UseSerialGC -Xss64m -Xms1920m -Xmx1920m
  • For C/C++: the executable file generated by the compiler will be executed to generate the output of the submission.

Execution as described above will take place in a "sandbox". The sandbox will allocate 2GB of memory; the entire program, including its runtime environment, must execute within this memory limit. For interpreted languages (Java, Python, and Kotlin) the runtime environment includes the interpreter (that is, the JVM for Java/Kotlin and the Python interpreter for Python).

The sandbox memory allocation size will be the same for all languages and all contest problems. For Java and Kotlin, the above command shows the stack size and heap size settings which will be used when the program is run in the sandbox. For C, C++, and Python, the heap and stack sizes are limited only by the total amount of memory available in the sandbox.