結果

問題 No.1317 月曜日の朝、WAを出した
ユーザー ⁣
提出日時 2024-06-17 11:22:19
言語 Rust
(1.77.0)
結果
WA  
実行時間 -
コード長 559 bytes
コンパイル時間 15,682 ms
コンパイル使用メモリ 378,952 KB
実行使用メモリ 6,940 KB
最終ジャッジ日時 2024-06-17 11:22:39
合計ジャッジ時間 17,363 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
5,248 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

use std::io::Read;

fn main() {
	let mut s = String::new();
	std::io::stdin().read_to_string(&mut s).ok();
	let l: Vec<_> = s.lines().skip(1).collect();
	l.chunks(3).for_each(|l| {
		let a: Vec<u64> = l[0].split(' ').flat_map(str::parse).collect();
		let c: Vec<u64> = l[1].split(' ').flat_map(str::parse).collect();
		let i = match l[2] {
			"WA" => 1,
			"TLE" => 2,
			"MLE" => 3,
			"OLE" => 4,
			_ => 5,
		};
		println!(
			"{}",
			if a[i] == 0 && c.iter().enumerate().all(|(j, &x)| i == j || x == 0)
			{
				"Yes"
			} else {
				"No"
			}
		)
	})
}
0