結果

問題 No.11 カードマッチ
ユーザー yuki2006yuki2006
提出日時 2015-02-09 15:41:02
言語 PyPy2
(7.3.15)
結果
AC  
実行時間 72 ms / 5,000 ms
コード長 357 bytes
コンパイル時間 1,621 ms
コンパイル使用メモリ 76,672 KB
実行使用メモリ 75,904 KB
最終ジャッジ日時 2024-04-20 00:42:03
合計ジャッジ時間 3,581 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 68 ms
75,176 KB
testcase_01 AC 66 ms
75,648 KB
testcase_02 AC 65 ms
75,392 KB
testcase_03 AC 66 ms
75,512 KB
testcase_04 AC 67 ms
75,268 KB
testcase_05 AC 66 ms
75,648 KB
testcase_06 AC 65 ms
75,776 KB
testcase_07 AC 72 ms
75,392 KB
testcase_08 AC 70 ms
75,264 KB
testcase_09 AC 70 ms
75,264 KB
testcase_10 AC 69 ms
75,684 KB
testcase_11 AC 69 ms
75,704 KB
testcase_12 AC 67 ms
75,264 KB
testcase_13 AC 68 ms
75,280 KB
testcase_14 AC 68 ms
75,168 KB
testcase_15 AC 67 ms
75,544 KB
testcase_16 AC 67 ms
75,776 KB
testcase_17 AC 68 ms
75,904 KB
testcase_18 AC 67 ms
75,136 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# -*- coding: utf-8 -*-

def solve(W, H, N, S, K):
    return W * H - (W - len(set(S))) * (H - len(set(K))) - N


if __name__ == '__main__':
    W = int(raw_input())
    H = int(raw_input())
    N = int(raw_input())
    S = [0] * N
    K = [0] * N

    for n in xrange(N):
        S[n], K[n] = map(int, raw_input().split(" "))
    print solve(W, H, N, S, K)
0