結果
| 問題 | No.1338 Giant Class |
| コンテスト | |
| ユーザー |
ygd.
|
| 提出日時 | 2021-01-15 21:45:34 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 331 ms / 2,000 ms |
| コード長 | 334 bytes |
| 記録 | |
| コンパイル時間 | 157 ms |
| コンパイル使用メモリ | 82,768 KB |
| 実行使用メモリ | 86,368 KB |
| 最終ジャッジ日時 | 2024-11-26 13:55:03 |
| 合計ジャッジ時間 | 6,096 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 21 |
ソースコード
H,W,Q = map(int,input().split())
dic = {}
ans = H*W
for i in range(Q):
y,x = map(int,input().split())
if x not in dic:
dic[x] = y
dame = H + 1 - y
else:
if y > dic[x]:
dame = 0
else:
dame = dic[x] - y
dic[x] = min(dic[x],y)
ans -= dame
print(ans)
ygd.