結果
| 問題 | No.1338 Giant Class |
| コンテスト | |
| ユーザー |
ixTL255
|
| 提出日時 | 2023-01-02 14:55:13 |
| 言語 | Rust (1.94.0 + proconio + num + itertools) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 612 bytes |
| 記録 | |
| コンパイル時間 | 3,189 ms |
| コンパイル使用メモリ | 194,284 KB |
| 実行使用メモリ | 1,276,744 KB |
| 最終ジャッジ日時 | 2026-05-21 08:01:54 |
| 合計ジャッジ時間 | 6,065 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 11 RE * 1 MLE * 3 -- * 6 |
ソースコード
use std::io::Read;
fn main() {
let mut s = String::new();
std::io::stdin().read_to_string(&mut s).ok();
let mut itr = s.trim().split_whitespace();
let h: usize = itr.next().unwrap().parse().unwrap();
let w: usize = itr.next().unwrap().parse().unwrap();
let q: usize = itr.next().unwrap().parse().unwrap();
let mut ans = h * w;
let mut seat: Vec<usize> = vec![h; w];
for _ in 0..q {
let y = itr.next().unwrap().parse::<usize>().unwrap() - 1;
let x = itr.next().unwrap().parse::<usize>().unwrap() - 1;
if y < seat[x] {
ans -= seat[x] - y;
seat[x] = y;
}
println!("{}", ans);
}
}
ixTL255