結果

問題 No.5017 Tool-assisted Shooting
ユーザー gobi_503gobi_503
提出日時 2023-07-16 14:13:30
言語 Rust
(1.77.0)
結果
RE  
実行時間 -
コード長 2,708 bytes
コンパイル時間 7,348 ms
コンパイル使用メモリ 155,876 KB
実行使用メモリ 24,408 KB
スコア 74,830
平均クエリ数 399.74
最終ジャッジ日時 2023-07-16 14:13:46
合計ジャッジ時間 12,937 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
23,616 KB
testcase_01 RE -
testcase_02 AC 30 ms
24,000 KB
testcase_03 AC 28 ms
24,012 KB
testcase_04 AC 36 ms
23,652 KB
testcase_05 AC 35 ms
24,300 KB
testcase_06 AC 29 ms
24,012 KB
testcase_07 AC 38 ms
24,012 KB
testcase_08 AC 30 ms
23,628 KB
testcase_09 AC 32 ms
23,364 KB
testcase_10 AC 38 ms
23,664 KB
testcase_11 AC 32 ms
24,036 KB
testcase_12 AC 28 ms
24,024 KB
testcase_13 AC 32 ms
24,240 KB
testcase_14 AC 32 ms
24,276 KB
testcase_15 AC 29 ms
23,424 KB
testcase_16 AC 28 ms
23,364 KB
testcase_17 RE -
testcase_18 RE -
testcase_19 AC 31 ms
24,024 KB
testcase_20 AC 34 ms
23,688 KB
testcase_21 AC 35 ms
23,364 KB
testcase_22 AC 39 ms
24,036 KB
testcase_23 AC 28 ms
23,388 KB
testcase_24 AC 38 ms
23,820 KB
testcase_25 AC 32 ms
24,276 KB
testcase_26 AC 39 ms
23,640 KB
testcase_27 RE -
testcase_28 AC 33 ms
24,012 KB
testcase_29 AC 32 ms
23,400 KB
testcase_30 AC 36 ms
24,360 KB
testcase_31 AC 28 ms
23,640 KB
testcase_32 AC 31 ms
23,604 KB
testcase_33 AC 32 ms
23,640 KB
testcase_34 RE -
testcase_35 AC 30 ms
23,496 KB
testcase_36 AC 40 ms
23,532 KB
testcase_37 AC 35 ms
23,400 KB
testcase_38 AC 29 ms
23,388 KB
testcase_39 RE -
testcase_40 AC 37 ms
23,844 KB
testcase_41 AC 28 ms
23,352 KB
testcase_42 AC 46 ms
24,336 KB
testcase_43 AC 45 ms
24,264 KB
testcase_44 AC 28 ms
24,372 KB
testcase_45 AC 32 ms
24,024 KB
testcase_46 RE -
testcase_47 AC 33 ms
23,364 KB
testcase_48 RE -
testcase_49 RE -
testcase_50 AC 32 ms
24,252 KB
testcase_51 RE -
testcase_52 RE -
testcase_53 AC 33 ms
24,252 KB
testcase_54 AC 30 ms
23,424 KB
testcase_55 AC 43 ms
23,364 KB
testcase_56 AC 28 ms
24,324 KB
testcase_57 RE -
testcase_58 AC 49 ms
24,036 KB
testcase_59 AC 29 ms
24,276 KB
testcase_60 AC 44 ms
24,252 KB
testcase_61 RE -
testcase_62 RE -
testcase_63 AC 30 ms
23,508 KB
testcase_64 AC 28 ms
24,348 KB
testcase_65 RE -
testcase_66 AC 33 ms
23,364 KB
testcase_67 AC 30 ms
23,640 KB
testcase_68 AC 36 ms
23,364 KB
testcase_69 AC 33 ms
23,652 KB
testcase_70 AC 28 ms
23,508 KB
testcase_71 AC 37 ms
23,508 KB
testcase_72 AC 29 ms
23,484 KB
testcase_73 RE -
testcase_74 AC 32 ms
23,640 KB
testcase_75 AC 30 ms
23,520 KB
testcase_76 AC 33 ms
24,384 KB
testcase_77 AC 36 ms
23,412 KB
testcase_78 AC 33 ms
24,336 KB
testcase_79 AC 40 ms
23,496 KB
testcase_80 AC 32 ms
23,616 KB
testcase_81 AC 35 ms
23,400 KB
testcase_82 AC 33 ms
23,844 KB
testcase_83 AC 31 ms
24,012 KB
testcase_84 AC 28 ms
23,376 KB
testcase_85 AC 27 ms
23,364 KB
testcase_86 AC 34 ms
23,640 KB
testcase_87 AC 30 ms
24,012 KB
testcase_88 AC 28 ms
24,324 KB
testcase_89 AC 33 ms
23,832 KB
testcase_90 AC 31 ms
23,520 KB
testcase_91 AC 28 ms
23,376 KB
testcase_92 RE -
testcase_93 AC 28 ms
24,348 KB
testcase_94 AC 35 ms
23,820 KB
testcase_95 RE -
testcase_96 AC 49 ms
23,628 KB
testcase_97 AC 29 ms
23,520 KB
testcase_98 AC 28 ms
23,844 KB
testcase_99 AC 30 ms
23,400 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
warning: unused variable: `i`
  --> Main.rs:96:13
   |
