Contest Duration: - (local time) (120 minutes) Back to Home

ルール


参加資格

プログラミングに興味がある人なら誰でも参加できます。

人数

特に記載のない限り、各コンテストは個人で戦う必要があります。2人以上で結託し、解答する行為は禁止しております。

勝敗

制限時間以内に1問でも多く解いた人が優勝です。正答数が同じ場合は早く解いた人の方が上の順位になります。

ペナルティ

不正解を提出するごとにつき、あなたの提出時間にペナルティがつきます。

注: ジャッジのステータスがコンパイルエラー(CE)のときはペナルティがつきません

時間 = 最後に正解した時間 + (正解するまでに提出した)不正解の数*5分

以下に例を挙げます。

時間[分:秒]状態
04:33A 正解
10:22B 不正解
11:03B 正解
CとDは提出せず

この場合、最終スコアは2問正解で時間は16:03(11:03 + 5:00)となります


「(正解するまでに提出した)不正解の数」 とは以下の例を考えるとわかりやすいかもしれません。

時間[分:秒]状態
02:05A 正解
10:56B 正解
31:03C 不正解
45:37C 不正解
51:43C 不正解
88:22D 正解

この場合、最終スコアは3問正解で時間は88:22となります。

C問題で3回不正解を出してますが、結局C問題を正解することはできなったので、ペナルティは加算されません。

言語

問題を解くためのプログラミング言語はAtCoderのシステムが対応しているものに限ります。以下は対応している言語を表にしたものです。

LanguageCompile / InterpreterExecution Command
C++ 20 (gcc 12.2)g++-12 -std=gnu++20 -O2 -DONLINE_JUDGE -DATCODER \
-Wall -Wextra \
-mtune=native -march=native \
-fconstexpr-depth=2147483647 -fconstexpr-loop-limit=2147483647 -fconstexpr-ops-limit=2147483647 \
-I/opt/ac-library -I/opt/boost/gcc/include -L/opt/boost/gcc/lib \
-o a.out Main.cpp \
-lgmpxx -lgmp \
-I/usr/include/eigen3

["./a.out"]
Go (go 1.20.6)export PATH=$PATH:/opt/go/bin
go build -o a.out
["./a.out"]
C# 11.0 (.NET 7.0.7)export DOTNET_EnableWriteXorExecute=0
dotnet publish -c Release -o publish -v q --nologo 1>&2
["./publish/Main"]
Kotlin (Kotlin/JVM 1.8.20)$HOME/.sdkman/candidates/kotlin/current/bin/kotlinc ./Main.kt -include-runtime -jvm-target 19 -d ./Main.jar
["/usr/lib/jvm/java-19-openjdk-amd64/bin/java","-cp","./Main.jar","-Xss{memory:mb}M","-DONLINE_JUDGE=true","MainKt"]
Java (OpenJDK 17)javac Main.java
["java","-Xss{memory:mb}M","-DONLINE_JUDGE=true","Main"]
Nim (Nim 1.6.14)export PATH=$HOME/.nimble/bin:$PATH
nim cpp -d:release --opt:speed --multimethods:on --warning[SmallLshouldNotBeUsed]:off --hints:off -o:a.out Main.nim
["./a.out"]
V (V 0.4)v -prod -cc clang -skip-unused -manualfree -prealloc -gc none -no-bounds-checking -o a.out Main.v
["./a.out"]
Zig (Zig 0.10.1)zig build
["./zig-out/bin/a.out"]
JavaScript (Node.js 18.16.1)node --check Main.js && touch ok
["node","--stack-size={memory:kb}","Main.js","ONLINE_JUDGE","ATCODER"]
JavaScript (Deno 1.35.1)export NO_COLOR=true
export PATH=$PATH:/home/runner/.deno/bin
export DENO_NO_UPDATE_CHECK=1

