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