結果

問題 No.11 カードマッチ
ユーザー AtamaokaCAtamaokaC
提出日時 2021-06-19 17:37:50
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 72 ms / 5,000 ms
コード長 253 bytes
コンパイル時間 367 ms
コンパイル使用メモリ 87,056 KB
実行使用メモリ 71,564 KB
最終ジャッジ日時 2023-09-05 01:03:41
合計ジャッジ時間 2,742 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 68 ms
71,208 KB
testcase_01 AC 65 ms
71,564 KB
testcase_02 AC 66 ms
71,544 KB
testcase_03 AC 72 ms
71,488 KB
testcase_04 AC 68 ms
71,480 KB
testcase_05 AC 68 ms
71,440 KB
testcase_06 AC 68 ms
71,512 KB
testcase_07 AC 69 ms
71,444 KB
testcase_08 AC 69 ms
71,356 KB
testcase_09 AC 69 ms
71,372 KB
testcase_10 AC 67 ms
71,432 KB
testcase_11 AC 68 ms
71,496 KB
testcase_12 AC 68 ms
71,540 KB
testcase_13 AC 66 ms
71,540 KB
testcase_14 AC 68 ms
71,368 KB
testcase_15 AC 68 ms
71,212 KB
testcase_16 AC 69 ms
71,492 KB
testcase_17 AC 68 ms
71,380 KB
testcase_18 AC 70 ms
71,536 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

inpl = lambda: list(map(int,input().split()))
W = int(input())
H = int(input())
N = int(input())
hset = set()
wset = set()
for _ in range(N):
    w, h = inpl()
    wset.add(w)
    hset.add(h)
Lh = len(hset)
Lw = len(wset)
print(Lh*W + H*Lw - Lh*Lw - N)
0