結果

問題 No.11 カードマッチ
ユーザー popketlepopketle
提出日時 2020-02-05 12:12:57
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 271 bytes
コンパイル時間 90 ms
コンパイル使用メモリ 11,924 KB
実行使用メモリ 10,128 KB
最終ジャッジ日時 2023-10-22 07:03:42
合計ジャッジ時間 1,516 ms
ジャッジサーバーID
(参考情報)
judge9 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
10,112 KB
testcase_01 AC 28 ms
10,112 KB
testcase_02 AC 29 ms
10,112 KB
testcase_03 AC 28 ms
10,112 KB
testcase_04 AC 29 ms
10,120 KB
testcase_05 AC 29 ms
10,112 KB
testcase_06 WA -
testcase_07 AC 29 ms
10,128 KB
testcase_08 AC 29 ms
10,128 KB
testcase_09 AC 30 ms
10,128 KB
testcase_10 AC 29 ms
10,116 KB
testcase_11 AC 29 ms
10,124 KB
testcase_12 AC 29 ms
10,124 KB
testcase_13 AC 29 ms
10,124 KB
testcase_14 AC 29 ms
10,124 KB
testcase_15 WA -
testcase_16 AC 29 ms
10,128 KB
testcase_17 AC 28 ms
10,128 KB
testcase_18 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

w=int(input())
h=int(input())
n=int(input())
SK=[list(map(int,input().split())) for _ in range(n)]

SK.sort()
wsum,hsum=1,1
for i in range(1,n):
    if SK[i-1][0]!=SK[i][0]:
        wsum+=1
    if SK[i-1][1]!=SK[i][1]:
        hsum+=1
print((w*h) - (w-wsum)*(h-hsum) - n)
0