結果

問題 No.1338 Giant Class
ユーザー Pretender324Pretender324
提出日時 2021-01-15 22:12:19
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 308 bytes
コンパイル時間 359 ms
コンパイル使用メモリ 86,912 KB
実行使用メモリ 84,400 KB
最終ジャッジ日時 2023-08-17 17:25:15
合計ジャッジ時間 5,743 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 87 ms
75,668 KB
testcase_01 AC 88 ms
71,520 KB
testcase_02 AC 480 ms
77,776 KB
testcase_03 AC 92 ms
76,756 KB
testcase_04 AC 98 ms
76,820 KB
testcase_05 AC 107 ms
77,880 KB
testcase_06 TLE -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import defaultdict

H, W, Q = map(int, input().split())
A = defaultdict(lambda: float('inf'))
ans = H * W
for _ in range(Q):
    Y, X = map(int, input().split())
    A[X] = min(A[X], Y)
    m = W - len(A.keys())
    ans = H * m
    for k, v in A.items():
        ans += v - 1
    print(ans)
0