結果

問題 No.1338 Giant Class
コンテスト
ユーザー lie_of_lillie
提出日時 2021-06-02 20:55:43
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 232 ms / 2,000 ms
コード長 316 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 182 ms
コンパイル使用メモリ 85,504 KB
実行使用メモリ 91,440 KB
最終ジャッジ日時 2026-05-10 13:42:00
合計ジャッジ時間 5,940 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import collections
H,W,Q=map(int, input().split())

max_s = H*W
rank = collections.defaultdict(lambda :H)
for _ in range(Q):
    y,x=map(int,input().split())
    x-=1; y-=1
    if y < rank[x]:
        delta = rank[x] - y
        max_s -= delta
        print(max_s)
        rank[x] = y
    else:
        print(max_s)
0