結果

問題 No.1338 Giant Class
ユーザー ayaoniayaoni
提出日時 2021-01-16 02:17:57
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 597 bytes
コンパイル時間 531 ms
コンパイル使用メモリ 87,056 KB
実行使用メモリ 836,652 KB
最終ジャッジ日時 2023-08-17 20:19:35
合計ジャッジ時間 6,400 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,236 KB
testcase_01 AC 72 ms
71,324 KB
testcase_02 AC 133 ms
78,304 KB
testcase_03 AC 72 ms
71,232 KB
testcase_04 AC 73 ms
71,384 KB
testcase_05 AC 75 ms
71,440 KB
testcase_06 AC 149 ms
146,620 KB
testcase_07 AC 165 ms
147,004 KB
testcase_08 AC 134 ms
99,508 KB
testcase_09 AC 125 ms
83,956 KB
testcase_10 AC 154 ms
100,204 KB
testcase_11 AC 112 ms
137,360 KB
testcase_12 AC 129 ms
78,000 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

sys.setrecursionlimit(10**7)
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int,sys.stdin.readline().rstrip().split())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LI2(): return list(map(int,sys.stdin.readline().rstrip()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())
def LS2(): return list(sys.stdin.readline().rstrip())


H,W,Q = MI()
A = [H+1]*(W+1)
ans = H*W

for _ in range(Q):
    Y,X = MI()
    if A[X] > Y:
        ans -= A[X]-Y
        A[X] = Y
    print(ans)
0