cforces-rs is a template project for writing contests and solving problems in Rust on competitive programming contest websites.
The project mainly uses just - simpler alternative to make.
Main features include:
- Input/output in Rust - see
src/template.rs. - Common algorithms and data structures - see
src/lib/. - Creating new source files and text input/output files - see
just init. - Automatic backup of old solutions - see
just save|reinit|restore. - Testing solutions - see
just run.
- Codeforces -
cforces - AtCoder -
atcoder - Leetcode -
leetcode - Other - recommended to use
cforcesconfiguration
- Install Rust.
- Install just with
cargo install just. - (Opt.) Add
~/.cargo/bin/to yourPATH. - Clone this repo.
just config <site>. See supported <site>s.
just init.- Write your solution in
main.rs. - (Opt) Use lib functions or data structures from
src/lib/by copying and pasting. - (Opt) Paste tests in
input/*.inandinput/*.out, test withjust run. - Upload your solution.
just re <problem_id>and go back to 2.
just --list or see doc comments in the justfile for more details
- Expand
src/lib/- check out Rust algorithms by EbTech. - Fully automate testing of solutions, including Leetcode