結果

問題 No.11 カードマッチ
ユーザー tnoda_tnoda_
提出日時 2015-07-30 13:31:03
言語 Python2
(2.7.18)
結果
AC  
実行時間 11 ms / 5,000 ms
コード長 201 bytes
コンパイル時間 631 ms
コンパイル使用メモリ 6,732 KB
実行使用メモリ 6,196 KB
最終ジャッジ日時 2023-08-02 00:11:21
合計ジャッジ時間 1,695 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 11 ms
6,052 KB
testcase_01 AC 10 ms
6,104 KB
testcase_02 AC 10 ms
6,076 KB
testcase_03 AC 10 ms
6,160 KB
testcase_04 AC 11 ms
5,972 KB
testcase_05 AC 10 ms
6,160 KB
testcase_06 AC 11 ms
6,196 KB
testcase_07 AC 10 ms
6,072 KB
testcase_08 AC 11 ms
6,084 KB
testcase_09 AC 11 ms
6,064 KB
testcase_10 AC 10 ms
6,156 KB
testcase_11 AC 11 ms
6,088 KB
testcase_12 AC 11 ms
6,052 KB
testcase_13 AC 11 ms
5,976 KB
testcase_14 AC 11 ms
5,972 KB
testcase_15 AC 10 ms
6,060 KB
testcase_16 AC 11 ms
6,060 KB
testcase_17 AC 11 ms
6,164 KB
testcase_18 AC 11 ms
6,012 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

W = input()
H = input()
N = input()
ss = []
ks = []
for i in range(N):
    s, k = map(int, raw_input().strip().split())
    ss.append(s)
    ks.append(k)
print(W*H-(W-len(set(ss)))*(H-len(set(ks)))-N)
0