結果

問題 No.1338 Giant Class
ユーザー convexineqconvexineq
提出日時 2021-01-15 21:38:03
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 173 ms / 2,000 ms
コード長 210 bytes
コンパイル時間 376 ms
コンパイル使用メモリ 87,304 KB
実行使用メモリ 115,576 KB
最終ジャッジ日時 2023-08-17 16:22:56
合計ジャッジ時間 5,278 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
70,972 KB
testcase_01 AC 68 ms
71,328 KB
testcase_02 AC 152 ms
113,168 KB
testcase_03 AC 70 ms
71,432 KB
testcase_04 AC 72 ms
71,092 KB
testcase_05 AC 72 ms
71,168 KB
testcase_06 AC 135 ms
100,236 KB
testcase_07 AC 160 ms
110,956 KB
testcase_08 AC 133 ms
99,688 KB
testcase_09 AC 135 ms
97,224 KB
testcase_10 AC 170 ms
114,588 KB
testcase_11 AC 89 ms
78,248 KB
testcase_12 AC 152 ms
102,924 KB
testcase_13 AC 127 ms
98,520 KB
testcase_14 AC 92 ms
81,972 KB
testcase_15 AC 106 ms
86,780 KB
testcase_16 AC 84 ms
77,360 KB
testcase_17 AC 126 ms
98,596 KB
testcase_18 AC 90 ms
81,960 KB
testcase_19 AC 103 ms
88,172 KB
testcase_20 AC 168 ms
115,560 KB
testcase_21 AC 173 ms
115,576 KB
testcase_22 AC 167 ms
115,540 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

h,w,q,*xy = map(int,open(0).read().split())
s = {}
ans = h*w
for i in range(q):
    y,x = xy[i*2]-1,xy[i*2+1]-1
    if x not in s: s[x] = h
    if s[x] > y:
        ans -= s[x]-y
        s[x] = y
    print(ans)
0