1#[macro_export]
6macro_rules! get {
7 (parse, $val:expr, usize1) => {(get!(parse, $val, usize) - 1)};
8 (parse, $val:expr, chars) => {get!(parse, $val, String).chars().collect::<Vec<_>>()};
9 (parse, $val:expr, $t:ty) => {$val.parse::<$t>().unwrap()};
10 ($p:tt) => {{
11 let mut line = String::new();
12 std::io::stdin().read_line(&mut line).ok();
13 get!(parse, line.trim(), $p)
14 }};
15 ($($p:tt),*) => {{
16 let mut line = String::new();
17 std::io::stdin().read_line(&mut line).ok();
18 let mut iter = line.split_whitespace();
19 ( $(get!(parse, iter.next().unwrap(), $p),)* )
20 }};
21 ($t:tt ; $n:expr) => {(0..$n).map(|_| get!($t)).collect::<Vec<_>>()};
22 ($($t:tt),* ; $n:expr) => {(0..$n).map(|_| get!($($t),*)).collect::<Vec<_>>()};
23 ($t:tt ;;) => {{
24 let mut line = String::new();
25 std::io::stdin().read_line(&mut line).ok();
26 line.split_whitespace().map(|v| get!(parse, v, $t)).collect::<Vec<_>>()
27 }};
28 ($t:tt ;; $n:expr) => {(0..$n).map(|_| get!($t ;;)).collect::<Vec<_>>()};
29}