結果

問題 No.1338 Giant Class
ユーザー 👑 H20H20
提出日時 2021-04-22 00:38:49
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 397 ms / 2,000 ms
コード長 233 bytes
コンパイル時間 1,193 ms
コンパイル使用メモリ 86,700 KB
実行使用メモリ 87,384 KB
最終ジャッジ日時 2023-09-17 09:44:01
合計ジャッジ時間 8,916 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 91 ms
71,464 KB
testcase_01 AC 93 ms
71,520 KB
testcase_02 AC 367 ms
77,412 KB
testcase_03 AC 94 ms
71,456 KB
testcase_04 AC 98 ms
72,180 KB
testcase_05 AC 105 ms
76,260 KB
testcase_06 AC 294 ms
84,004 KB
testcase_07 AC 369 ms
86,672 KB
testcase_08 AC 286 ms
85,268 KB
testcase_09 AC 277 ms
84,044 KB
testcase_10 AC 393 ms
86,744 KB
testcase_11 AC 155 ms
78,072 KB
testcase_12 AC 322 ms
82,940 KB
testcase_13 AC 278 ms
83,212 KB
testcase_14 AC 170 ms
79,048 KB
testcase_15 AC 194 ms
80,376 KB
testcase_16 AC 153 ms
77,656 KB
testcase_17 AC 284 ms
84,312 KB
testcase_18 AC 172 ms
79,220 KB
testcase_19 AC 206 ms
80,960 KB
testcase_20 AC 396 ms
87,384 KB
testcase_21 AC 396 ms
87,092 KB
testcase_22 AC 397 ms
87,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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