結果

問題 No.11 カードマッチ
ユーザー ixmelixmel
提出日時 2017-03-30 19:19:22
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 295 bytes
コンパイル時間 91 ms
コンパイル使用メモリ 10,928 KB
実行使用メモリ 7,936 KB
最終ジャッジ日時 2023-09-21 08:47:03
合計ジャッジ時間 1,762 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

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