96 |         for i in 0..n {
   |             ^ help: if this is intentional, prefix it with an underscore: `_i`
   |
   = note: `#[warn(unused_variables)]` on by default

warning: unused variable: `h`
  --> Main.rs:98:17
   |
98 |             let h = v[0];
   |                 ^ help: if this is intentional, prefix it with an underscore: `_h`

warning: unused variable: `p`
  --> Main.rs:99:17
   |
99 |             let p = v[1];
   |                 ^ help: if this is intentional, prefix it with an underscore: `_p`

warning: unused variable: `x`
   --> Main.rs:100:17
    |
100 |             let x = v[2];
    |                 ^ help: if this is intentional, prefix it with an underscore: `_x`

warning: constant `HEIGHT` is never used
  --> Main.rs:76:7
   |
76 | const HEIGHT: usize = 60;
   |       ^^^^^^
   |
   = note: `#[warn(dead_code)]` on by default

warning: constant `ENEMY_NUM_MAX` is never used
  --> Main.rs:77:7
   |
77 | const ENEMY_NUM_MAX: usize = 25;
   |       ^^^^^^^^^^^^^

warning: struct `Input` is never constructed
  --> Main.rs:79:8
   |
79 | struct Input {}
   |        ^^^^^

warning: 7 warnings emitted

ソースコード

diff #

#[allow(unused_imports)]
use std::cmp::*;
#[allow(unused_imports)]
use std::collections::*;

#[allow(unused_imports)]
use std::io::Write;
use std::time::SystemTime;

pub struct IO<R, W: std::io::Write>(R, std::io::BufWriter<W>);

impl<R: std::io::Read, W: std::io::Write> IO<R, W> {
    pub fn new(r: R, w: W) -> IO<R, W> {
        IO(r, std::io::BufWriter::new(w))
    }
    pub fn write<S: ToString>(&mut self, s: S) {
        #[allow(unused_imports)]
        use std::io::Write;
        self.1.write(s.to_string().as_bytes()).unwrap();
    }
    pub fn read<T: std::str::FromStr>(&mut self) -> T {
        use std::io::Read;
        let buf = self
            .0
            .by_ref()
            .bytes()
            .map(|b| b.unwrap())
            .skip_while(|&b| b == b' ' || b == b'\n' || b == b'\r' || b == b'\t')
            .take_while(|&b| b != b' ' && b != b'\n' && b != b'\r' && b != b'\t')
            .collect::<Vec<_>>();
        unsafe { std::str::from_utf8_unchecked(&buf) }
            .parse()
            .ok()
            .expect("Parse error.")
    }
    pub fn vec<T: std::str::FromStr>(&mut self, n: usize) -> Vec<T> {
        (0..n).map(|_| self.read()).collect()
    }
    pub fn chars(&mut self) -> Vec<char> {
        self.read::<String>().chars().collect()
    }
}

#[macro_export]
macro_rules! mat {
	($($e:expr),*) => { Vec::from(vec![$($e),*]) };
	($($e:expr,)*) => { Vec::from(vec![$($e),*]) };
	($e:expr; $d:expr) => { Vec::from(vec![$e; $d]) };
	($e:expr; $d:expr $(; $ds:expr)+) => { Vec::from(vec![mat![$e $(; $ds)*]; $d]) };
}

pub trait SetMinMax {
    fn setmin(&mut self, v: Self) -> bool;
    fn setmax(&mut self, v: Self) -> bool;
}
impl<T> SetMinMax for T
where
    T: PartialOrd,
{
    fn setmin(&mut self, v: T) -> bool {
        *self > v && {
            *self = v;
            true
        }
    }
    fn setmax(&mut self, v: T) -> bool {
        *self < v && {
            *self = v;
            true
        }
    }
}

#[allow(dead_code)]
const WIDTH: usize = 25;
const HEIGHT: usize = 60;
const ENEMY_NUM_MAX: usize = 25;

struct Input {}
impl Input {}

fn main() {
    let system_time = SystemTime::now();

    let (r, w) = (std::io::stdin(), std::io::stdout());
    let mut sc = IO::new(r.lock(), w.lock());

    loop {
        let n: isize = sc.read();
        if n == -1 {
            break;
        }

        let n = n as usize;

        for i in 0..n {
            let v = (0..3).map(|_| sc.read::<usize>()).collect::<Vec<_>>();
            let h = v[0];
            let p = v[1];
            let x = v[2];
        }

        let ans = "S";
        println!("{}", ans);
    }

    eprintln!("{}ms", system_time.elapsed().unwrap().as_millis());
}
0