結果

問題 No.1338 Giant Class
ユーザー 👑 SPD_9X2SPD_9X2
提出日時 2021-01-15 21:39:37
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 121 ms / 2,000 ms
コード長 343 bytes
コンパイル時間 174 ms
コンパイル使用メモリ 82,048 KB
実行使用メモリ 92,640 KB
最終ジャッジ日時 2024-11-26 13:39:42
合計ジャッジ時間 3,743 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

"""


"""

import sys
from sys import stdin

H,W,Q = map(int,stdin.readline().split())

dic = {}
ans = H*W
ALIS = []

for i in range(Q):

    Y,X = map(int,stdin.readline().split())
    if X not in dic:
        dic[X] = H+1

    if dic[X] > Y:
        ans -= dic[X]-Y
        dic[X] = Y

    ALIS.append(ans)

print ("\n".join(map(str,ALIS)))
0