Macro cp_tricks::input [−][src]
macro_rules! input { (source = $s:expr, $($r:tt)*) => { ... }; ($($r:tt)*) => { ... }; }
Expand description
input
macro for parsing input from all CP platforms
Examples
ⓘ
input! { source = s, t: usize, k: [(usize, usize); t] }
Omit source when submitting, while developing, you can save the input in file and use this
use std::fs::File; use std::io::Read; let mut sc = File::open("test.txt").unwrap(); let mut s= String::new(); sc.read_to_string(&mut s).unwrap();