# キャッシュしつつ、import・構文などをチェック
if deno cache --quiet Main.js > check-output 2>&1 ; then
touch ok
else
cat check-output 1>&2
if grep -q "error sending request for url (http" check-output 2>/dev/null; then
# ライブラリをダウンロードしようとした場合はヒントを表示
echo "---" 1>&2
echo "Tips from the judge system: The only available external libraries are:" 1>&2
echo "- std@0.194.0" 1>&2
echo "- npm:mathjs@11.8.2" 1>&2
echo "Please make sure to specify the version number when importing." 1>&2
fi
fi
["deno","run","--allow-all","--quiet","--no-prompt","--v8-flags=--stack-size={memory:kb}","Main.js","ONLINE_JUDGE","ATCODER"]
R (GNU R 4.2.1)Rscript Main.R < /dev/null &> /dev/null
Rscript -e "parse('Main.R')" && touch a.out
["Rscript","Main.R"]
D (DMD 2.104.0)export DFLAGS="-O -release -boundscheck=off"
dub build --skip-registry=all --nodeps
["./judge"]
D (LDC 1.32.2)dub build --skip-registry=all --nodeps --build=release-nobounds
["./judge"]
Swift (swift 5.8.1)export PATH=/usr/local/swift/usr/bin:$PATH
swift build -Xswiftc -O -Xlinker -lm -c release 1>&2
["./.build/release/Main"]
Dart (Dart 3.0.5)dart compile exe Main.dart -o a.out
["./a.out"]
PHP (php 8.2.8)# チェックで問題が無かった場合OKファイルを生成
php -l Main.php && touch OK
["php","Main.php"]
C (gcc 12.2.0)gcc-12 -std=gnu2x -O2 -DONLINE_JUDGE -DATCODER -o a.out Main.c -lm
["./a.out"]
Ruby (ruby 3.2.2)ruby -c Main.rb && touch syntax_ok
["ruby","--jit","--yjit-exec-mem-size=128","Main.rb"]
Crystal (Crystal 1.9.1)cd main && shards build --release --no-debug --no-color -Donline_judge 1>&2
["./main/bin/main"]
Brainfuck (bf 20041219)["bf","-c999999999","Main.bf"]
F# 7.0 (.NET 7.0.7)export DOTNET_EnableWriteXorExecute=0
dotnet publish -c Release -o publish -v q --nologo 1>&2
["./publish/Main"]
Julia (Julia 1.9.2)export PATH=$PATH:/home/runner/.juliaup/bin
julia -e "Meta.parse(\"begin \" * read(\"Main.jl\",String) * \" end\")" && touch ok
julia Main.jl ONLINE_JUDGE 2> /dev/null
["julia","Main.jl"]
Bash (bash 5.2.2)bash -n Main.bash || rm Main.bash
["bash","Main.bash"]
Text (cat 8.32)["cat","Main.text"]
Haskell (GHC 9.4.5)cd submission
source ~/.ghcup/env
cabal v2-build --offline && cp $(cabal list-bin main) ../
["./main"]
Fortran (gfortran 12.2)export FFLAGS="-O2 -std=f2018"
cmake -B build -DCMAKE_BUILD_TYPE=NoConfig
cmake --build build
["./build/main"]
Lua (LuaJIT 2.1.0-beta3)luajit -O3 -b Main.lua luac.out
["luajit","-O3","luac.out"]
C++ 23 (gcc 12.2)g++-12 -std=gnu++2b -O2 -DONLINE_JUDGE -DATCODER \
-Wall -Wextra \
-mtune=native -march=native \
-fconstexpr-depth=2147483647 -fconstexpr-loop-limit=2147483647 -fconstexpr-ops-limit=2147483647 \
-I/opt/ac-library -I/opt/boost/gcc/include -L/opt/boost/gcc/lib \
-o a.out Main.cpp \
-lgmpxx -lgmp \
-I/usr/include/eigen3
["./a.out"]
Common Lisp (SBCL 2.3.6)export SBCL_HOME=/usr/local/lib/sbcl
./sbcl --noinform --eval '(compile-file "Main.lisp")' --quit
if [ -f Main.fasl ]; then
chmod +x Main.fasl
fi
["./Main.fasl"]
COBOL (Free) (GnuCOBOL 3.1.2)cobc -x -free -O2 -o ./a.out ./Main.cbl
["./a.out"]
C++ 23 (Clang 16.0.6)clang++ -std=c++2b -Wall -Wextra -O2 -DONLINE_JUDGE -DATCODER -mtune=native -march=native -fconstexpr-depth=2147483647 -fconstexpr-steps=2147483647 -I/opt/boost/clang/include -L/opt/boost/clang/lib -I/opt/ac-library -I/usr/include/eigen3 -fuse-ld=lld -o ./a.out ./Main.cpp
["./a.out"]
Zsh (Zsh 5.9)zsh -n Main.zsh || rm Main.zsh
["zsh","Main.zsh"]
SageMath (SageMath 9.5)sage --preparse Main.sage && python3 -m py_compile Main.sage.py || rm Main.sage.py
["python3","Main.sage.py"]
Sed (GNU sed 4.8)["sed","-f","Main.sed"]
bc (bc 1.07.1)["bc","--mathlib","Main.bc"]
dc (dc 1.07.1)["dc","-f","Main.dc"]
Perl (perl 5.34)perl -c Main.pl && touch ok
["perl","Main.pl"]
AWK (GNU Awk 5.0.1)["awk","-f","Main.awk"]
なでしこ (cnako3 3.4.20)cnako3 -c Main.nako3
["node","--stack-size={memory:kb}","Main.mjs"]
Assembly x64 (NASM 2.15.05)nasm -f elf64 Main.asm && gcc -o a.out Main.o -lm
["./a.out"]
Pascal (fpc 3.2.2)fpc -O2 -Sd -Sh -v0z -oa.out Main.p
["./a.out"]
C# 11.0 AOT (.NET 7.0.7)export DOTNET_EnableWriteXorExecute=0
dotnet publish -c Release -o publish -v q --nologo 1>&2
["./publish/Main"]
Lua (Lua 5.4.6)export PATH=$PATH:/judge/lua-5.4.6/src
luac -o luac.out Main.lua
["lua","luac.out"]
Prolog (SWI-Prolog 9.0.4)swipl -O -g main -o a.out -c Main.pl
# source 内で main :-
["./a.out"]
PowerShell (PowerShell 7.3.1)["pwsh","./Main.ps1"]
Scheme (Gauche 0.9.12)["gosh","./Main.scm"]
Scala 3.3.0 (Scala Native 0.4.14)cd main && sbt "set offline := true" nativeLink 1>&2
["./main/target/scala-3.3.0/main-out"]
Visual Basic 16.9 (.NET 7.0.7)export DOTNET_EnableWriteXorExecute=0
dotnet publish -c Release -o publish -v q --nologo 1>&2
["./publish/Main"]
Forth (gforth 0.7.3)["gforth-fast","Main.fs","-e","bye"]
Clojure (babashka 1.3.181)["bb","Main.clj"]
Erlang (Erlang 26.0.2)export PATH=/home/runner/.asdf/installs/erlang/26.0.2/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
erlc Main.erl 1>&2
["erl","-noshell","-run","Main","main","run"]
TypeScript 5.1 (Deno 1.35.1)export NO_COLOR=true
export DENO_NO_UPDATE_CHECK=1
export PATH=$PATH:/home/runner/.deno/bin

