Crates.io | cp-rs |
lib.rs | cp-rs |
version | 0.2.3 |
source | src |
created_at | 2022-11-27 14:05:11.725363 |
updated_at | 2022-11-28 09:37:23.562342 |
description | Competitive programming library, especially for AoC |
homepage | |
repository | https://github.com/tectrixer/cp-rs |
max_upload_size | |
id | 723746 |
size | 22,915 |
This library is intended to be used for competitive programming. It will be extended further and further with solutions to math, graph, geometry, ... problems in competitive programming. It also contains useful helpers for cp e.g. an io helper.
To read an integer and a float from each line in a file input.txt
you can write the following code:
use cp_rs::io::*;
fn main() {
let mut io = Io::from_file("input.txt");
for mut line in io.line_io() {
let (a, b): (u32, f32) = line.tuple();
}
}
General I/O handler
Utility for radix changes (will be reworked and put in the math module)
Utility for cryptographic functions
Utility for arbitrary precition ints + floats
Utility for random numbers
Support for graphs and graph algorithms
Support for math related algorithms / useful functions
Support for geometry related problems