結果

問題 No.1338 Giant Class
ユーザー 👑 KazunKazun
提出日時 2021-01-15 21:45:55
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 177 ms / 2,000 ms
コード長 317 bytes
コンパイル時間 315 ms
コンパイル使用メモリ 86,716 KB
実行使用メモリ 90,648 KB
最終ジャッジ日時 2023-08-17 16:39:40
合計ジャッジ時間 5,525 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 98 ms
71,408 KB
testcase_01 AC 98 ms
71,440 KB
testcase_02 AC 154 ms
81,188 KB
testcase_03 AC 98 ms
71,628 KB
testcase_04 AC 98 ms
71,660 KB
testcase_05 AC 99 ms
71,632 KB
testcase_06 AC 147 ms
85,956 KB
testcase_07 AC 167 ms
87,736 KB
testcase_08 AC 146 ms
86,648 KB
testcase_09 AC 144 ms
84,976 KB
testcase_10 AC 176 ms
89,040 KB
testcase_11 AC 114 ms
77,576 KB
testcase_12 AC 153 ms
85,844 KB
testcase_13 AC 146 ms
85,896 KB
testcase_14 AC 119 ms
79,272 KB
testcase_15 AC 124 ms
81,012 KB
testcase_16 AC 113 ms
77,836 KB
testcase_17 AC 146 ms
87,256 KB
testcase_18 AC 117 ms
79,228 KB
testcase_19 AC 124 ms
81,948 KB
testcase_20 AC 177 ms
90,516 KB
testcase_21 AC 174 ms
90,648 KB
testcase_22 AC 174 ms
90,612 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
from collections import defaultdict
input=sys.stdin.readline
write=sys.stdout.write

H,W,Q=map(int,input().split())
D=defaultdict(lambda :H)

A=[0]*Q
C=H*W
for i in range(Q):
    Y,X=map(int,input().split())

    if D[X]>Y-1:
        C-=D[X]-(Y-1)
        D[X]=Y-1

    A[i]=C

write("\n".join(map(str,A)))
0