Qingyu的博客

博客

Judging environment of QOJ (2025 updated)

2021-03-23 20:32:30 By Qingyu

Last Updated: February 2025

Judgehost Specification

The judgehosts of QOJ are all hosted on Microsoft Azure. All judgehosts have the identical specifications:

  • OS: Ubuntu 24.04.1 LTS
  • RAM: 8 GiB
  • CPU: Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz

Language Details

Unless specified in the problem meta page, you may submit your solution in any of our supported languages. Note that IOI and most other Olympiads support C++ exclusively, so problems with graders typically only support C++. Always check the problem meta information before starting!

  • C
  • C++
  • D
  • Go
  • Haskell
  • Java
  • Kotlin
  • Pascal
  • Python 3
  • Rust

C++ (C++98, C++11, C++14, C++17, C++20, C++23, C++26)

All C++ submissions are compiled using GCC 14.2.0. The detailed compilation tag is as follows:

g++ -o answer -x c++ answer.code -lm -O2 -DONLINE_JUDGE -std=c++XX

The -std=c++XX flag will be set according to your chosen standard (98, 11, 14, 17, 20, or 23).

C (C99, C11)

All C submissions are compiled using GCC 14.2.0. The detailed compilation tag is as follows:

gcc -o answer -x c answer.code -lm -O2 -DONLINE_JUDGE -std=cXX

The -std=cXX flag will be set to either c99 or c11 based on your selection.

Java (Java 8, Java 11, Java 17, Java 21)

Note: As of January 13, 2025, Java 7 and Java 14 are no longer supported by QOJ.

We use Open JDK for all Java submissions.

  • Java 8: openjdk version "1.8.0_432"
  • Java 11: openjdk 11.0.25 2024-10-15
  • Java 17: openjdk 17.0.13 2024-10-15
  • Java 21: openjdk 21.0.5 2024-10-15

Flags -Xmx2048m, -Xss1024m, and -XX:ActiveProcessorCount=1 will be added when running Java programs.

Python (Python 3)

Note: As of Dec 20, 2023, Python 2 is no longer supported by QOJ.

The Python Interpreter we used is Python 3.13.1. Currently, QOJ does not support PyPy 3.

Rust

The Rust compiler we used is rustc 1.84.0 (9fc6b4312 2025-01-07). The detailed compilation tag is as follows:

rustc -o answer -C opt-level=3 --edition=2021 answer.code

D

The D compiler we used is DMD64 D Compiler v2.109.1. The detailed compilation tag is as follows:

dmd answer -O -release -inline -boundscheck=off

Pascal

The Pascal compiler we used is fpc, Free Pascal Compiler version 3.2.2. The detailed compilation tag is as follows:

fpc answer.code -O2

Haskell

The Haskell compiler we used is ghc, The Glorious Glasgow Haskell Compilation System, version 9.4.7. The detailed compilation tag is as follows:

ghc -O2 -rtsopts -XSafe -no-keep-hi-files -no-keep-o-files -static -o answer answer.hs

Kotlin

Warning! The support of Kotlin is not well-tested yet. Please report if you have received any issues while using it.

The Kotlin compiler we used is kotlinc-jvm 2.1.0 (JRE 21.0.5+11-Ubuntu-1ubuntu124.04). The JVM option we used to run Kotlin programs is the same as we used in Java programs.

Go

Warning! The support of Go is not well-tested yet. Please report if you have received any issues while using it.

The Go compiler we used is go version go1.22.2 linux/amd64.

go build -o answer -ldflags -s -w -trimpath

Comments

No comments yet.

Post a comment

You can use @mike to mention the user mike.

If you wish to input the '@' character, please use @@