結果

問題 No.11 カードマッチ
ユーザー ixmel
提出日時 2017-03-30 19:20:03
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 294 bytes
コンパイル時間 89 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-07-07 03:05:31
合計ジャッジ時間 1,160 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 18 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

cox,coy=1,1
W=int(input())
H=int(input())
n=int(input())
out=0
w=[]
h=[]
for i in range(n):
	x,y=map(int,input().split())
	a,b=0,0
	for j in range(i):
		if w[j]==x:a=1
		if h[j]==y:b=1
	w.append(x)
	h.append(y)
	if a==0:out+=H-coy
	if b==0:out+=W-cox
	if a==0:cox+=1
	if b==0:coy+=1
print(out)
0