5 releases

0.2.3 Nov 28, 2022
0.2.2 Nov 27, 2022
0.2.1 Nov 27, 2022
0.2.0 Nov 27, 2022
0.1.0 Nov 27, 2022

#1421 in Algorithms

MIT license

21KB
311 lines

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

Dependencies

~2.1–3MB
~54K SLoC