結果
| 問題 |
No.1338 Giant Class
|
| コンテスト | |
| ユーザー |
nephrologist
|
| 提出日時 | 2021-01-15 22:08:17 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
MLE
|
| 実行時間 | - |
| コード長 | 392 bytes |
| コンパイル時間 | 264 ms |
| コンパイル使用メモリ | 81,996 KB |
| 実行使用メモリ | 901,444 KB |
| 最終ジャッジ日時 | 2024-11-26 15:02:16 |
| 合計ジャッジ時間 | 8,741 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 MLE * 1 |
| other | AC * 11 RE * 7 MLE * 3 |
ソースコード
h, w, q = map(int, input().split())
memo = [-1] * w
temp = 0
for _ in range(q):
y, x = map(int, input().split())
y, x = y - 1, x - 1
pre = memo[x]
if pre == -1:
memo[x] = y
temp += h - y
print(h * w - temp)
continue
if pre < y:
print(h * w - temp)
else:
memo[x] = y
temp += pre - y
print(h * w - temp)
nephrologist