結果

問題 No.5006 Hidden Maze
ユーザー ntk-ta01ntk-ta01
提出日時 2022-06-12 14:22:22
言語 Rust
(1.77.0)
結果
AC  
実行時間 49 ms / 2,000 ms
コード長 1,957 bytes
コンパイル時間 783 ms
実行使用メモリ 22,876 KB
スコア 0
平均クエリ数 1001.00
最終ジャッジ日時 2022-06-12 14:22:34
合計ジャッジ時間 9,455 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
純コード判定しない問題か言語
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
22,228 KB
testcase_01 AC 43 ms
21,904 KB
testcase_02 AC 43 ms
21,904 KB
testcase_03 AC 43 ms
21,952 KB
testcase_04 AC 44 ms
21,928 KB
testcase_05 AC 45 ms
21,964 KB
testcase_06 AC 45 ms
21,928 KB
testcase_07 AC 44 ms
22,204 KB
testcase_08 AC 43 ms
22,216 KB
testcase_09 AC 43 ms
22,624 KB
testcase_10 AC 43 ms
22,072 KB
testcase_11 AC 46 ms
22,264 KB
testcase_12 AC 47 ms
22,620 KB
testcase_13 AC 48 ms
21,940 KB
testcase_14 AC 47 ms
21,904 KB
testcase_15 AC 47 ms
22,300 KB
testcase_16 AC 47 ms
22,456 KB
testcase_17 AC 45 ms
22,016 KB
testcase_18 AC 44 ms
22,228 KB
testcase_19 AC 46 ms
21,952 KB
testcase_20 AC 43 ms
21,940 KB
testcase_21 AC 43 ms
21,940 KB
testcase_22 AC 43 ms
21,904 KB
testcase_23 AC 44 ms
22,276 KB
testcase_24 AC 44 ms
22,624 KB
testcase_25 AC 43 ms
21,952 KB
testcase_26 AC 47 ms
22,004 KB
testcase_27 AC 44 ms
22,264 KB
testcase_28 AC 44 ms
22,456 KB
testcase_29 AC 44 ms
22,216 KB
testcase_30 AC 44 ms
21,904 KB
testcase_31 AC 44 ms
21,964 KB
testcase_32 AC 44 ms
22,636 KB
testcase_33 AC 44 ms
21,848 KB
testcase_34 AC 44 ms
21,780 KB
testcase_35 AC 44 ms
22,456 KB
testcase_36 AC 47 ms
21,916 KB
testcase_37 AC 48 ms
21,940 KB
testcase_38 AC 45 ms
22,240 KB
testcase_39 AC 43 ms
21,952 KB
testcase_40 AC 43 ms
22,588 KB
testcase_41 AC 42 ms
21,904 KB
testcase_42 AC 43 ms
22,016 KB
testcase_43 AC 43 ms
22,588 KB
testcase_44 AC 44 ms
22,704 KB
testcase_45 AC 43 ms
22,612 KB
testcase_46 AC 43 ms
21,952 KB
testcase_47 AC 44 ms
22,468 KB
testcase_48 AC 45 ms
21,916 KB
testcase_49 AC 44 ms
22,004 KB
testcase_50 AC 43 ms
21,940 KB
testcase_51 AC 44 ms
21,916 KB
testcase_52 AC 45 ms
22,588 KB
testcase_53 AC 44 ms
21,904 KB
testcase_54 AC 43 ms
22,876 KB
testcase_55 AC 44 ms
22,588 KB
testcase_56 AC 45 ms
21,928 KB
testcase_57 AC 46 ms
21,768 KB
testcase_58 AC 46 ms
21,904 KB
testcase_59 AC 45 ms
22,456 KB
testcase_60 AC 43 ms
22,444 KB
testcase_61 AC 43 ms
21,892 KB
testcase_62 AC 43 ms
22,276 KB
testcase_63 AC 43 ms
22,204 KB
testcase_64 AC 43 ms
22,228 KB
testcase_65 AC 44 ms
22,636 KB
testcase_66 AC 43 ms
22,468 KB
testcase_67 AC 43 ms
21,796 KB
testcase_68 AC 44 ms
22,588 KB
testcase_69 AC 45 ms
22,228 KB
testcase_70 AC 44 ms
21,792 KB
testcase_71 AC 43 ms
22,552 KB
testcase_72 AC 43 ms
21,796 KB
testcase_73 AC 43 ms
21,904 KB
testcase_74 AC 44 ms
22,456 KB
testcase_75 AC 43 ms
21,916 KB
testcase_76 AC 43 ms
22,600 KB
testcase_77 AC 46 ms
21,964 KB
testcase_78 AC 49 ms
21,904 KB
testcase_79 AC 46 ms
22,620 KB
testcase_80 AC 44 ms
21,904 KB
testcase_81 AC 44 ms
22,468 KB
testcase_82 AC 44 ms
22,620 KB
testcase_83 AC 43 ms
21,904 KB
testcase_84 AC 45 ms
22,016 KB
testcase_85 AC 44 ms
21,940 KB
testcase_86 AC 44 ms
21,892 KB
testcase_87 AC 44 ms
21,904 KB
testcase_88 AC 43 ms
21,952 KB
testcase_89 AC 43 ms
22,620 KB
testcase_90 AC 42 ms
22,228 KB
testcase_91 AC 43 ms
21,916 KB
testcase_92 AC 44 ms
22,876 KB
testcase_93 AC 44 ms
22,612 KB
testcase_94 AC 45 ms
22,276 KB
testcase_95 AC 44 ms
21,952 KB
testcase_96 AC 43 ms
21,904 KB
testcase_97 AC 43 ms
22,228 KB
testcase_98 AC 44 ms
22,276 KB
testcase_99 AC 44 ms
22,576 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
warning: unused variable: `input`
  --> Main.rs:51:9
   |
