結果

問題 No.1338 Giant Class
ユーザー googol_S0googol_S0
提出日時 2021-01-15 21:34:28
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 403 ms / 2,000 ms
コード長 155 bytes
コンパイル時間 334 ms
コンパイル使用メモリ 87,168 KB
実行使用メモリ 88,856 KB
最終ジャッジ日時 2023-08-17 16:15:35
合計ジャッジ時間 7,581 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,536 KB
testcase_01 AC 72 ms
71,392 KB
testcase_02 AC 323 ms
77,828 KB
testcase_03 AC 73 ms
71,508 KB
testcase_04 AC 77 ms
71,428 KB
testcase_05 AC 83 ms
75,468 KB
testcase_06 AC 293 ms
85,104 KB
testcase_07 AC 369 ms
86,644 KB
testcase_08 AC 263 ms
84,812 KB
testcase_09 AC 279 ms
83,860 KB
testcase_10 AC 397 ms
87,928 KB
testcase_11 AC 156 ms
79,280 KB
testcase_12 AC 295 ms
83,140 KB
testcase_13 AC 280 ms
84,720 KB
testcase_14 AC 147 ms
79,744 KB
testcase_15 AC 189 ms
81,388 KB
testcase_16 AC 129 ms
78,756 KB
testcase_17 AC 280 ms
85,956 KB
testcase_18 AC 146 ms
79,856 KB
testcase_19 AC 179 ms
81,900 KB
testcase_20 AC 401 ms
88,200 KB
testcase_21 AC 403 ms
87,612 KB
testcase_22 AC 395 ms
88,856 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

H,W,Q=map(int,input().split())
D=dict()
P=H*W
for i in range(Q):
  Y,X=map(int,input().split())
  Z=D.get(X,H+1)
  if Z>Y:
    P-=Z-Y
    D[X]=Y
  print(P)
0