Crates.io | kattis-rs |
lib.rs | kattis-rs |
version | 1.6.6 |
source | src |
created_at | 2020-09-03 15:55:06.711777 |
updated_at | 2023-08-30 17:24:35.187393 |
description | Competitive programming checker for open.kattis.com |
homepage | https://github.com/marcelroed/ |
repository | https://github.com/marcelroed/kattis-rs |
max_upload_size | |
id | 284291 |
size | 118,751 |
A simple automated problem tester for problems on the Kattis Problem Archive.
Tests and submits Kattis competitive programming problems.
Usage: kattis [OPTIONS] [PROBLEM]...
Arguments:
[PROBLEM]...
Paths of files to test or no arguments.
Filenames should be of the format {problem}.{ext} where {problem} can be found from the url of the kattis problem at open.kattis.com/problems/{problem}.
If left empty, the problem to run will be inferred by looking for the latest edited valid source file in the working directory.
Options:
-s, --submit
If flag is set, all successful problems will be submitted.
-f, --force
Force submission even if submitted problems don't pass local tests.
-r, --recurse <DEPTH>
Number of directory levels to recurse into when searching for problem solutions.
[default: 1]
--submission-viewer <submission-viewer>
Viewer to use for submission.
[default: cli]
Possible values:
- cli: Display updated results in the CLI, blocking until submission has finished
- browser: Open a new browser window showing the submission and terminate program
- none: Just terminate, ignoring submission result
-h, --help
Print help (see a summary with '-h')
-V, --version
Print version
The simplest use case for the CLI is when you want to test and submit the latest edited file in a directory:
$ kattis -s
This command will find the latest edited valid file in the current directory and test it using input and output from www.open.kattis.com, then submit it if it passes.
First install the Rust toolchain using rustup. This will also install Cargo.
$ cargo install kattis-rs
The installation path will show up after installation.
Add it to your PATH
by adding the cargo binary directory to PATH
(usually $HOME/.cargo/bin
).
kattis-rs
is only tested on macOS and Linux, but should work on Windows.