結果
| 問題 | No.1338 Giant Class |
| コンテスト | |
| ユーザー |
H20
|
| 提出日時 | 2021-04-22 00:38:49 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 230 ms / 2,000 ms |
| コード長 | 233 bytes |
| 記録 | |
| コンパイル時間 | 163 ms |
| コンパイル使用メモリ | 85,504 KB |
| 実行使用メモリ | 91,184 KB |
| 最終ジャッジ日時 | 2026-03-25 14:17:26 |
| 合計ジャッジ時間 | 4,573 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 21 |
ソースコード
from collections import defaultdict
H,W,Q = map(int,input().split())
d = defaultdict(lambda: H)
seat = H*W
for _ in range(Q):
y,x=map(int,input().split())
if d[x]>=y:
seat -= d[x]-y+1
d[x]=y-1
print(seat)
H20