Skip to content

Judging format

Kevin Lu edited this page Nov 18, 2024 · 1 revision

This page will explain how the judge works as a standalone program.

Once compiled, the judge can be run as a program through the terminal.

It expects the following arguments: ./judge <lang (c/cpp/java/py/asm)> <problem_dir> <jid>

The problem directory should be a valid problem directory containing the necessary elements and should also contain a file named main<jid>.<lang>.

The judge will output one line per test case, with the following format:

(verdict) (memory) (time)

Once judging has completed, the judge will exit with the following possible codes:

  • 0: accepted
  • 1: wrong answer
  • 2: time limit exceeded
  • 3: memory limit exceeded
  • 4: internal error
  • 5: output limit exceeded
  • 6: compilation error
  • 7: invalid return
  • 8: runtime error
  • 9: segmentation fault
  • 10: floating point exception
  • 11: aborted
  • 12: disallowed system call
  • 13: illegal instruction
Clone this wiki locally