# キャッシュしつつ、import・型・構文などをチェック
if deno cache --quiet --check Main.ts > check-output 2>&1 ; then
touch ok
else
cat check-output 1>&2
if grep -q "error sending request for url (http" check-output 2>/dev/null; then
# ライブラリをダウンロードしようとした場合はヒントを表示
echo "---" 1>&2
echo "Tips from the judge system: The only available external libraries are:" 1>&2
echo "- std@0.194.0" 1>&2
echo "- npm:tstl@2.5.13" 1>&2
echo "- npm:mathjs@11.8.2" 1>&2
echo "Please make sure to specify the version number when importing." 1>&2
fi
fi
["deno","run","--allow-all","--quiet","--no-prompt","--v8-flags=--stack-size={memory:kb}","Main.ts","ONLINE_JUDGE","ATCODER"]
C++ 17 (gcc 12.2)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"]
Rust (rustc 1.70.0)cargo build --release --quiet --offline
["./target/release/main"]
Python (CPython 3.11.4)python3.11 -m py_compile Main.py
python3.11 Main.py ONLINE_JUDGE 2> /dev/null
["python3.11","Main.py"]
Scala (Dotty 3.3.0)scala-cli --power package --bloop-jvm system --jvm system -S 3.3.0 Main.scala -o Main --assembly 2>&1 | ansifilter 1>&2
["./Main"]
Koka (koka 2.4.0)koka -O2 -o a.out Main.kk 1>&2
if [ -f a.out ]; then chmod +x a.out; fi
["./a.out"]
TypeScript 5.1 (Node.js 18.16.1)tsc Main.ts --target ESNext --moduleResolution node --module commonjs --noEmitOnError --pretty true | ansifilter 1>&2
["node","--stack-size={memory:kb}","Main.js","ONLINE_JUDGE","ATCODER"]
OCaml (ocamlopt 5.0.0)eval $(opam env) ocamlfind ocamlopt -O2 -o a.out \
main.ml -linkpkg -thread \
-package str,num,threads,containers,core,iter,batteries
["./a.out"]
Raku (Rakudo 2023.06)export PATH=/opt/rakudo-pkg/bin:$PATH
export RAKUDO_ERROR_COLOR=0
raku -c Main.p6 && touch ok
["raku","Main.p6"]
Vim (vim 9.0.0242)["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"]
Emacs Lisp (Native Compile) (GNU Emacs 28.2)emacs --batch -f package-initialize --eval '(native-compile "Main.el" (expand-file-name "Main.eln"))'
["emacs","--batch","-f","package-initialize","-l","Main.eln"]
Python (Mambaforge / CPython 3.10.10)~/mambaforge/bin/python3.10 Main.py ONLINE_JUDGE 2> /dev/null
["/home/runner/mambaforge/bin/python3.10","Main.py"]
Clojure (clojure 1.11.1)["clojure","-J-Xss{memory:mb}M","-M","Main.clj"]
プロデル (mono版プロデル 1.9.1182)mono produire-mono/rdrc.exe /mono /console produire-mono/Main.rdr > compile-out
result=$(tail -1 compile-out)
if [ "$result" = "失敗しました。" ]; then
rm produire-mono/Main.exe
cat compile-out 1>&2
fi
["mono","produire-mono/Main.exe"]
ECLiPSe (ECLiPSe 7.1_13)export PATH=$PATH:/judge/eclipse/bin/x86_64_linux
echo "compile('Main.ecl', [output: eco, debug: off])" | eclipse -f Main.ecl
["eclipse","-f","Main.eco","-e","main"]
Nibbles (literate form) (nibbles 1.01)./nibbles -hs Main.nbl && ~/.ghcup/bin/ghcup --offline run --quick --ghc 8.10.7 -- ghc -O2 out.hs
["./out"]
Ada (GNAT 12.2)gnat make -O2 -o a.out Main.adb
["./a.out"]
jq (jq 1.6)["jq","-MrRs","-f","Main.jq"]
Cyber (Cyber v0.2-Latest)if cyber compile Main.cy > compile-out 2>&1; then
touch ok
else
cat compile-out 1>&2
fi
["cyber","Main.cy"]
Carp (Carp 0.5.5)export CARP_DIR=/opt/carp-v0.5.5-x86_64-linux
carp -b --optimize Main.carp 1>&2
["./out/Untitled"]
C++ 17 (Clang 16.0.6)clang++ -std=c++17 -Wall -Wextra -O2 -DONLINE_JUDGE -DATCODER -mtune=native -march=native -fconstexpr-depth=2147483647 -fconstexpr-steps=2147483647 -I/opt/boost/clang/include -L/opt/boost/clang/lib -I/opt/ac-library -I/usr/include/eigen3 -fuse-ld=lld -o ./a.out ./Main.cpp
["./a.out"]
C++ 20 (Clang 16.0.6)clang++ -std=c++20 -Wall -Wextra -O2 -DONLINE_JUDGE -DATCODER -mtune=native -march=native -fconstexpr-depth=2147483647 -fconstexpr-steps=2147483647 -I/opt/boost/clang/include -L/opt/boost/clang/lib -I/opt/ac-library -I/usr/include/eigen3 -fuse-ld=lld -o ./a.out ./Main.cpp
["./a.out"]
LLVM IR (Clang 16.0.6)clang-16 -O2 -o ./a.out ./Main.ll
["./a.out"]
Emacs Lisp (Byte Compile) (GNU Emacs 28.2)emacs --batch -f package-initialize -f batch-byte-compile Main.el
["emacs","--batch","-f","package-initialize","-l","Main.elc"]
Factor (Factor 0.98)["/opt/factor/factor","Main.factor"]
D (GDC 12.2)dub build --skip-registry=all --nodeps --build=release-nobounds
["./judge"]
Python (PyPy 3.10-v7.3.12)pypy3 -m py_compile Main.py
pypy3 Main.py ONLINE_JUDGE 2> /dev/null
["pypy3","Main.py"]
Whitespace (whitespacers 1.0.0)wsc --dump Main.dump Main.ws
["wsc","Main.ws"]
><> (fishr 0.1.0)["fishr","Main.fish"]
ReasonML (reason 3.9.0)cd main
eval $(opam env)
dune build --release
["./main/_build/default/bin/main.exe"]
Python (Cython 0.29.34)python3.11 -c "from Cython.Build import cythonize;from Cython.Compiler import Options;Options.embed='main';cythonize('Main.pyx', language='c++', compiler_directives={'language_level':'3'})"
g++ -Wno-deprecated-declarations -O2 -fPIC -I/usr/local/include/python3.11 -I$HOME/.local/lib/python3.11/site-packages/numpy/core/include -o a.out Main.cpp -lpython3.11
["./a.out"]
Octave (GNU Octave 8.2.0)octave -W --eval 'disp("Hello, world!")'
["octave","-W","Main.m"]
Haxe (JVM) (Haxe 4.3.1)export PATH=/opt/haxe_20230428195743_964c84c:$PATH
haxe -D analyzer-optimize --jvm Main.jar --main Main
["java","-jar","Main.jar"]
Elixir (Elixir 1.15.2)export PATH=/home/runner/.asdf/installs/erlang/26.0.2/bin:/opt/elixir/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
mix compile
["mix","run","-e","Main.main"]
Mercury (Mercury 22.01.6)mmc -o a.out -O 5 main
["./a.out"]
Seed7 (Seed7 3.2.1)s7c -O2 -oc3 Main.sd7 1>&2
["./Main"]
Emacs Lisp (No Compile) (GNU Emacs 28.2)["emacs","--batch","-f","package-initialize","-l","Main.el"]
Unison (Unison M5b)sh -c "echo 'load main.u'; sleep 5 ; echo 'add'" | /opt/ucm/ucm > compile-out
echo 'compile main main' | /opt/ucm/ucm
if [ ! -f main.uc ]; then
cat compile-out | ansifilter 1>&2
fi
["/opt/ucm/ucm","run.compiled","main.uc"]
COBOL (GnuCOBOL(Fixed) 3.1.2)cobc -x -O2 -o ./a.out ./Main.cbl
["./a.out"]
ライブラリ

