結果

問題 No.11 カードマッチ
ユーザー takakintakakin
提出日時 2020-04-12 21:57:25
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 29 ms / 5,000 ms
コード長 240 bytes
コンパイル時間 898 ms
コンパイル使用メモリ 11,872 KB
実行使用メモリ 10,096 KB
最終ジャッジ日時 2023-10-23 17:50:41
合計ジャッジ時間 2,498 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

import sys
input=lambda: sys.stdin.readline().rstrip()
w=int(input())
h=int(input())
n=int(input())
W,H=set(),set()
for i in range(n):
  s,k=map(int,input().split())
  W.add(s)
  H.add(k)
ww,hh=len(W),len(H)
ans=ww*h+w*hh-n-ww*hh
print(ans)
0