結果

問題 No.1338 Giant Class
ユーザー pluto77pluto77
提出日時 2021-03-06 12:58:55
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 698 ms / 2,000 ms
コード長 235 bytes
コンパイル時間 82 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 23,992 KB
最終ジャッジ日時 2024-04-17 01:31:36
合計ジャッジ時間 10,378 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 25 ms
10,624 KB
testcase_01 AC 28 ms
10,624 KB
testcase_02 AC 622 ms
10,880 KB
testcase_03 AC 25 ms
10,624 KB
testcase_04 AC 25 ms
10,624 KB
testcase_05 AC 26 ms
10,624 KB
testcase_06 AC 461 ms
17,364 KB
testcase_07 AC 698 ms
23,988 KB
testcase_08 AC 466 ms
17,352 KB
testcase_09 AC 432 ms
17,364 KB
testcase_10 AC 654 ms
23,984 KB
testcase_11 AC 86 ms
11,648 KB
testcase_12 AC 543 ms
17,384 KB
testcase_13 AC 389 ms
17,348 KB
testcase_14 AC 141 ms
12,404 KB
testcase_15 AC 170 ms
14,052 KB
testcase_16 AC 70 ms
11,776 KB
testcase_17 AC 386 ms
17,364 KB
testcase_18 AC 124 ms
12,404 KB
testcase_19 AC 227 ms
14,056 KB
testcase_20 AC 667 ms
23,992 KB
testcase_21 AC 687 ms
23,984 KB
testcase_22 AC 680 ms
23,984 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#yuki1338

H, W, Q = map(int, input().split())
dic = {}
res = H*W
for i in range(Q):
    y, x = map(int, input().split())
    y -= 1; x -= 1
    d = dic.get(x, H)
    if d > y:
        res-= (d-y)
        dic[x] = y
    print(res)
    
0