cp-rs

Crates.iocp-rs
lib.rscp-rs
version0.2.3
sourcesrc
created_at2022-11-27 14:05:11.725363
updated_at2022-11-28 09:37:23.562342
descriptionCompetitive programming library, especially for AoC
homepage
repositoryhttps://github.com/tectrixer/cp-rs
max_upload_size
id723746
size22,915
TecTrixer (tectrixer)

documentation

https://docs.rs/cp-rs

README

cp-rs

ci-workflow

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.

Usage Example

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();
    }
}

Features

  • 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

Commit count: 42

cargo fmt