結果
| 問題 | No.1338 Giant Class |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-01-23 17:09:34 |
| 言語 | PyPy3 (8.0.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 271 ms / 2,000 ms |
| + 626µs | |
| コード長 | 317 bytes |
| 記録 | |
| コンパイル時間 | 63 ms |
| コンパイル使用メモリ | 82,144 KB |
| 実行使用メモリ | 98,456 KB |
| 最終ジャッジ日時 | 2026-10-09 20:45:52 |
| 合計ジャッジ時間 | 6,343 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge5_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 21 |
ソースコード
H,W,Q = map(int,input().split())
room = {}
count = H*W
for _ in range(Q):
y,x = map(int,input().split())
if x not in room:
room[x] = [y]
count -= H-y+1
else:
min_room = min(room[x])
if y < min_room:
count -= min_room-y
room[x].append(y)
print(count)