My journey to competitive programming with Rust and AtCoder.
- install rust.
https://www.rust-lang.org/tools/install
-
add
$HOME/.cargo/bin/
to your$PATH
env. -
setup cargo-atocoder.
-
add proconio to default dependencies.
vi $HOME/Library/Application Support/cargo-atcoder.toml
# dependencies added to new project
[dependencies]
-# proconio = "*"
+proconio = "*"
# competitive = { git = "https://github.com/tanakh/competitive-rs.git" }
- add
.gitignore
file.
https://github.com/github/gitignore/blob/main/Rust.gitignore
# login
cargo atcoder login
# enter the contest
# e.g. $ cargo atcoder new abs
cargo atcoder new <contest-name>
# exec testcase
# e.g. $ cargo atcoder test practicea
cargo atcoder test <problem-id>
# exec binary
# e.g. $ cargo run --bin practicea
cargo run --bin <binary>
# submit answer
# e.g. $ cargo atcoder submit practicea
cargo atcoder submit <problem-id>