結果

問題 No.11 カードマッチ
ユーザー rlangevinrlangevin
提出日時 2023-01-14 15:33:20
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 65 ms / 5,000 ms
コード長 213 bytes
コンパイル時間 1,129 ms
コンパイル使用メモリ 86,812 KB
実行使用メモリ 71,408 KB
最終ジャッジ日時 2023-08-26 21:34:47
合計ジャッジ時間 3,301 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 59 ms
71,280 KB
testcase_01 AC 59 ms
71,068 KB
testcase_02 AC 61 ms
71,068 KB
testcase_03 AC 59 ms
71,360 KB
testcase_04 AC 62 ms
71,256 KB
testcase_05 AC 64 ms
71,048 KB
testcase_06 AC 61 ms
71,344 KB
testcase_07 AC 61 ms
71,364 KB
testcase_08 AC 62 ms
71,284 KB
testcase_09 AC 61 ms
71,256 KB
testcase_10 AC 60 ms
71,280 KB
testcase_11 AC 61 ms
71,360 KB
testcase_12 AC 63 ms
71,360 KB
testcase_13 AC 62 ms
71,352 KB
testcase_14 AC 60 ms
71,408 KB
testcase_15 AC 63 ms
71,356 KB
testcase_16 AC 65 ms
71,340 KB
testcase_17 AC 63 ms
71,256 KB
testcase_18 AC 61 ms
71,360 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

W = int(input())
H = int(input())
N = int(input())
S, K = set(), set()
for i in range(N):
    s, k = map(int, input().split())
    S.add(s)
    K.add(k)
Ns, Nk = len(S), len(K)
print(Ns * H + Nk * W - Ns * Nk - N)
0