これはc++用のatcoderの自動テストツールです。
- g++(c++14)でコンパイルし実行。
- テストケースを全て試す。
- 自分の書いたコードの提出。
~/test_tool/code/ABC/abc129
$ ttest A
[1]
(入力)
1 3 4
(実際の出力)
4
(理想の出力)
4
---------- OK ----------
[2]
(入力)
3 2 3
(実際の出力)
5
(理想の出力)
5
---------- OK ----------
提出しますか?(y/n)
y
提出が完了しました!!!!!!!
こちらを参考にさせていただきました。
stdc++.hを作成しておいてください。
$ touch config.py$ open config.py- config.py
USERNAME = your_username PASSWORD = your_password
$ open ~/.bash_profile- bash_profile
alias ttest="python ../../../test.py" $ source ~/.bash_profile
-
~/test_tool で
$ python scraping.pyを実行し、コンテストのトップページのURLを入力する。$ python scraping.py .___________. _______ _______.___________. | || ____| / | | `---| |----`| |__ | (----`---| |----` | | | __| \ \ | | | | | |____.----) | | | |__| |_______|_______/ |__| コンテストのURLを入力してください。 url: https://atcoder.jp/contests/abc129 少々お待ちください。 100%|████████████████████████████████████████████████████| 11/11 [00:00<00:00, 14.15it/s] cd code/ABC/abc129 問題にとりかかってください。 -
$ cd code/{CONTEST_CATEGORY}/{CONTEST_NAME}$ cd code/ABC/abc132 -
必死こいてコードを書く。
-
$ ttest {LEVEL} [-wt] [-s] [-h]$ atcoder A -wt
$ ttest {LEVEL} [-wt] [-s] [-h]
問題の難易度(A, B, C, Dなど)を指定。
テストケースを通さずに実行。コンパイル、実行して入力待ちの状態になる。
テストケースを全てACした時、-wt オプション時に強制的に提出する。
$ ttest -h
usage: ttest [-h] [-wt] [-s] level
atcoder用のc++のコンパイルと実行の簡略化と自動テストと提出
positional arguments:
level A, B, C, D, E, Fなどの問題のレベル(大文字で)
optional arguments:
-h, --help show this help message and exit
-wt, --without_test テストケースを通さず、自分で入力をする
-s, --submit 提出の許可をいちいち取らない