結果
| 問題 | No.1338 Giant Class |
| コンテスト | |
| ユーザー |
nephrologist
|
| 提出日時 | 2021-01-15 22:12:40 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 404 bytes |
| 記録 | |
| コンパイル時間 | 246 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 17,504 KB |
| 最終ジャッジ日時 | 2024-11-26 15:40:47 |
| 合計ジャッジ時間 | 4,154 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 RE * 1 |
| other | AC * 4 WA * 1 RE * 16 |
ソースコード
h, w, q = map(int, input().split())
memo = {}
temp = 0
for _ in range(q):
y, x = map(int, input().split())
y -= 1
x -= 1
if y in memo:
pre = memo[x]
if pre < y:
print(h * w - temp)
else:
memo[x] = y
temp += pre - y
print(h * w - temp)
else:
memo[x] = y
temp += h - y
print(h * w - temp)
nephrologist