結果

問題 No.11 カードマッチ
ユーザー 👑 rin204rin204
提出日時 2022-01-20 21:21:24
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 76 ms / 5,000 ms
コード長 218 bytes
コンパイル時間 507 ms
コンパイル使用メモリ 87,024 KB
実行使用メモリ 71,520 KB
最終ジャッジ日時 2023-08-15 21:22:50
合計ジャッジ時間 2,744 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 62 ms
71,420 KB
testcase_01 AC 63 ms
71,168 KB
testcase_02 AC 76 ms
71,164 KB
testcase_03 AC 64 ms
71,432 KB
testcase_04 AC 63 ms
71,496 KB
testcase_05 AC 61 ms
71,312 KB
testcase_06 AC 64 ms
71,228 KB
testcase_07 AC 62 ms
71,520 KB
testcase_08 AC 61 ms
71,220 KB
testcase_09 AC 63 ms
71,168 KB
testcase_10 AC 60 ms
71,228 KB
testcase_11 AC 60 ms
71,136 KB
testcase_12 AC 62 ms
71,292 KB
testcase_13 AC 60 ms
71,200 KB
testcase_14 AC 61 ms
71,400 KB
testcase_15 AC 61 ms
71,072 KB
testcase_16 AC 63 ms
71,276 KB
testcase_17 AC 63 ms
71,368 KB
testcase_18 AC 61 ms
71,252 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

w = int(input())
h = int(input())
n = int(input())
W = set()
H = set()
ans = 0
for _ in range(n):
    s, k = map(int, input().split())
    W.add(s)
    H.add(k)

ans = h * w - (h - len(H)) * (w - len(W)) - n
print(ans)
0