結果

問題 No.1338 Giant Class
ユーザー r_ishida
提出日時 2021-01-16 09:14:17
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
MLE  
実行時間 -
コード長 503 bytes
コンパイル時間 121 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 817,996 KB
最終ジャッジ日時 2024-11-27 08:55:17
合計ジャッジ時間 8,188 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 MLE * 1
other AC * 11 RE * 7 MLE * 3
権限があれば一括ダウンロードができます

ソースコード

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