結果
問題 | No.892 タピオカ |
ユーザー | alchemin |
提出日時 | 2019-11-24 17:41:24 |
言語 | Rust (1.72.1) |
結果 |
AC
|
実行時間 | 1 ms / 1,000 ms |
コード長 | 1,669 bytes |
コンパイル時間 | 3,006 ms |
コンパイル使用メモリ | 144,476 KB |
実行使用メモリ | 4,384 KB |
最終ジャッジ日時 | 2023-08-02 09:29:10 |
合計ジャッジ時間 | 4,659 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge13 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
4,356 KB |
testcase_01 | AC | 1 ms
4,376 KB |
testcase_02 | AC | 1 ms
4,380 KB |
testcase_03 | AC | 1 ms
4,384 KB |
testcase_04 | AC | 1 ms
4,376 KB |
testcase_05 | AC | 1 ms
4,380 KB |
testcase_06 | AC | 1 ms
4,380 KB |
testcase_07 | AC | 1 ms
4,380 KB |
testcase_08 | AC | 0 ms
4,380 KB |
コンパイルメッセージ
warning: unused variable: `b2` --> Main.rs:57:13 | 57 | b2:i32, | ^^ help: if this is intentional, prefix it with an underscore: `_b2` | = note: `#[warn(unused_variables)]` on by default warning: unused variable: `b2` --> Main.rs:59:13 | 59 | b2:i32, | ^^ help: if this is intentional, prefix it with an underscore: `_b2` warning: unused variable: `b3` --> Main.rs:61:13 | 61 | b3:i32, | ^^ help: if this is intentional, prefix it with an underscore: `_b3` warning: 3 warnings emitted
ソースコード
macro_rules! input { (source = $s:expr, $($r:tt)*) => { let mut iter = $s.split_whitespace(); let mut next = || { iter.next().unwrap() }; input_inner!{next, $($r)*} }; ($($r:tt)*) => { let stdin = std::io::stdin(); let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock())); let mut next = move || -> String{ bytes .by_ref() .map(|r|r.unwrap() as char) .skip_while(|c|c.is_whitespace()) .take_while(|c|!c.is_whitespace()) .collect() }; input_inner!{next, $($r)*} }; } macro_rules! input_inner { ($next:expr) => {}; ($next:expr, ) => {}; ($next:expr, $var:ident : $t:tt $($r:tt)*) => { let $var = read_value!($next, $t); input_inner!{$next $($r)*} }; } macro_rules! read_value { ($next:expr, ( $($t:tt),* )) => { ( $(read_value!($next, $t)),* ) }; ($next:expr, [ $t:tt ; $len:expr ]) => { (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>() }; ($next:expr, chars) => { read_value!($next, String).chars().collect::<Vec<char>>() }; ($next:expr, usize1) => { read_value!($next, usize) - 1 }; ($next:expr, $t:ty) => { $next().parse::<$t>().expect("Parse error") }; } fn main(){ input!{ a1:i32, b2:i32, a2:i32, b2:i32, a3:i32, b3:i32, } let odd = a1%2 + a2%2 + a3%2; if odd == 0 || odd == 2 { println!(":-)"); } else { println!(":-("); } }