結果
| 問題 | No.11 カードマッチ | 
| コンテスト | |
| ユーザー | 👑  Kazun | 
| 提出日時 | 2020-10-03 03:25:09 | 
| 言語 | PyPy3 (7.3.15) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 324 bytes | 
| コンパイル時間 | 286 ms | 
| コンパイル使用メモリ | 82,360 KB | 
| 実行使用メモリ | 53,892 KB | 
| 最終ジャッジ日時 | 2024-07-18 04:00:58 | 
| 合計ジャッジ時間 | 1,603 ms | 
| ジャッジサーバーID (参考情報) | judge1 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 18 WA * 1 | 
ソースコード
W=int(input())
H=int(input())
N=int(input())
A=set() #マーク
B=set() #数字
X=0
for _ in range(N):
    S,K=map(int,input().split())
    if S not in A:
        A.add(S)
        X+=(H-len(B)-(K not in B))
    else:
        X-=1
    if K not in B:
        B.add(K)
        X+=(W-len(A))
    else:
        X-=1
print(X)
            
            
            
        