結果

問題 No.11 カードマッチ
ユーザー brthyyjpbrthyyjp
提出日時 2021-11-19 00:35:56
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 79 ms / 5,000 ms
コード長 296 bytes
コンパイル時間 318 ms
コンパイル使用メモリ 86,700 KB
実行使用メモリ 71,424 KB
最終ジャッジ日時 2023-08-27 19:35:34
合計ジャッジ時間 2,892 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,424 KB
testcase_01 AC 75 ms
71,100 KB
testcase_02 AC 75 ms
71,404 KB
testcase_03 AC 79 ms
70,876 KB
testcase_04 AC 73 ms
71,256 KB
testcase_05 AC 75 ms
71,272 KB
testcase_06 AC 74 ms
71,388 KB
testcase_07 AC 75 ms
71,320 KB
testcase_08 AC 73 ms
71,096 KB
testcase_09 AC 74 ms
71,300 KB
testcase_10 AC 74 ms
71,344 KB
testcase_11 AC 73 ms
70,852 KB
testcase_12 AC 72 ms
71,096 KB
testcase_13 AC 73 ms
70,872 KB
testcase_14 AC 73 ms
71,100 KB
testcase_15 AC 72 ms
71,320 KB
testcase_16 AC 74 ms
71,176 KB
testcase_17 AC 75 ms
71,404 KB
testcase_18 AC 73 ms
71,416 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
import io, os
input = io.BytesIO(os.read(0,os.fstat(0).st_size)).readline

w = int(input())
h = int(input())
n = int(input())
S = set()
K = set()
for i in range(n):
    s, k = map(int, input().split())
    S.add(s)
    K.add(k)
a = len(S)
b = len(K)
ans = h*w-(w-a)*(h-b)-n
print(ans)
0