結果

問題 No.1338 Giant Class
ユーザー 👑 terry_u16terry_u16
提出日時 2021-01-15 21:39:57
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 418 ms / 2,000 ms
コード長 300 bytes
コンパイル時間 735 ms
コンパイル使用メモリ 86,816 KB
実行使用メモリ 88,584 KB
最終ジャッジ日時 2023-08-17 16:26:25
合計ジャッジ時間 8,015 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,064 KB
testcase_01 AC 72 ms
71,080 KB
testcase_02 AC 344 ms
77,480 KB
testcase_03 AC 75 ms
71,200 KB
testcase_04 AC 76 ms
71,184 KB
testcase_05 AC 83 ms
75,372 KB
testcase_06 AC 300 ms
84,620 KB
testcase_07 AC 396 ms
86,328 KB
testcase_08 AC 270 ms
84,496 KB
testcase_09 AC 288 ms
83,988 KB
testcase_10 AC 404 ms
87,912 KB
testcase_11 AC 164 ms
78,820 KB
testcase_12 AC 293 ms
83,032 KB
testcase_13 AC 280 ms
84,248 KB
testcase_14 AC 149 ms
79,760 KB
testcase_15 AC 190 ms
80,984 KB
testcase_16 AC 129 ms
78,576 KB
testcase_17 AC 281 ms
85,756 KB
testcase_18 AC 147 ms
79,704 KB
testcase_19 AC 181 ms
81,744 KB
testcase_20 AC 415 ms
88,024 KB
testcase_21 AC 418 ms
87,304 KB
testcase_22 AC 403 ms
88,584 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

height, width, queries = map(int, input().split())
fronts = { }
available = height * width

for i in range(queries):
    row, col = map(int, input().split())
    last = fronts.get(col, height + 1)

    if row < last:
        available -= last - row
        fronts[col] = row
    
    print(available)
0