結果
| 問題 | No.1338 Giant Class |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-02-13 09:56:03 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 403 ms / 2,000 ms |
| コード長 | 327 bytes |
| 記録 | |
| コンパイル時間 | 302 ms |
| コンパイル使用メモリ | 82,948 KB |
| 実行使用メモリ | 84,760 KB |
| 最終ジャッジ日時 | 2026-02-13 09:56:10 |
| 合計ジャッジ時間 | 6,548 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 21 |
ソースコード
H,W,Q = map(int,input().split())
A = {}
tot = H*W
for _ in range(Q):
y,x = map(int,input().split())
if x not in A:
A[x] = y
delta = H+1-y
tot -= delta
print(tot)
elif A[x]<y:
print(tot)
else:
delta = A[x]-y
tot -= delta
A[x] = y
print(tot)