結果

問題 No.1338 Giant Class
ユーザー googol_S0googol_S0
提出日時 2021-01-15 21:34:28
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 355 ms / 2,000 ms
コード長 155 bytes
コンパイル時間 171 ms
コンパイル使用メモリ 81,920 KB
実行使用メモリ 85,988 KB
最終ジャッジ日時 2024-05-04 22:52:05
合計ジャッジ時間 6,014 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
51,712 KB
testcase_01 AC 31 ms
51,712 KB
testcase_02 AC 264 ms
76,672 KB
testcase_03 AC 36 ms
52,608 KB
testcase_04 AC 40 ms
53,248 KB
testcase_05 AC 46 ms
59,264 KB
testcase_06 AC 225 ms
82,816 KB
testcase_07 AC 311 ms
84,752 KB
testcase_08 AC 206 ms
82,852 KB
testcase_09 AC 216 ms
81,536 KB
testcase_10 AC 355 ms
85,884 KB
testcase_11 AC 111 ms
77,184 KB
testcase_12 AC 242 ms
80,896 KB
testcase_13 AC 224 ms
81,920 KB
testcase_14 AC 106 ms
77,544 KB
testcase_15 AC 140 ms
78,848 KB
testcase_16 AC 85 ms
76,544 KB
testcase_17 AC 229 ms
83,456 KB
testcase_18 AC 106 ms
77,568 KB
testcase_19 AC 131 ms
79,232 KB
testcase_20 AC 344 ms
85,656 KB
testcase_21 AC 331 ms
85,528 KB
testcase_22 AC 320 ms
85,988 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