結果

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

ソースコード

diff #

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

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

0