結果
| 問題 |
No.1338 Giant Class
|
| コンテスト | |
| ユーザー |
wattaihei
|
| 提出日時 | 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 sys
input = sys.stdin.buffer.readline
H, W, Q = map(int, input().rstrip().split())
dic = {}
ans = H*W
for _ in range(Q):
y, x = map(int, input().rstrip().split())
y -= 1; x -= 1
d = dic.get(x, H)
if d > y:
ans -= (d-y)
dic[x] = y
print(ans)
wattaihei