結果

問題 No.1338 Giant Class
ユーザー nephrologist
提出日時 2021-01-15 22:10:40
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
RE  
実行時間 -
コード長 284 bytes
コンパイル時間 107 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 818,216 KB
最終ジャッジ日時 2024-11-26 15:10:15
合計ジャッジ時間 10,511 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 11 RE * 7 MLE * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

h, w, q = map(int, input().split())

memo = [h] * w
temp = 0
for _ in range(q):
    y, x = map(int, input().split())
    y -= 1
    x -= 1
    pre = memo[x]
    if pre < y:
        print(h * w - temp)
    else:
        memo[x] = y
        temp += pre - y
        print(h * w - temp)

0