Skip to content

Instantly share code, notes, and snippets.

@wadro
wadro / RUST_ps.rs
Created February 1, 2024 13:33 — forked from bivoje/RUST_ps.rs
Collection of rust code snippet for problem solving
// IMPL:parse_line
macro_rules! parse_line { ($($t: ty),+) => ({
let mut line = String::new();
std::io::stdin().read_line(&mut line).unwrap();
let mut iter = line.split_whitespace();
($(iter.next().unwrap().parse::<$t>().unwrap()),+)
})}
// IMPL:parse_list