このページに各言語で使用可能なライブラリが記載されています。

並列化

実行時間は実時間とCPU時間の大きい方で計測されます。並列化は禁止されていませんが、実行時間を短くすることには繋がりません。

環境

開発環境、エディタはお好きなものをご利用ください。

また、コンテスト中の

  1. 自作ライブラリの使用
  2. インターネットでの検索

を認めております。ただし、後述にもあるように、ネタバレ行為は禁止しておりますのでお気をつけ下さい。

その他

コンテスト中にネット上で問題のネタバレはご遠慮ください。また、他社サービスを使っての実況行為もネタバレにつながる可能性がございますのでご遠慮ください。

AtCoderのシステムに攻撃を加えることは禁止しております。詳しくは利用規約をご参照ください。

ジャッジ初回実行時のウォームアップのために1~2分ほどステータスがWJのままになることがあります。採点結果や順位表への影響はありませんのでご安心ください。5分以上更新されない場合にはClarにて該当提出を添えてお問い合わせください。

コンテスト中におけるSNSの利用について
すべての人間に公開されている情報を投稿することは問題ありません。
  1. その時点での各問題に対するAC数
  2. First ACした人
  3. 「全完した」などの発言
などは順位表から得られる情報であり、凍結されていない限り、順位表はすべての人に公開されているからです。
コンテストの感想について
  1. 「面白かった」などの感想は問題ありません。
  2. しかし、「面白かった。A問題はox法を使って解いた」「ox法でA問題がTLEだった」「A問題はあることに気がつけば簡単だった」は、問題に言及する内容を含んでいるのでだめです。
