結果

問題 No.1338 Giant Class
コンテスト
ユーザー flippergo
提出日時 2026-02-13 09:50:44
言語 PyPy3
(7.3.17)
結果
RE  
実行時間 -
コード長 236 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 355 ms
コンパイル使用メモリ 82,572 KB
実行使用メモリ 841,924 KB
最終ジャッジ日時 2026-02-13 09:50:50
合計ジャッジ時間 6,407 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 11 RE * 1 MLE * 1 -- * 8
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

H,W,Q = map(int,input().split())
A = [H+1]*(W+1)
tot = H*W
for _ in range(Q):
    y,x = map(int,input().split())
    if A[x]<y:
        print(tot)
    else:
        delta = A[x]-y
        tot -= delta
        A[x] = y
        print(tot)
0