結果
問題 |
No.1338 Giant Class
|
ユーザー |
![]() |
提出日時 | 2021-02-10 20:01:10 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 656 ms / 2,000 ms |
コード長 | 277 bytes |
コンパイル時間 | 114 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 24,000 KB |
最終ジャッジ日時 | 2024-07-08 07:23:48 |
合計ジャッジ時間 | 9,660 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 21 |
ソースコード
H, W, Q = map(int, input().split()) temp = {} ans = H*W for i in range(Q): y, x = map(int, input().split()) if x not in temp: temp[x] = y ans -= H-y+1 else: if temp[x] > y: ans -= temp[x]-y temp[x] = y print(ans)