投稿してはいけない内容について
  1. 解法に関する内容
  2. WAの回数、TLEの回数、テストケース数など。これらの情報はコンテスト終了まで公開されていません。
  3. 自分の問題に対する思考過程を書くこと。他者へのヒントとなりうるためです。お気をつけください。
  4. 自分で編集、編纂した問題文。問題文の一部だけを切り出したもの。例えば制約のみ書き込む行為など。

Rules

Rules

Eligibility

Anyone who is interested in programming can join

Team or Individual

Unless otherwise specified, you must compete in a contest alone. We DO NOT allow you to team up form with others.

How we judge who the winner is

The contestant who gives successful solutions to the largest number of problems in a given time will be the winner. If there are multiple contestants who have solved the same number of problems, whoever has done so in shorter time will be in the higher place.

Penalty

Each time you submit a wrong answer, you will be penalized with penalty time.

NOTE: When Status of Judging is CE (compile error,) you will not be penalized.

Time = Time spent on the last problem you solved + the number of times you have submitted wrong answers until you solved the problem * 5 minutes

The following is an example.

Time [minute: second]Status
04:33A CORRECT
10:22B WRONG
11:03B CORRECT
C and D were not submitted

In this case, your ultimate score is 2 correct answers and Spent Time is 16:03(11:03 + 5:00).


Just to make sure, we will give you another example of "the number of times you have submitted wrong answers until you solved the problem" here.

Time [minute: second]Status
02:05A CORRECT
10:56B CORRECT
31:03C WRONG
45:37C WRONG
51:43C WRONG
88:22D CORRECT

In this case, the ultimate score is 3 correct answers and Spent Time is 88:22.

Although you have submitted wrong answers 3 times to the problem C, you did not submit the correct answer.Therefore, the penalty time will not be accumulated to the problem C.

Language

The list below is programming languages supported by AtCoder system. Please solve the problem using a supported language.

LanguageCompile / InterpreterExecution Command
C++ 20 (gcc 12.2)g++-12 -std=gnu++20 -O2 -DONLINE_JUDGE -DATCODER \
-Wall -Wextra \
-mtune=native -march=native \
-fconstexpr-depth=2147483647 -fconstexpr-loop-limit=2147483647 -fconstexpr-ops-limit=2147483647 \
-I/opt/ac-library -I/opt/boost/gcc/include -L/opt/boost/gcc/lib \
-o a.out Main.cpp \
-lgmpxx -lgmp \
-I/usr/include/eigen3

["./a.out"]
Go (go 1.20.6)export PATH=$PATH:/opt/go/bin
go build -o a.out
["./a.out"]
C# 11.0 (.NET 7.0.7)export DOTNET_EnableWriteXorExecute=0
dotnet publish -c Release -o publish -v q --nologo 1>&2
["./publish/Main"]
Kotlin (Kotlin/JVM 1.8.20)$HOME/.sdkman/candidates/kotlin/current/bin/kotlinc ./Main.kt -include-runtime -jvm-target 19 -d ./Main.jar
["/usr/lib/jvm/java-19-openjdk-amd64/bin/java","-cp","./Main.jar","-Xss{memory:mb}M","-DONLINE_JUDGE=true","MainKt"]
Java (OpenJDK 17)javac Main.java
["java","-Xss{memory:mb}M","-DONLINE_JUDGE=true","Main"]
Nim (Nim 1.6.14)export PATH=$HOME/.nimble/bin:$PATH
nim cpp -d:release --opt:speed --multimethods:on --warning[SmallLshouldNotBeUsed]:off --hints:off -o:a.out Main.nim
["./a.out"]
V (V 0.4)v -prod -cc clang -skip-unused -manualfree -prealloc -gc none -no-bounds-checking -o a.out Main.v
["./a.out"]
Zig (Zig 0.10.1)zig build
["./zig-out/bin/a.out"]
JavaScript (Node.js 18.16.1)node --check Main.js && touch ok
["node","--stack-size={memory:kb}","Main.js","ONLINE_JUDGE","ATCODER"]
JavaScript (Deno 1.35.1)export NO_COLOR=true
export PATH=$PATH:/home/runner/.deno/bin
export DENO_NO_UPDATE_CHECK=1

