結果

問題 No.1338 Giant Class
コンテスト
ユーザー kept1994
提出日時 2021-08-29 02:08:42
言語 Python3
(3.15.0 + numpy 2.5.4 + scipy 1.18.1 + ACL)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
RE  
実行時間 -
コード長 379 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 784 ms
コンパイル使用メモリ 14,720 KB
実行使用メモリ 1,299,796 KB
最終ジャッジ日時 2026-09-27 21:34:27
合計ジャッジ時間 6,835 ms
ジャッジサーバーID
(参考情報)
judge3_1 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 11 RE * 1 MLE * 3 -- * 6
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#!/usr/bin/env python3
import sys

def main():
    H, W, Q = map(int, input().split())
    ok = [H] * W
    all = H * W
    for _ in range(Q):
        y, x = map(lambda i: int(i) - 1, input().split())
        if ok[x] <= y:
            print(all)
            continue
        all -= ok[x] - y
        ok[x] = y
        print(all)
    return

if __name__ == '__main__':
    main()
0