結果

問題 No.11 カードマッチ
ユーザー TomoyarnTomoyarn
提出日時 2023-01-04 18:23:04
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 71 ms / 5,000 ms
コード長 256 bytes
コンパイル時間 835 ms
コンパイル使用メモリ 86,948 KB
実行使用メモリ 71,572 KB
最終ジャッジ日時 2023-08-18 15:48:01
合計ジャッジ時間 2,569 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 67 ms
71,344 KB
testcase_01 AC 66 ms
71,316 KB
testcase_02 AC 66 ms
71,380 KB
testcase_03 AC 67 ms
71,188 KB
testcase_04 AC 67 ms
71,476 KB
testcase_05 AC 68 ms
71,216 KB
testcase_06 AC 68 ms
71,280 KB
testcase_07 AC 67 ms
71,308 KB
testcase_08 AC 68 ms
71,528 KB
testcase_09 AC 71 ms
71,364 KB
testcase_10 AC 68 ms
71,364 KB
testcase_11 AC 68 ms
71,572 KB
testcase_12 AC 67 ms
71,220 KB
testcase_13 AC 67 ms
71,272 KB
testcase_14 AC 68 ms
71,540 KB
testcase_15 AC 68 ms
71,496 KB
testcase_16 AC 68 ms
71,364 KB
testcase_17 AC 69 ms
71,372 KB
testcase_18 AC 68 ms
71,540 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

W = int(input())
H = int(input())
N = int(input())

mark = set()
number = set()

for _ in range(N):
    w, h = map(int, input().split())
    mark.add(w)
    number.add(h)

total = len(mark) * H + len(number) * W - len(mark) * len(number)

print(total - N)
0