結果

問題 No.1338 Giant Class
ユーザー 👑 rin204rin204
提出日時 2022-01-18 18:47:24
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 367 ms / 2,000 ms
コード長 235 bytes
コンパイル時間 1,520 ms
コンパイル使用メモリ 86,224 KB
実行使用メモリ 87,448 KB
最終ジャッジ日時 2023-08-15 07:35:19
合計ジャッジ時間 8,275 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
70,500 KB
testcase_01 AC 70 ms
70,980 KB
testcase_02 AC 318 ms
76,836 KB
testcase_03 AC 73 ms
70,880 KB
testcase_04 AC 77 ms
71,020 KB
testcase_05 AC 83 ms
75,100 KB
testcase_06 AC 263 ms
84,660 KB
testcase_07 AC 338 ms
85,736 KB
testcase_08 AC 262 ms
84,552 KB
testcase_09 AC 250 ms
84,068 KB
testcase_10 AC 363 ms
87,356 KB
testcase_11 AC 129 ms
78,344 KB
testcase_12 AC 297 ms
82,904 KB
testcase_13 AC 251 ms
84,192 KB
testcase_14 AC 145 ms
79,288 KB
testcase_15 AC 162 ms
80,632 KB
testcase_16 AC 127 ms
78,044 KB
testcase_17 AC 250 ms
84,244 KB
testcase_18 AC 142 ms
79,308 KB
testcase_19 AC 174 ms
81,488 KB
testcase_20 AC 367 ms
87,316 KB
testcase_21 AC 362 ms
87,144 KB
testcase_22 AC 357 ms
87,448 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

h, w, q = map(int, input().split())

min_ = {}
ans = h * w
for _ in range(q):
    y, x = map(int, input().split())
    x -= 1
    if y < min_.get(x, h + 1):
        ans -= min_.get(x, h + 1) - y
        min_[x] = y
    print(ans)
    
0