結果

問題 No.11 カードマッチ
ユーザー Unbakedbread
提出日時 2025-08-07 00:59:01
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 40 ms / 5,000 ms
コード長 172 bytes
コンパイル時間 311 ms
コンパイル使用メモリ 82,604 KB
実行使用メモリ 53,964 KB
最終ジャッジ日時 2025-08-07 00:59:04
合計ジャッジ時間 2,170 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 19
権限があれば一括ダウンロードができます

ソースコード

diff #

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

ws,hs=set(),set()
for i in range(N):
	S,K=map(int,input().split())
	ws.add(S)
	hs.add(K)

print(W*H-(W-len(ws))*(H-len(hs))-N)
0