結果
問題 | No.1338 Giant Class |
ユーザー |
![]() |
提出日時 | 2021-01-15 22:17:05 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 289 ms / 2,000 ms |
コード長 | 284 bytes |
コンパイル時間 | 211 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 23,944 KB |
最終ジャッジ日時 | 2024-11-26 15:51:23 |
合計ジャッジ時間 | 5,056 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 21 |
ソースコード
import sysinput = sys.stdin.buffer.readlineH, W, Q = map(int, input().rstrip().split())dic = {}ans = H*Wfor _ in range(Q):y, x = map(int, input().rstrip().split())y -= 1; x -= 1d = dic.get(x, H)if d > y:ans -= (d-y)dic[x] = yprint(ans)