結果
| 問題 | No.1338 Giant Class |
| コンテスト | |
| ユーザー |
hir355
|
| 提出日時 | 2021-01-15 21:53:34 |
| 言語 | PyPy3 (8.0.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 205 ms / 2,000 ms |
| + 26µs | |
| コード長 | 285 bytes |
| 記録 | |
| コンパイル時間 | 64 ms |
| コンパイル使用メモリ | 81,132 KB |
| 実行使用メモリ | 93,100 KB |
| 最終ジャッジ日時 | 2026-09-30 09:56:21 |
| 合計ジャッジ時間 | 6,200 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge4_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 21 |
ソースコード
h, w, q = map(int, input().split())
d = dict()
ans = w * h
for i in range(q):
y, x = map(int, input().split())
if x in d:
ans -= d[x]
d[x] = min(d[x], y - 1)
ans += d[x]
else:
ans -= h
d[x] = y - 1
ans += d[x]
print(ans)
hir355