結果

問題 No.1338 Giant Class
ユーザー 👑 H20H20
提出日時 2021-01-15 21:56:16
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 385 ms / 2,000 ms
コード長 235 bytes
コンパイル時間 904 ms
コンパイル使用メモリ 87,228 KB
実行使用メモリ 87,364 KB
最終ジャッジ日時 2023-08-17 16:58:38
合計ジャッジ時間 8,055 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 92 ms
71,448 KB
testcase_01 AC 92 ms
71,680 KB
testcase_02 AC 335 ms
77,740 KB
testcase_03 AC 95 ms
71,320 KB
testcase_04 AC 101 ms
71,932 KB
testcase_05 AC 106 ms
76,096 KB
testcase_06 AC 287 ms
84,156 KB
testcase_07 AC 358 ms
86,592 KB
testcase_08 AC 282 ms
85,408 KB
testcase_09 AC 273 ms
83,948 KB
testcase_10 AC 383 ms
87,100 KB
testcase_11 AC 153 ms
78,172 KB
testcase_12 AC 306 ms
82,924 KB
testcase_13 AC 269 ms
83,296 KB
testcase_14 AC 165 ms
79,296 KB
testcase_15 AC 183 ms
80,304 KB
testcase_16 AC 145 ms
77,652 KB
testcase_17 AC 273 ms
84,292 KB
testcase_18 AC 164 ms
78,784 KB
testcase_19 AC 194 ms
80,684 KB
testcase_20 AC 385 ms
87,364 KB
testcase_21 AC 380 ms
87,220 KB
testcase_22 AC 377 ms
86,988 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import defaultdict
H,W,Q = map(int, input().split())
d = defaultdict(lambda: H)
ans = H*W
for i in range(Q):
    Y,X = map(int, input().split())
    if d[X]>=Y:
        ans -= d[X]-Y+1
        d[X]= Y-1
    print(ans)
0