51 |     let input = parse_input();
   |         ^^^^^ help: if this is intentional, prefix it with an underscore: `_input`
   |
   = note: `#[warn(unused_variables)]` on by default

warning: constant is never used: `TIMELIMIT`
  --> Main.rs:40:1
   |
40 | const TIMELIMIT: f64 = 1.935;
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: `#[warn(dead_code)]` on by default

warning: constant is never used: `DIJ`
  --> Main.rs:41:1
   |
41 | const DIJ: [(usize, usize); 4] = [(0, !0), (!0, 0), (0, 1), (1, 0)];
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: constant is never used: `DIR`
  --> Main.rs:42:1
   |
42 | const DIR: [char; 4] = ['L', 'U', 'R', 'D'];
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: field is never read: `h`
  --> Main.rs:45:5
   |
45 |     pub h: usize,
   |     ^^^^^^^^^^^^

warning: field is never read: `w`
  --> Main.rs:46:5
   |
46 |     pub w: usize,
   |     ^^^^^^^^^^^^

warning: field is never read: `p`
  --> Main.rs:47:5
   |
47 |     pub p: usize,
   |     ^^^^^^^^^^^^

warning: 7 warnings emitted

ソースコード

diff #

macro_rules! input {
    ($($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:tt ]) => {{
        let len = read_value!($next, usize);
        read_value!($next, [$t; len])
    }};
    ($next:expr, $t:ty) => ($next().parse::<$t>().expect("Parse error"));
}

const TIMELIMIT: f64 = 1.935;
const DIJ: [(usize, usize); 4] = [(0, !0), (!0, 0), (0, 1), (1, 0)];
const DIR: [char; 4] = ['L', 'U', 'R', 'D'];

struct Input {
    pub h: usize,
    pub w: usize,
    pub p: usize,
}

fn main() {
    let input = parse_input();
    loop {
        println!("DDDDDDDDDDDDDDDDDDDRRRRRRRRRRRRRRRRRRR");
        let feed = {
            let mut s = String::new();
            std::io::stdin().read_line(&mut s).unwrap();
            let s = s.trim();
            s.parse::<i32>().unwrap()
        };
        if feed == -1 {
            break;
        }
    }
}

fn parse_input() -> Input {
    input!{
        h: usize,
        w: usize,
        p: usize,
    }
    Input { h, w, p }
}
0