結果

問題 No.1338 Giant Class
ユーザー 👑 KazunKazun
提出日時 2021-01-15 21:45:55
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 121 ms / 2,000 ms
コード長 317 bytes
コンパイル時間 153 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 90,604 KB
最終ジャッジ日時 2024-05-04 23:17:46
合計ジャッジ時間 3,829 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 45 ms
53,504 KB
testcase_01 AC 42 ms
53,376 KB
testcase_02 AC 96 ms
80,128 KB
testcase_03 AC 41 ms
53,376 KB
testcase_04 AC 41 ms
53,888 KB
testcase_05 AC 41 ms
54,272 KB
testcase_06 AC 95 ms
87,552 KB
testcase_07 AC 113 ms
87,392 KB
testcase_08 AC 98 ms
86,656 KB
testcase_09 AC 91 ms
85,888 KB
testcase_10 AC 121 ms
89,388 KB
testcase_11 AC 59 ms
69,504 KB
testcase_12 AC 101 ms
83,584 KB
testcase_13 AC 93 ms
86,912 KB
testcase_14 AC 64 ms
74,240 KB
testcase_15 AC 73 ms
78,848 KB
testcase_16 AC 60 ms
68,608 KB
testcase_17 AC 95 ms
87,296 KB
testcase_18 AC 65 ms
74,496 KB
testcase_19 AC 78 ms
79,232 KB
testcase_20 AC 121 ms
90,348 KB
testcase_21 AC 119 ms
90,476 KB
testcase_22 AC 116 ms
90,604 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