結果

問題 No.1338 Giant Class
ユーザー cuptea11139999cuptea11139999
提出日時 2021-06-08 22:57:22
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 412 ms / 2,000 ms
コード長 247 bytes
コンパイル時間 322 ms
コンパイル使用メモリ 87,096 KB
実行使用メモリ 88,184 KB
最終ジャッジ日時 2023-08-18 03:40:29
合計ジャッジ時間 8,403 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 86 ms
71,392 KB
testcase_01 AC 89 ms
71,800 KB
testcase_02 AC 349 ms
78,040 KB
testcase_03 AC 91 ms
71,908 KB
testcase_04 AC 96 ms
72,456 KB
testcase_05 AC 101 ms
76,456 KB
testcase_06 AC 297 ms
83,884 KB
testcase_07 AC 372 ms
86,748 KB
testcase_08 AC 293 ms
84,052 KB
testcase_09 AC 282 ms
83,300 KB
testcase_10 AC 405 ms
86,964 KB
testcase_11 AC 155 ms
78,636 KB
testcase_12 AC 330 ms
83,396 KB
testcase_13 AC 285 ms
83,256 KB
testcase_14 AC 172 ms
79,364 KB
testcase_15 AC 192 ms
80,336 KB
testcase_16 AC 151 ms
78,268 KB
testcase_17 AC 288 ms
84,280 KB
testcase_18 AC 170 ms
79,476 KB
testcase_19 AC 204 ms
80,364 KB
testcase_20 AC 412 ms
88,104 KB
testcase_21 AC 397 ms
88,108 KB
testcase_22 AC 398 ms
88,184 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import defaultdict
h,w,q= list(map(int,input().split()))
d = defaultdict(lambda:h)
seat = h*w
for i in range(q):
    y,x= list(map(int,input().split()))
    if d[x] >= y:
        seat -= d[x]-y+1
        d[x] = y-1
    print(seat)
0