miwpayou0808の練習用
- yarn
- npmも
- atcoder-cliを使用するため
- python
- pyenvとpoetryも
- online-judge-tools/ojのためと、解くよう
- お好きな言語環境(上記以外)
yarn install --pure-lockfile
pyenv install $(cat .python-version)
poetry env use "${HOME}/.pyenv/versions/$(cat .python-version)/bin/python"
poetry install
yarn run acc config oj-path $(poetry env info --path)/bin/oj
yarn run acc login
$contest_name
はabc190
とかatcoder-cli
が認識できるやつ
yarn run acc new $contest_name
$task_dir
は$contest_name/a
とか
python以外での実行はoj/getting-started.ja.md at master · online-judge-tools/oj参照
cd $task_dir
touch main.py # write some code
mv tests test
# test with oj
poetry run oj t -c "python main.py"
# submit with atcoder-cli
yarn run acc submit -c abc194 -t abc194_c $(readlink -f main.py)