1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
pub use std::io::{self, Write}; #[macro_export] macro_rules! numin { () =>{ {let mut input = String::new(); std::io::stdin() .read_line(&mut input) .expect("Failed to read line"); input.trim().parse().unwrap()} }; } #[macro_export] macro_rules! getchar { () =>{ {let mut input = String::new(); std::io::stdin() .read_line(&mut input) .expect("Failed to read line"); input.chars().nth(0).unwrap()} }; } #[macro_export] macro_rules! printf { ($($arg:tt)*) =>{ print!($($arg)*); io::stdout().flush().unwrap(); } }