#competitive-programming #io-operations #stdin #numerical #input #end #values

comp-io

A crate for optimized io operations to numerical types

3 releases

0.1.2 Oct 5, 2024
0.1.1 Sep 26, 2024
0.1.0 Sep 26, 2024

#3 in #end

Download history 265/week @ 2024-09-23 202/week @ 2024-09-30 58/week @ 2024-10-07 51/week @ 2024-10-14 47/week @ 2024-11-04

102 downloads per month

MIT license

9KB
151 lines

A Rust library for competitive programming to make io operations simpler.

The comp-io crate provides methods to read numerical values, as well as chars from stdin

Usage

The usage of comp-io typically looks like this:

let mut reader = comp_io::Reader::new();

let num1: i32 = reader.next_i32().unwrap();
let num2: f64 = reader.next_f64().unwrap();

println!("read: {num1} {num2}");

Note: The Reader struct expects an EOF at the end of input. To enter this in the terminal, press CTRL + D


lib.rs:

Comp IO

comp_io is a collection of utilities centered around the Reader struct to make competitive programming easier to write

No runtime deps