結果
問題 |
No.1338 Giant Class
|
ユーザー |
|
提出日時 | 2021-01-15 22:12:19 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 308 bytes |
コンパイル時間 | 315 ms |
コンパイル使用メモリ | 82,048 KB |
実行使用メモリ | 158,080 KB |
最終ジャッジ日時 | 2024-11-26 15:21:25 |
合計ジャッジ時間 | 43,860 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 8 TLE * 13 |
ソースコード
from collections import defaultdict H, W, Q = map(int, input().split()) A = defaultdict(lambda: float('inf')) ans = H * W for _ in range(Q): Y, X = map(int, input().split()) A[X] = min(A[X], Y) m = W - len(A.keys()) ans = H * m for k, v in A.items(): ans += v - 1 print(ans)