結果
| 問題 | No.1317 月曜日の朝、WAを出した |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-12-14 09:25:58 |
| 言語 | Rust (1.83.0 + proconio) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,092 bytes |
| 記録 | |
| コンパイル時間 | 15,169 ms |
| コンパイル使用メモリ | 394,128 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-09-20 00:32:34 |
| 合計ジャッジ時間 | 13,513 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 1 WA * 3 |
ソースコード
use std::collections::HashMap;
use std::io::*;
fn main() {
let mut s: String = String::new();
std::io::stdin().read_to_string(&mut s).ok();
let mut itr = s.trim().split_whitespace();
let n: usize = itr.next().unwrap().parse().unwrap();
let mut mp: HashMap<&str, usize> = HashMap::new();
mp.insert("WA", 1);
mp.insert("TLE", 2);
mp.insert("MLE", 3);
mp.insert("OLE", 4);
mp.insert("RE", 5);
for _ in 0..n {
let a: Vec<usize> = (0..6)
.map(|_| itr.next().unwrap().parse().unwrap())
.collect();
let b: Vec<usize> = (0..6)
.map(|_| itr.next().unwrap().parse().unwrap())
.collect();
let s: &str = itr.next().unwrap();
let i = mp[s];
let mut ok = true;
ok &= a[i] == 0;
for j in 1..6 {
if i == j {
continue;
}
ok &= b[j] == 0;
}
ok &= a[0] == 0 || (a[0] > 0 && b[0] == 0);
if ok {
println!("Yes")
} else {
println!("No")
}
}
}