ルール
- 参加資格
-
プログラミングに興味がある人なら誰でも参加できます。
- 人数
-
特に記載のない限り、各コンテストは個人で戦う必要があります。2人以上で結託し、解答する行為は禁止しております。
- 勝敗
-
制限時間以内に1問でも多く解いた人が優勝です。正答数が同じ場合は早く解いた人の方が上の順位になります。
- ペナルティ
-
不正解を提出するごとにつき、あなたの提出時間にペナルティがつきます。
注: ジャッジのステータスがコンパイルエラー(CE)のときはペナルティがつきません
時間 = 最後に正解した時間 + (正解するまでに提出した)不正解の数*5分
以下に例を挙げます。
時間[分:秒] 状態 04:33 A 正解 10:22 B 不正解 11:03 B 正解 CとDは提出せず この場合、最終スコアは2問正解で時間は16:03(11:03 + 5:00)となります
「(正解するまでに提出した)不正解の数」 とは以下の例を考えるとわかりやすいかもしれません。
時間[分:秒] 状態 02:05 A 正解 10:56 B 正解 31:03 C 不正解 45:37 C 不正解 51:43 C 不正解 88:22 D 正解 この場合、最終スコアは3問正解で時間は88:22となります。
C問題で3回不正解を出してますが、結局C問題を正解することはできなったので、ペナルティは加算されません。
- 言語
-
問題を解くためのプログラミング言語はAtCoderのシステムが対応しているものに限ります。以下は対応している言語を表にしたものです。
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 | tail -n+3 | awk "{print \"-I\" \\$3 \"source\"}" | xargs` ./Main.d' ./a.out 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' - ライブラリ
-
このページに各言語で使用可能なライブラリが記載されています。
- 並列化
-
実行時間は実時間とCPU時間の大きい方で計測されます。並列化は禁止されていませんが、実行時間を短くすることには繋がりません。
- 環境
-
開発環境、エディタはお好きなものをご利用ください。
また、コンテスト中の
- 自作ライブラリの使用
- インターネットでの検索
を認めております。ただし、後述にもあるように、ネタバレ行為は禁止しておりますのでお気をつけ下さい。
- その他
-
コンテスト中にネット上で問題のネタバレはご遠慮ください。また、他社サービスを使っての実況行為もネタバレにつながる可能性がございますのでご遠慮ください。
AtCoderのシステムに攻撃を加えることは禁止しております。詳しくは利用規約をご参照ください。
- コンテスト中におけるSNSの利用について
-
すべての人間に公開されている情報を投稿することは問題ありません。
- その時点での各問題に対するAC数
- First ACした人
- 「全完した」などの発言
-
コンテストの感想について
- 「面白かった」などの感想は問題ありません。
- しかし、「面白かった。A問題はox法を使って解いた」「ox法でA問題がTLEだった」「A問題はあることに気がつけば簡単だった」は、問題に言及する内容を含んでいるのでだめです。
-
投稿してはいけない内容について
- 解法に関する内容
- WAの回数、TLEの回数、テストケース数など。これらの情報はコンテスト終了まで公開されていません。
- 自分の問題に対する思考過程を書くこと。他者へのヒントとなりうるためです。お気をつけください。
- 自分で編集、編纂した問題文。問題文の一部だけを切り出したもの。例えば制約のみ書き込む行為など。
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:33 A CORRECT 10:22 B WRONG 11:03 B 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:05 A CORRECT 10:56 B CORRECT 31:03 C WRONG 45:37 C WRONG 51:43 C WRONG 88:22 D 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.
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 | tail -n+3 | awk "{print \"-I\" \\$3 \"source\"}" | xargs` ./Main.d' ./a.out 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' - 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:
- Use of original libraries
- 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.