結果

問題 No.1338 Giant Class
ユーザー 👑 terry_u16terry_u16
提出日時 2021-01-15 21:39:57
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 347 ms / 2,000 ms
コード長 300 bytes
コンパイル時間 1,124 ms
コンパイル使用メモリ 82,228 KB
実行使用メモリ 87,056 KB
最終ジャッジ日時 2024-05-04 23:03:22
合計ジャッジ時間 6,389 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
52,352 KB
testcase_01 AC 32 ms
51,712 KB
testcase_02 AC 301 ms
76,544 KB
testcase_03 AC 36 ms
52,864 KB
testcase_04 AC 36 ms
53,248 KB
testcase_05 AC 42 ms
59,516 KB
testcase_06 AC 239 ms
82,648 KB
testcase_07 AC 304 ms
85,256 KB
testcase_08 AC 209 ms
82,728 KB
testcase_09 AC 214 ms
81,792 KB
testcase_10 AC 334 ms
86,004 KB
testcase_11 AC 122 ms
77,164 KB
testcase_12 AC 232 ms
80,800 KB
testcase_13 AC 218 ms
82,176 KB
testcase_14 AC 103 ms
77,624 KB
testcase_15 AC 143 ms
78,316 KB
testcase_16 AC 88 ms
76,496 KB
testcase_17 AC 230 ms
83,092 KB
testcase_18 AC 118 ms
77,680 KB
testcase_19 AC 146 ms
79,488 KB
testcase_20 AC 347 ms
85,780 KB
testcase_21 AC 338 ms
85,528 KB
testcase_22 AC 316 ms
87,056 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