結果
問題 | No.1338 Giant Class |
ユーザー | gorugo30 |
提出日時 | 2021-01-15 21:58:58 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 339 ms / 2,000 ms |
コード長 | 324 bytes |
コンパイル時間 | 252 ms |
コンパイル使用メモリ | 82,120 KB |
実行使用メモリ | 85,084 KB |
最終ジャッジ日時 | 2024-11-26 14:37:51 |
合計ジャッジ時間 | 6,309 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 21 |
ソースコード
H, W, Q = map(int, input().split()) ans = H * W giant = {} from bisect import bisect for i in range(Q): y, x = map(int, input().split()) if giant.get(x, -1) == -1: giant[x] = y ans -= H + 1 - y else: if giant[x] > y: ans -= giant[x] - y giant[x] = y print(ans)