結果
問題 | No.24 数当てゲーム |
ユーザー |
![]() |
提出日時 | 2023-01-01 15:33:54 |
言語 | Rust (1.83.0 + proconio) |
結果 |
AC
|
実行時間 | 1 ms / 5,000 ms |
コード長 | 825 bytes |
コンパイル時間 | 14,135 ms |
コンパイル使用メモリ | 383,464 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-27 00:05:31 |
合計ジャッジ時間 | 15,605 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 10 |
ソースコード
use std::io;fn main() {let mut s = String::new();io::stdin().read_line(&mut s).ok();let n: usize = s.trim().parse().unwrap();let mut v = [true; 10];for _ in 0..n {let mut itr = String::new();io::stdin().read_line(&mut itr).ok();let mut itr = itr.trim().split_whitespace();let a: usize = itr.next().unwrap().parse().unwrap();let b: usize = itr.next().unwrap().parse().unwrap();let c: usize = itr.next().unwrap().parse().unwrap();let d: usize = itr.next().unwrap().parse().unwrap();let s: &str = itr.next().unwrap();if s == "NO" {v[a] = false;v[b] = false;v[c] = false;v[d] = false;} else {for i in 0..10 {if !(i == a || i == b || i == c || i == d) {v[i] = false;}}}}for i in 0..10 {if v[i] {println!("{}", i);break;}}}