結果
| 問題 | No.11 カードマッチ | 
| コンテスト | |
| ユーザー |  nohakai3 | 
| 提出日時 | 2022-10-19 14:42:18 | 
| 言語 | PyPy3 (7.3.15) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 287 bytes | 
| コンパイル時間 | 231 ms | 
| コンパイル使用メモリ | 82,656 KB | 
| 実行使用メモリ | 68,068 KB | 
| 最終ジャッジ日時 | 2024-06-29 17:33:04 | 
| 合計ジャッジ時間 | 1,966 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 5 WA * 14 | 
ソースコード
w=int(input())
h=int(input())
n=int(input())
p=[]
for i in range(n):
    a,b=map(int,input().split())
    p.append([a,b])
cnt=[0]*w
for x in p:
    cnt[x[0]-1]+=1
y=max(cnt)
ans=0
for i in range(w):
    if cnt[i]>0:
        ans+=(h-cnt[i])
    elif cnt[i]==0:
        ans+=y
print(ans)
            
            
            
        