# キャッシュしつつ、import・構文などをチェック
if deno cache --quiet Main.js > check-output 2>&1 ; then
touch ok
else
cat check-output 1>&2
if grep -q "error sending request for url (http" check-output 2>/dev/null; then
# ライブラリをダウンロードしようとした場合はヒントを表示
echo "---" 1>&2
echo "Tips from the judge system: The only available external libraries are:" 1>&2
echo "- std@0.194.0" 1>&2
echo "- npm:mathjs@11.8.2" 1>&2
echo "Please make sure to specify the version number when importing." 1>&2
fi
fi
["deno","run","--allow-all","--quiet","--no-prompt","--v8-flags=--stack-size={memory:kb}","Main.js","ONLINE_JUDGE","ATCODER"]
R (GNU R 4.2.1)Rscript Main.R < /dev/null &> /dev/null
Rscript -e "parse('Main.R')" && touch a.out
["Rscript","Main.R"]
D (DMD 2.104.0)export DFLAGS="-O -release -boundscheck=off"
dub build --skip-registry=all --nodeps
["./judge"]
D (LDC 1.32.2)dub build --skip-registry=all --nodeps --build=release-nobounds
["./judge"]
Swift (swift 5.8.1)export PATH=/usr/local/swift/usr/bin:$PATH
swift build -Xswiftc -O -Xlinker -lm -c release 1>&2
["./.build/release/Main"]
Dart (Dart 3.0.5)dart compile exe Main.dart -o a.out
["./a.out"]
PHP (php 8.2.8)# チェックで問題が無かった場合OKファイルを生成
php -l Main.php && touch OK
["php","Main.php"]
C (gcc 12.2.0)gcc-12 -std=gnu2x -O2 -DONLINE_JUDGE -DATCODER -o a.out Main.c -lm
["./a.out"]
Ruby (ruby 3.2.2)ruby -c Main.rb && touch syntax_ok
["ruby","--jit","--yjit-exec-mem-size=128","Main.rb"]
Crystal (Crystal 1.9.1)cd main && shards build --release --no-debug --no-color -Donline_judge 1>&2
["./main/bin/main"]
Brainfuck (bf 20041219)["bf","-c999999999","Main.bf"]
F# 7.0 (.NET 7.0.7)export DOTNET_EnableWriteXorExecute=0
dotnet publish -c Release -o publish -v q --nologo 1>&2
["./publish/Main"]
Julia (Julia 1.9.2)export PATH=$PATH:/home/runner/.juliaup/bin
julia -e "Meta.parse(\"begin \" * read(\"Main.jl\",String) * \" end\")" && touch ok
julia Main.jl ONLINE_JUDGE 2> /dev/null
["julia","Main.jl"]
Bash (bash 5.2.2)bash -n Main.bash || rm Main.bash
["bash","Main.bash"]
Text (cat 8.32)["cat","Main.text"]
Haskell (GHC 9.4.5)cd submission
source ~/.ghcup/env
cabal v2-build --offline && cp $(cabal list-bin main) ../
["./main"]
Fortran (gfortran 12.2)export FFLAGS="-O2 -std=f2018"
cmake -B build -DCMAKE_BUILD_TYPE=NoConfig
cmake --build build
["./build/main"]
Lua (LuaJIT 2.1.0-beta3)luajit -O3 -b Main.lua luac.out
["luajit","-O3","luac.out"]
C++ 23 (gcc 12.2)g++-12 -std=gnu++2b -O2 -DONLINE_JUDGE -DATCODER \
-Wall -Wextra \
-mtune=native -march=native \
-fconstexpr-depth=2147483647 -fconstexpr-loop-limit=2147483647 -fconstexpr-ops-limit=2147483647 \
-I/opt/ac-library -I/opt/boost/gcc/include -L/opt/boost/gcc/lib \
-o a.out Main.cpp \
-lgmpxx -lgmp \
-I/usr/include/eigen3
["./a.out"]
Common Lisp (SBCL 2.3.6)export SBCL_HOME=/usr/local/lib/sbcl
./sbcl --noinform --eval '(compile-file "Main.lisp")' --quit
if [ -f Main.fasl ]; then
chmod +x Main.fasl
fi
["./Main.fasl"]
COBOL (Free) (GnuCOBOL 3.1.2)cobc -x -free -O2 -o ./a.out ./Main.cbl
["./a.out"]
C++ 23 (Clang 16.0.6)clang++ -std=c++2b -Wall -Wextra -O2 -DONLINE_JUDGE -DATCODER -mtune=native -march=native -fconstexpr-depth=2147483647 -fconstexpr-steps=2147483647 -I/opt/boost/clang/include -L/opt/boost/clang/lib -I/opt/ac-library -I/usr/include/eigen3 -fuse-ld=lld -o ./a.out ./Main.cpp
["./a.out"]
Zsh (Zsh 5.9)zsh -n Main.zsh || rm Main.zsh
["zsh","Main.zsh"]
SageMath (SageMath 9.5)sage --preparse Main.sage && python3 -m py_compile Main.sage.py || rm Main.sage.py
["python3","Main.sage.py"]
Sed (GNU sed 4.8)["sed","-f","Main.sed"]
bc (bc 1.07.1)["bc","--mathlib","Main.bc"]
dc (dc 1.07.1)["dc","-f","Main.dc"]
Perl (perl 5.34)perl -c Main.pl && touch ok
["perl","Main.pl"]
AWK (GNU Awk 5.0.1)["awk","-f","Main.awk"]
なでしこ (cnako3 3.4.20)cnako3 -c Main.nako3
["node","--stack-size={memory:kb}","Main.mjs"]
Assembly x64 (NASM 2.15.05)nasm -f elf64 Main.asm && gcc -o a.out Main.o -lm
["./a.out"]
Pascal (fpc 3.2.2)fpc -O2 -Sd -Sh -v0z -oa.out Main.p
["./a.out"]
C# 11.0 AOT (.NET 7.0.7)export DOTNET_EnableWriteXorExecute=0
dotnet publish -c Release -o publish -v q --nologo 1>&2
["./publish/Main"]
Lua (Lua 5.4.6)export PATH=$PATH:/judge/lua-5.4.6/src
luac -o luac.out Main.lua
["lua","luac.out"]
Prolog (SWI-Prolog 9.0.4)swipl -O -g main -o a.out -c Main.pl
# source 内で main :-
["./a.out"]
PowerShell (PowerShell 7.3.1)["pwsh","./Main.ps1"]
Scheme (Gauche 0.9.12)["gosh","./Main.scm"]
Scala 3.3.0 (Scala Native 0.4.14)cd main && sbt "set offline := true" nativeLink 1>&2
["./main/target/scala-3.3.0/main-out"]
Visual Basic 16.9 (.NET 7.0.7)export DOTNET_EnableWriteXorExecute=0
dotnet publish -c Release -o publish -v q --nologo 1>&2
["./publish/Main"]
Forth (gforth 0.7.3)["gforth-fast","Main.fs","-e","bye"]
Clojure (babashka 1.3.181)["bb","Main.clj"]
Erlang (Erlang 26.0.2)export PATH=/home/runner/.asdf/installs/erlang/26.0.2/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
erlc Main.erl 1>&2
["erl","-noshell","-run","Main","main","run"]
TypeScript 5.1 (Deno 1.35.1)export NO_COLOR=true
export DENO_NO_UPDATE_CHECK=1
export PATH=$PATH:/home/runner/.deno/bin

