結果

問題 No.1338 Giant Class
ユーザー lloyzlloyz
提出日時 2022-06-05 01:22:46
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 317 bytes
コンパイル時間 183 ms
コンパイル使用メモリ 81,620 KB
実行使用メモリ 841,516 KB
最終ジャッジ日時 2023-10-21 02:53:16
合計ジャッジ時間 5,334 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
53,404 KB
testcase_01 AC 42 ms
53,404 KB
testcase_02 AC 102 ms
76,512 KB
testcase_03 AC 39 ms
53,404 KB
testcase_04 AC 40 ms
53,404 KB
testcase_05 AC 41 ms
53,404 KB
testcase_06 AC 150 ms
145,244 KB
testcase_07 AC 169 ms
145,592 KB
testcase_08 AC 111 ms
97,956 KB
testcase_09 AC 113 ms
82,396 KB
testcase_10 AC 144 ms
98,772 KB
testcase_11 AC 115 ms
136,608 KB
testcase_12 AC 106 ms
76,376 KB
testcase_13 RE -
testcase_14 MLE -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

h, w, q = map(int, input().split())
ans = h * w
N = [0 for _ in range(w)]
for _ in range(q):
    y, x = map(int, input().split())
    x -= 1
    prev = N[x]
    curr = h - y + 1
    if curr > prev:
        dif = curr - prev
        ans -= dif
        N[x] = curr
    print(ans)
0