結果
| 問題 |
No.11 カードマッチ
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-12-13 20:24:27 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 57 ms / 5,000 ms |
| コード長 | 278 bytes |
| コンパイル時間 | 223 ms |
| コンパイル使用メモリ | 82,432 KB |
| 実行使用メモリ | 65,792 KB |
| 最終ジャッジ日時 | 2024-06-27 14:38:05 |
| 合計ジャッジ時間 | 1,981 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 19 |
ソースコード
W = int(input())
H = int(input())
N = int(input())
cnt = [0]*W
s = set()
for _ in range(N):
Si, Ki = map(int, input().split())
Si -= 1
cnt[Si] += 1
s.add(Ki)
ans = 0
for c in cnt:
if c==0:
ans += len(s)
else:
ans += H-c
print(ans)