# キャッシュしつつ、import・型・構文などをチェック
if deno cache --quiet --check Main.ts > check-output 2>&1 ; then
touch ok
else
cat check-output 1>&2
if grep -q "error sending request for url (http" check-output 2>/dev/null; then
# ライブラリをダウンロードしようとした場合はヒントを表示
echo "---" 1>&2
echo "Tips from the judge system: The only available external libraries are:" 1>&2
echo "- std@0.194.0" 1>&2
echo "- npm:tstl@2.5.13" 1>&2
echo "- npm:mathjs@11.8.2" 1>&2
echo "Please make sure to specify the version number when importing." 1>&2
fi
fi
["deno","run","--allow-all","--quiet","--no-prompt","--v8-flags=--stack-size={memory:kb}","Main.ts","ONLINE_JUDGE","ATCODER"]
C++ 17 (gcc 12.2)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"]
Rust (rustc 1.70.0)cargo build --release --quiet --offline
["./target/release/main"]
Python (CPython 3.11.4)python3.11 -m py_compile Main.py
python3.11 Main.py ONLINE_JUDGE 2> /dev/null
["python3.11","Main.py"]
Scala (Dotty 3.3.0)scala-cli --power package --bloop-jvm system --jvm system -S 3.3.0 Main.scala -o Main --assembly 2>&1 | ansifilter 1>&2
["./Main"]
Koka (koka 2.4.0)koka -O2 -o a.out Main.kk 1>&2
if [ -f a.out ]; then chmod +x a.out; fi
["./a.out"]
TypeScript 5.1 (Node.js 18.16.1)tsc Main.ts --target ESNext --moduleResolution node --module commonjs --noEmitOnError --pretty true | ansifilter 1>&2
["node","--stack-size={memory:kb}","Main.js","ONLINE_JUDGE","ATCODER"]
OCaml (ocamlopt 5.0.0)eval $(opam env) ocamlfind ocamlopt -O2 -o a.out \
main.ml -linkpkg -thread \
-package str,num,threads,containers,core,iter,batteries
["./a.out"]
Raku (Rakudo 2023.06)export PATH=/opt/rakudo-pkg/bin:$PATH
export RAKUDO_ERROR_COLOR=0
raku -c Main.p6 && touch ok
["raku","Main.p6"]
Vim (vim 9.0.0242)["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"]
Emacs Lisp (Native Compile) (GNU Emacs 28.2)emacs --batch -f package-initialize --eval '(native-compile "Main.el" (expand-file-name "Main.eln"))'
["emacs","--batch","-f","package-initialize","-l","Main.eln"]
Python (Mambaforge / CPython 3.10.10)~/mambaforge/bin/python3.10 Main.py ONLINE_JUDGE 2> /dev/null
["/home/runner/mambaforge/bin/python3.10","Main.py"]
Clojure (clojure 1.11.1)["clojure","-J-Xss{memory:mb}M","-M","Main.clj"]
プロデル (mono版プロデル 1.9.1182)mono produire-mono/rdrc.exe /mono /console produire-mono/Main.rdr > compile-out
result=$(tail -1 compile-out)
if [ "$result" = "失敗しました。" ]; then
rm produire-mono/Main.exe
cat compile-out 1>&2
fi
["mono","produire-mono/Main.exe"]
ECLiPSe (ECLiPSe 7.1_13)export PATH=$PATH:/judge/eclipse/bin/x86_64_linux
echo "compile('Main.ecl', [output: eco, debug: off])" | eclipse -f Main.ecl
["eclipse","-f","Main.eco","-e","main"]
Nibbles (literate form) (nibbles 1.01)./nibbles -hs Main.nbl && ~/.ghcup/bin/ghcup --offline run --quick --ghc 8.10.7 -- ghc -O2 out.hs
["./out"]
Ada (GNAT 12.2)gnat make -O2 -o a.out Main.adb
["./a.out"]
jq (jq 1.6)["jq","-MrRs","-f","Main.jq"]
Cyber (Cyber v0.2-Latest)if cyber compile Main.cy > compile-out 2>&1; then
touch ok
else
cat compile-out 1>&2
fi
["cyber","Main.cy"]
Carp (Carp 0.5.5)export CARP_DIR=/opt/carp-v0.5.5-x86_64-linux
carp -b --optimize Main.carp 1>&2
["./out/Untitled"]
C++ 17 (Clang 16.0.6)clang++ -std=c++17 -Wall -Wextra -O2 -DONLINE_JUDGE -DATCODER -mtune=native -march=native -fconstexpr-depth=2147483647 -fconstexpr-steps=2147483647 -I/opt/boost/clang/include -L/opt/boost/clang/lib -I/opt/ac-library -I/usr/include/eigen3 -fuse-ld=lld -o ./a.out ./Main.cpp
["./a.out"]
C++ 20 (Clang 16.0.6)clang++ -std=c++20 -Wall -Wextra -O2 -DONLINE_JUDGE -DATCODER -mtune=native -march=native -fconstexpr-depth=2147483647 -fconstexpr-steps=2147483647 -I/opt/boost/clang/include -L/opt/boost/clang/lib -I/opt/ac-library -I/usr/include/eigen3 -fuse-ld=lld -o ./a.out ./Main.cpp
["./a.out"]
LLVM IR (Clang 16.0.6)clang-16 -O2 -o ./a.out ./Main.ll
["./a.out"]
Emacs Lisp (Byte Compile) (GNU Emacs 28.2)emacs --batch -f package-initialize -f batch-byte-compile Main.el
["emacs","--batch","-f","package-initialize","-l","Main.elc"]
Factor (Factor 0.98)["/opt/factor/factor","Main.factor"]
D (GDC 12.2)dub build --skip-registry=all --nodeps --build=release-nobounds
["./judge"]
Python (PyPy 3.10-v7.3.12)pypy3 -m py_compile Main.py
pypy3 Main.py ONLINE_JUDGE 2> /dev/null
["pypy3","Main.py"]
Whitespace (whitespacers 1.0.0)wsc --dump Main.dump Main.ws
["wsc","Main.ws"]
><> (fishr 0.1.0)["fishr","Main.fish"]
ReasonML (reason 3.9.0)cd main
eval $(opam env)
dune build --release
["./main/_build/default/bin/main.exe"]
Python (Cython 0.29.34)python3.11 -c "from Cython.Build import cythonize;from Cython.Compiler import Options;Options.embed='main';cythonize('Main.pyx', language='c++', compiler_directives={'language_level':'3'})"
g++ -Wno-deprecated-declarations -O2 -fPIC -I/usr/local/include/python3.11 -I$HOME/.local/lib/python3.11/site-packages/numpy/core/include -o a.out Main.cpp -lpython3.11
["./a.out"]
Octave (GNU Octave 8.2.0)octave -W --eval 'disp("Hello, world!")'
["octave","-W","Main.m"]
Haxe (JVM) (Haxe 4.3.1)export PATH=/opt/haxe_20230428195743_964c84c:$PATH
haxe -D analyzer-optimize --jvm Main.jar --main Main
["java","-jar","Main.jar"]
Elixir (Elixir 1.15.2)export PATH=/home/runner/.asdf/installs/erlang/26.0.2/bin:/opt/elixir/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
mix compile
["mix","run","-e","Main.main"]
Mercury (Mercury 22.01.6)mmc -o a.out -O 5 main
["./a.out"]
Seed7 (Seed7 3.2.1)s7c -O2 -oc3 Main.sd7 1>&2
["./Main"]
Emacs Lisp (No Compile) (GNU Emacs 28.2)["emacs","--batch","-f","package-initialize","-l","Main.el"]
Unison (Unison M5b)sh -c "echo 'load main.u'; sleep 5 ; echo 'add'" | /opt/ucm/ucm > compile-out
echo 'compile main main' | /opt/ucm/ucm
if [ ! -f main.uc ]; then
cat compile-out | ansifilter 1>&2
fi
["/opt/ucm/ucm","run.compiled","main.uc"]
COBOL (GnuCOBOL(Fixed) 3.1.2)cobc -x -O2 -o ./a.out ./Main.cbl
["./a.out"]
Library

This page shows a list of libraries available for each language.

Parallelization

Execution time is measured as the maximum of real time and CPU time. Parallelization is not prohibited, but it does not lead to shorter execution time.

Environment

You may use any development environment and editor at your choice.

Also, you are allow to do the following:

  1. Use of original libraries
  2. Web Search

As mentioned later, please note that we do not allow you to disclose the problem to other sources.

Other Rules

Do not disclose the problem on the Internet during the contest. Also refrain from reporting the contest on the spot as it might lead to the disclosure of the problem.

You are not allowed to attack AtCoder system. For more info, please refer our User Policy.

The status may remain WJ for 1~2 minutes to warm up the judges' initial run. If the status is not updated for more than 5 minutes, please contact us at Clar with the relevant submission.