結果

問題 No.1338 Giant Class
ユーザー r_ishidar_ishida
提出日時 2021-01-16 09:14:17
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 503 bytes
コンパイル時間 578 ms
コンパイル使用メモリ 10,560 KB
実行使用メモリ 816,784 KB
最終ジャッジ日時 2023-08-18 05:44:17
合計ジャッジ時間 7,617 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
8,308 KB
testcase_01 AC 18 ms
8,248 KB
testcase_02 AC 194 ms
9,172 KB
testcase_03 AC 17 ms
8,300 KB
testcase_04 AC 18 ms
8,244 KB
testcase_05 AC 18 ms
8,348 KB
testcase_06 AC 348 ms
79,496 KB
testcase_07 AC 425 ms
80,620 KB
testcase_08 AC 223 ms
32,328 KB
testcase_09 AC 160 ms
16,488 KB
testcase_10 AC 330 ms
34,248 KB
testcase_11 AC 175 ms
69,476 KB
testcase_12 AC 181 ms
10,628 KB
testcase_13 RE -
testcase_14 TLE -
testcase_15 MLE -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
import itertools
import math
def S(): return sys.stdin.readline().rstrip()
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 LS(): return list(sys.stdin.readline().rstrip().split())

h,w,q = MI()
v = [h]*w

ans = h*w
for i in range(q):
    y,x = MI()
    if y-1 < v[x-1]:
        ans -= v[x-1]-y+1
        v[x-1] = y-1
    print(ans)
0