結果
問題 | No.1004 サイコロの実装 (2) |
ユーザー | kaki |
提出日時 | 2020-03-06 23:09:39 |
言語 | Rust (1.77.0 + proconio) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,920 bytes |
コンパイル時間 | 12,181 ms |
コンパイル使用メモリ | 406,212 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-10-14 09:38:22 |
合計ジャッジ時間 | 13,625 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
5,248 KB |
testcase_01 | AC | 1 ms
5,248 KB |
testcase_02 | AC | 1 ms
5,248 KB |
testcase_03 | AC | 1 ms
5,248 KB |
testcase_04 | AC | 1 ms
5,248 KB |
testcase_05 | AC | 1 ms
5,248 KB |
testcase_06 | WA | - |
testcase_07 | AC | 1 ms
5,248 KB |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | AC | 1 ms
5,248 KB |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | WA | - |
testcase_17 | WA | - |
testcase_18 | WA | - |
testcase_19 | WA | - |
testcase_20 | WA | - |
testcase_21 | WA | - |
testcase_22 | WA | - |
testcase_23 | WA | - |
testcase_24 | WA | - |
testcase_25 | WA | - |
testcase_26 | WA | - |
testcase_27 | WA | - |
testcase_28 | WA | - |
testcase_29 | WA | - |
testcase_30 | WA | - |
testcase_31 | WA | - |
testcase_32 | WA | - |
testcase_33 | WA | - |
testcase_34 | WA | - |
testcase_35 | WA | - |
testcase_36 | WA | - |
testcase_37 | WA | - |
testcase_38 | WA | - |
testcase_39 | WA | - |
コンパイルメッセージ
warning: unused variable: `a` --> src/main.rs:81:9 | 81 | a: usize, | ^ | help: `a` is captured in macro and introduced a unused variable --> src/main.rs:31:13 | 31 | let $var = read_value!($iter, $t); | ^^^^ ... 80 | / input!{ 81 | | a: usize, 82 | | b: usize, 83 | | x0: usize, 84 | | N: usize, 85 | | } | |_____- in this macro invocation = note: `#[warn(unused_variables)]` on by default = note: this warning originates in the macro `input_inner` which comes from the expansion of the macro `input` (in Nightly builds, run with -Z macro-backtrace for more info) warning: unused variable: `b` --> src/main.rs:82:9 | 82 | b: usize, | ^ | help: `b` is captured in macro and introduced a unused variable --> src/main.rs:31:13 | 31 | let $var = read_value!($iter, $t); | ^^^^ ... 80 | / input!{ 81 | | a: usize, 82 | | b: usize, 83 | | x0: usize, 84 | | N: usize, 85 | | } | |_____- in this macro invocation = note: this warning originates in the macro `input_inner` which comes from the expansion of the macro `input` (in Nightly builds, run with -Z macro-backtrace for more info)
ソースコード
#![allow(non_snake_case)] #![allow(dead_code)] #![allow(unused_macros)] #![allow(unused_imports)] use std::cmp::*; use std::collections::*; macro_rules! input { (source = $s:expr, $($r:tt)*) => { let mut iter = $s.split_whitespace(); input_inner!{iter, $($r)*} }; ($($r:tt)*) => { let s = { use std::io::Read; let mut s = String::new(); std::io::stdin().read_to_string(&mut s).unwrap(); s }; let mut iter = s.split_whitespace(); input_inner!{iter, $($r)*} }; } macro_rules! input_inner { ($iter:expr) => {}; ($iter:expr, ) => {}; ($iter:expr, $var:ident : $t:tt $($r:tt)*) => { let $var = read_value!($iter, $t); input_inner!{$iter $($r)*} }; ($iter:expr, mut $var:ident : $t:tt $($r:tt)*) => { let mut $var = read_value!($iter, $t); input_inner!{$iter $($r)*} } } macro_rules! read_value { ($iter:expr, ( $($t:tt),* )) => { ( $(read_value!($iter, $t)),* ) }; ($iter:expr, [ $t:tt ; $len:expr ]) => { (0..$len).map(|_| read_value!($iter, $t)).collect::<Vec<_>>() }; ($iter:expr, chars) => { read_value!($iter, String).chars().collect::<Vec<char>>() }; ($iter:expr, usize1) => { read_value!($iter, usize) - 1 }; ($iter:expr, $t:ty) => { $iter.next().unwrap().parse::<$t>().expect("Parse error") }; } macro_rules! chmax { ($x:expr, $e:expr) => { if $x < $e { $x = $e; } }; } macro_rules! chmin { ($x:expr, $e:expr) => { if $x > $e { $x = $e; } }; } const INF: i64 = 1 << 60; fn main() { input!{ a: usize, b: usize, x0: usize, N: usize, } if x0 % 2 != 0 { println!("{} {}", 0, N/2); } else { println!("{} {}", N/2, 0); } }