結果
| 問題 | No.11 カードマッチ | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2020-11-20 09:59:00 | 
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 33 ms / 5,000 ms | 
| コード長 | 254 bytes | 
| コンパイル時間 | 490 ms | 
| コンパイル使用メモリ | 12,544 KB | 
| 実行使用メモリ | 10,880 KB | 
| 最終ジャッジ日時 | 2024-07-23 12:00:12 | 
| 合計ジャッジ時間 | 1,992 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 19 | 
ソースコード
W = int(input())
H = int(input())
N = int(input())
suit = set()
number = set()
for i in range(N):
    line = input().split()
    suit.add(int(line[0]))
    number.add(int(line[1]))
result = W * H - (W - len(suit)) * (H - len(number)) - N
print(result)
            
            
            
        