結果
問題 |
No.5017 Tool-assisted Shooting
|
ユーザー |
|
提出日時 | 2023-07-16 15:45:35 |
言語 | Rust (1.83.0 + proconio) |
結果 |
RE
|
実行時間 | - |
コード長 | 955 bytes |
コンパイル時間 | 628 ms |
コンパイル使用メモリ | 147,780 KB |
実行使用メモリ | 24,516 KB |
スコア | 74,830 |
平均クエリ数 | 399.74 |
最終ジャッジ日時 | 2023-07-16 15:45:46 |
合計ジャッジ時間 | 9,304 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge13 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 18 RE * 82 |
ソースコード
// type Output = Vec<char>; fn main() { for _ in 0..1000 { if let Some(_input) = read_input() { println!("S"); } else { break; } } } fn read_input() -> Option<Input> { let mut n = String::new(); std::io::stdin().read_line(&mut n).unwrap(); if n == "-1" { return None; } let n = n.trim().parse::<usize>().unwrap(); let mut es = vec![]; for _ in 0..n { let mut line = String::new(); std::io::stdin().read_line(&mut line).unwrap(); let mut tokens = line.split_whitespace(); let h = tokens.next().unwrap().parse::<usize>().unwrap(); let p = tokens.next().unwrap().parse::<usize>().unwrap(); let x = tokens.next().unwrap().parse::<usize>().unwrap(); es.push((h, p, x)); } Some(Input { n, es }) } #[allow(dead_code)] #[derive(Debug)] struct Input { n: usize, es: Vec<(usize, usize, usize)>, }