pub mod ut { #[inline] pub fn read_string() -> String { let mut buf = String::new(); std::io::stdin().read_line(&mut buf).unwrap(); buf.trim().to_string() } #[inline] pub fn read_single() -> T where T: std::str::FromStr, ::Err: std::fmt::Debug, { let buf = read_string(); buf.parse().unwrap() } #[inline] pub fn read_vector() -> Vec where T: std::str::FromStr, ::Err: std::fmt::Debug, { read_string() .split_ascii_whitespace() .map(|e| e.parse().unwrap()) .collect() } #[inline] pub fn read_two_values() -> (T, T) where T: std::str::FromStr + Copy, ::Err: std::fmt::Debug, { let v = read_vector(); (v[0], v[1]) } } fn main() { let (a, b) = ut::read_two_values::(); let s = ut::read_string(); println!("{} {}", a + b, s); }