結果
問題 | No.1338 Giant Class |
ユーザー |
![]() |
提出日時 | 2021-01-15 21:45:34 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 331 ms / 2,000 ms |
コード長 | 334 bytes |
コンパイル時間 | 157 ms |
コンパイル使用メモリ | 82,768 KB |
実行使用メモリ | 86,368 KB |
最終ジャッジ日時 | 2024-11-26 13:55:03 |
合計ジャッジ時間 | 6,096 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 21 |
ソースコード
H,W,Q = map(int,input().split())dic = {}ans = H*Wfor i in range(Q):y,x = map(int,input().split())if x not in dic:dic[x] = ydame = H + 1 - yelse:if y > dic[x]:dame = 0else:dame = dic[x] - ydic[x] = min(dic[x],y)ans -= dameprint(ans)