結果
問題 | No.1338 Giant Class |
ユーザー | phspls |
提出日時 | 2022-11-19 22:09:03 |
言語 | Rust (1.77.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 827 bytes |
コンパイル時間 | 5,629 ms |
コンパイル使用メモリ | 159,264 KB |
実行使用メモリ | 813,080 KB |
最終ジャッジ日時 | 2023-10-21 02:21:32 |
合計ジャッジ時間 | 8,433 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
4,348 KB |
testcase_01 | AC | 1 ms
4,348 KB |
testcase_02 | AC | 130 ms
4,348 KB |
testcase_03 | AC | 0 ms
4,348 KB |
testcase_04 | AC | 1 ms
4,348 KB |
testcase_05 | AC | 1 ms
4,348 KB |
testcase_06 | AC | 115 ms
72,180 KB |
testcase_07 | AC | 152 ms
72,972 KB |
testcase_08 | AC | 91 ms
24,972 KB |
testcase_09 | AC | 86 ms
9,344 KB |
testcase_10 | AC | 149 ms
26,224 KB |
testcase_11 | AC | 30 ms
62,684 KB |
testcase_12 | AC | 98 ms
4,348 KB |
testcase_13 | RE | - |
testcase_14 | MLE | - |
testcase_15 | MLE | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
testcase_19 | -- | - |
testcase_20 | -- | - |
testcase_21 | -- | - |
testcase_22 | -- | - |
ソースコード
fn main() { let mut hwq = String::new(); std::io::stdin().read_line(&mut hwq).ok(); let hwq: Vec<usize> = hwq.trim().split_whitespace().map(|s| s.parse().unwrap()).collect(); let h = hwq[0]; let w = hwq[1]; let q = hwq[2]; let queries = (0..q).map(|_| { let mut temp = String::new(); std::io::stdin().read_line(&mut temp).ok(); let temp: Vec<usize> = temp.trim().split_whitespace().map(|s| s.parse().unwrap()).collect(); (temp[0]-1, temp[1]-1) }) .collect::<Vec<_>>(); let mut mins = vec![h; w]; let mut summary = h*w; for &(y, x) in queries.iter() { if mins[x] < y { println!("{}", summary); } else { summary -= mins[x] - y; mins[x] = y; println!("{}", summary); } } }