結果
| 問題 | No.11 カードマッチ | 
| コンテスト | |
| ユーザー |  momoyuu | 
| 提出日時 | 2022-03-22 03:09:38 | 
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 503 bytes | 
| コンパイル時間 | 284 ms | 
| コンパイル使用メモリ | 12,672 KB | 
| 実行使用メモリ | 10,880 KB | 
| 最終ジャッジ日時 | 2024-10-09 18:00:00 | 
| 合計ジャッジ時間 | 1,652 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 11 WA * 8 | 
ソースコード
def main():
    import sys
    input = sys.stdin.readline
    W = int(input())
    H = int(input())
    N = int(input())
    SK = [list(map(int,input().split())) for _ in range(N)]
    count = W+H-2
    count *= N
    
    for i in range(N):
        for j in range(i+1,N):
            if SK[i][0] == SK[j][0]:
                count -= W
            elif SK[i][1] == SK[j][1]:
                count -= H
            else:
                count -= 2
    print(count)
if __name__ == '__main__':
    main()
            
            
            
        