結果
問題 | No.1338 Giant Class |
ユーザー |
![]() |
提出日時 | 2022-06-18 20:12:32 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 345 ms / 2,000 ms |
コード長 | 193 bytes |
コンパイル時間 | 191 ms |
コンパイル使用メモリ | 82,048 KB |
実行使用メモリ | 86,228 KB |
最終ジャッジ日時 | 2024-10-10 11:08:51 |
合計ジャッジ時間 | 7,269 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 21 |
ソースコード
H,W,Q=map(int,input().split()) ans=H*W d=dict() for i in range(Q): a,b=map(int,input().split()) if not b in d: d[b]=a ans-=H-a+1 else: if d[b]>a: ans-=d[b]-a d[b]=a print(ans)