[TOPSIC PG] Rules / terms

Examination rules

Language

The programming language for solving the problem is limited to those that TOPSIC system supports. The following is a table of supported languages. AtCoder Library(AC Library, ACL) is available in C++. For more information about the installed libraries for each language, please click here.

Language Compile / Interpreter Execution Command
C (GCC 9.2.1) gcc -std=gnu11 -O2 -DONLINE_JUDGE -o ./a.out ./Main.c -lm ./a.out
C (Clang 10.0.0) clang -std=c11 -O2 -DONLINE_JUDGE -o ./a.out ./Main.c -lm ./a.out
C++ (GCC 9.2.1) g++ -std=gnu++17 -Wall -Wextra -O2 -DONLINE_JUDGE -I/opt/boost/gcc/include -L/opt/boost/gcc/lib -I/opt/ac-library -o ./a.out ./Main.cpp ./a.out
C++ (Clang 10.0.0) clang++ -std=c++17 -stdlib=libc++ -Wall -O2 -DNDEBUG -DONLINE_JUDGE -I/opt/boost/clang/include -L/opt/boost/clang/lib -I/opt/ac-library -o ./a.out ./Main.cpp ./a.out
Java (OpenJDK 11.0.6) /usr/lib/jvm/java-11-openjdk-amd64/bin/javac ./Main.java /usr/lib/jvm/java-11-openjdk-amd64/bin/java -Xss{stack_size:mb}M Main
Python (3.8.2) bash -c ‘python3.8 ./Main.py ONLINE_JUDGE 2>/dev/null’ python3.8 ./Main.py
Bash (5.0.11) bash ./Main.sh
bc (1.07.1) bc –mathlib ./Main.bc
Awk (GNU Awk 4.1.4) awk -f ./Main
C# (.NET Core 3.1.201) bash -c ‘cp ./Main.cs ./../csharp/Program.cs && dotnet publish ./../csharp -c Release -r ubuntu.18.04-x64 -p:PublishReadyToRun=true -o . -v q –nologo 1>&2’ ./csharp
C# (Mono-mcs 6.8.0.105) mcs -warn:0 -o+ -unsafe -r:System.Numerics -langversion:latest ./Main.cs -out:./Main.exe mono ./Main.exe
C# (Mono-csc 3.5.0) csc -warn:0 -o+ -unsafe -r:System.Numerics.dll -langversion:latest ./Main.cs -out:./Main.exe mono ./Main.exe
Clojure (1.10.1.536) clojure -J-Xss{stack_size:mb}M ./Main.clj
Crystal (0.33.0) crystal build –release –no-debug –no-color -o ./a.out ./Main.cr ./a.out
D (DMD 2.091.0) bash -c ‘dmd -wi -m64 -O -release -inline -boundscheck=off -of=./a.out `dub list head -n-1
D (GDC 9.2.1) gdc -O2 -frelease -o ./a.out ./Main.d ./a.out
D (LDC 1.20.1) ldc2 -O -release -of ./a.out ./Main.d ./a.out
Dart (2.7.2) dart2native ./Main.dart -o ./a.out ./a.out
dc (1.4.1) dc -f ./Main.dc
Erlang (22.3) bash -c ‘erlc Main.erl 1>&2’ erl -noshell -run Main main run erlang halt
Elixir (1.10.2) bash -c ‘elixirc ./Main.ex -o . 1>&2’ elixir -pa . -e Main.main
F# (.NET Core 3.1.201) bash -c ‘cp ./Main.fs ./../fsharp/Program.fs && dotnet publish ./../fsharp -c Release -r ubuntu.18.04-x64 -o . -v q –nologo 1>&2’ ./fsharp
F# (Mono 10.2.3) fsharpc -O -o ./a.exe ./Main.fs mono ./a.exe
Forth (gforth 0.7.3) gforth-fast ./Main.fs -e bye
Fortran (GNU Fortran 9.2.1) gfortran -O2 -o ./a.out ./Main.f08 ./a.out
Go (1.14.1) go build -buildmode=exe -o ./a.out ./Main.go ./a.out
Haskell (GHC 8.8.3) ghc -o a.out -O2 ./Main ./a.out
Haxe (4.0.3); js haxe -cp . -main Main -js ./Main.js -lib hxnodejs node ./Main.js
Haxe (4.0.3); Java haxe -m Main -cp . –java . java -Xss{stack_size:mb}M -jar ./Main.jar
JavaScript (Node.js 12.16.1) node ./Main.js –stack-size={stack_size:kb}
Julia (1.4.0) bash -c ‘julia ./Main.jl ONLINE_JUDGE 2>/dev/null’ julia ./Main.jl
Kotlin (1.3.71) kotlinc ./Main.kt -include-runtime -d ./Main.jar -XXLanguage:+InlineClasses /usr/lib/jvm/java-11-openjdk-amd64/bin/java -cp ./Main.jar MainKt -Xss{stack_size:mb}m
Lua (Lua 5.3.5) luac -o ./luac.out ./Main.lua lua ./luac.out
Lua (LuaJIT 2.1.0) luajit -O3 -b ./Main.lua ./luac.out luajit -O3 ./luac.out
Dash (0.5.8) sh ./Main.sh
Nim (1.0.6) nim cpp -d:release –opt:speed –multimethods:on –warning[SmallLshouldNotBeUsed]:off –hints:off -o:./a.out ./Main.nim ./a.out
Objective-C (Clang 10.0.0) bash -c ‘clang $(gnustep-config –objc-flags) -I/usr/lib/gcc/x86_64-linux-gnu/7/include -o ./a.out ./Main.m $(gnustep-config –base-libs)’ ./a.out
Common Lisp (SBCL 2.0.3) sbcl –noinform –eval ‘(compile-file “./Main”)’ –quit sbcl –script ./Main.fasl
OCaml (4.10.0) bash -c ‘eval $(opam env) ocamlfind ocamlopt -O2 -o ./a.out ./Main.ml -linkpkg -thread -package str,num,threads,containers,core,iter,batteries’ ./a.out
Octave (5.2.0) flatpak run org.octave.Octave -W ./Main.m
Pascal (FPC 3.0.4) fpc -O2 -Sd -Sh -o./a.out ./Main.pas ./a.out
Perl (5.26.1) perl -W -c ./Main.pl perl -X ./Main.pl
Raku (Rakudo 2020.02.1) perl6 -c ./Main.p6 perl6 ./Main.p6
PHP (7.4.4) php -l ./Main.php php ./Main.php
Prolog (SWI-Prolog 8.0.3) swipl -O -g main -o ./Main -c ./Main.pl ./Main
PyPy2 (7.3.0) pypy ./Main.py
PyPy3 (7.3.0) pypy3 ./Main.py
Racket (7.6) raco exe -o ./a.out ./Main.rkt ./a.out
Ruby (2.7.1) ruby -w -c ./Main.rb bash -c ‘RUBY_THREAD_VM_STACK_SIZE={stack_size:b} ruby ./Main.rb’
Rust (1.42.0) bash -c ‘cp ./Main.rs ./../rust/src/main.rs && cargo build –release –offline –quiet –manifest-path=/imojudge/rust/Cargo.toml && cp ./../rust/target/release/main ./a.out’ ./a.out
Scala (2.13.1) bash -c ‘JAVACMD=/usr/lib/jvm/java-8-openjdk-amd64/bin/java scalac -opt:_ -opt-inline-from:'**’ -opt-warnings:_ -deprecation -d . ./Main.scala’ bash -c ‘JAVACMD=/usr/lib/jvm/java-8-openjdk-amd64/bin/java scala -J-Xss{stack_size:mb}M -classpath . Main’
Java (OpenJDK 1.8.0) /usr/lib/jvm/java-8-openjdk-amd64/bin/javac ./Main.java /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java -Xss{stack_size:mb}M Main
Scheme (Gauche 0.9.9) gosh precomp -e ./Main.scm gosh ./Main.scm
Standard ML (MLton 20130715) mlton -output ./a.out ./Main.sml ./a.out
Swift (5.2.1) swiftc -Ounchecked -o ./a.out ./Main.swift ./a.out
Text (cat 8.28) cat ./Main.txt
TypeScript (3.8) bash -c ‘ln -s /usr/lib/node_modules ./node_modules; tsc ./Main.ts –target ESNext –outDir . –moduleResolution node –module commonjs’ node ./Main.js –stack-size={stack_size:kb}
Visual Basic (.NET Core 3.1.101) bash -c ‘cp ./Main.vb ./../visualbasic/Program.vb && dotnet publish ./../visualbasic -c Release -r ubuntu.18.04-x64 -o . -v q –nologo 1>&2’ ./visualbasic
Zsh (5.4.2) zsh ./Main.sh
COBOL - Fixed (OpenCOBOL 1.1.0) cobc -x -O2 -o ./a.out ./Main.cob ./a.out
COBOL - Free (OpenCOBOL 1.1.0) cobc -x -free -O2 -o ./a.out ./Main.cob ./a.out
Brainfuck (bf 20041219) bf -c999999999 ./Main.bf
Ada2012 (GNAT 9.2.1) gnat-9 make -O3 -o ./a.out ./Main.adb ./a.out
Unlambda (2.0.0) unlambda ./Main.unl
Cython (0.29.16) bash -c ‘cython -3 –embed ./Main.pyx; gcc -O2 -fPIC -I/usr/include/python3.8 -I/usr/local/lib/python3.8/dist-packages/numpy/core/include -o ./a.out ./Main.c -lpython3.8’ ./a.out
Sed (4.4) sed -f ./Main.sed
Vim (8.2.0460) bash -c ‘cat - > /tmp/out; TERM=dumb vim -N -u NONE -i NONE -s ./Main.vim /tmp/out > /dev/null 2>&1; cat /tmp/out’

Language notes

When using C or C++, specify the type of main function as int and return 0;. When using Java, please set the class name to Main. Compiling error occurs in main.


About “state” of submission information

The program submitted by the user is evaluated by the judge system. The following describes the status (status) returned by the system. The following are all incorrect answers.

Label Status Explanation
CE Compilation Error Failed to compile the submitted program.
MLE Memory Limit Exceeded The memory limit specified in the problem has been exceeded.
TLE Time Limit Exceeded The program did not terminate within the execution time specified by the problem.
RE Runtime Error An error occurred while executing the program. There are errors that could not be detected at compile time, due to stack overflow, division by zero, etc.
OLE Output Limit Exceeded We made output of size exceeding the limit specified by problem.
QLE Query Limit Exceeded I have made a query that exceeds the limit specified in the problem.
NG No Good Internal error, ie judge system error.
IE Internal Error Internal error, ie judge system error.
WA Wrong Answer This is an incorrect answer. The output of the submitted program is incorrect.

AC is the only correct answer.

Label Status Explanation
AC Accepted It is correct answer. We passed all the tests prepared by the administration and it was judged to be the correct program.

Moreover, although it is not a wrong answer, it has the following status.

Label Status Explanation
JG Judging It is the state in the judge of the submitted program.
WJ Waiting for Judging) The submitted program is waiting for a judge.

In case there is a mistake in the problem, a rejudge (rejudge) may be performed and the following status will be taken.

Label Status Explanation
WR Waiting for Re-judging We are waiting for a rejudge.

Development environment

Please use the development environment, editor as you like.


TOPSIC Grade

There are 7 grades depending on the level of the examinee.
* These targets examination results you took with submission type “One-shot”.

Assumed rate TOPSIC grade Symbol name Symbol
TOP 1% Diamond
TOP 5% Ruby
TOP 10% Sapphire
TOP 30% Emerald
TOP 50% Gold
TOP 70% Silver
TOP 90% Bronze
- Zero