結果

問題 No.2375 watasou and hibit's baseball
ユーザー 👑 p-adicp-adic
提出日時 2023-07-08 16:44:28
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 413 bytes
コンパイル時間 350 ms
コンパイル使用メモリ 87,048 KB
実行使用メモリ 133,696 KB
最終ジャッジ日時 2023-09-29 18:10:30
合計ジャッジ時間 32,374 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 64 ms
71,352 KB
testcase_01 AC 63 ms
71,480 KB
testcase_02 AC 66 ms
71,216 KB
testcase_03 WA -
testcase_04 AC 83 ms
76,152 KB
testcase_05 AC 88 ms
76,420 KB
testcase_06 WA -
testcase_07 AC 68 ms
71,260 KB
testcase_08 AC 261 ms
86,488 KB
testcase_09 AC 67 ms
71,404 KB
testcase_10 AC 75 ms
76,304 KB
testcase_11 AC 128 ms
79,504 KB
testcase_12 AC 1,198 ms
124,496 KB
testcase_13 AC 605 ms
99,732 KB
testcase_14 AC 65 ms
71,156 KB
testcase_15 AC 420 ms
85,832 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 74 ms
76,468 KB
testcase_19 AC 64 ms
71,448 KB
testcase_20 AC 126 ms
79,308 KB
testcase_21 WA -
testcase_22 AC 70 ms
71,532 KB
testcase_23 AC 934 ms
121,320 KB
testcase_24 AC 1,015 ms
122,316 KB
testcase_25 AC 67 ms
71,456 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 AC 1,577 ms
131,140 KB
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
testcase_36 WA -
testcase_37 WA -
testcase_38 AC 994 ms
120,864 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

R=range
def J():
	return map(int,input().split())
N,A,B=J()
L=R(N)
Z=[list(J())for i in L]
P=R(1<<N)
D=[[[S>>i==1and i==j for j in L]for i in L]for S in P]
a=1
for S in P:
	for h in R(N**3):
		i,j,k=h%N,h//N%N,h//N**2
		d,v,w=D[S][i][j],Z[j],Z[k]
		if(S>>k&1<1)*d:
			if abs(w[0]-Z[i][0])+abs(w[1]-Z[i][1])+(i!=j)*(abs(w[0]-v[0])+abs(w[1]-v[1]))>=A or abs(w[2]-v[2])>=B:D[S|1<<k][j][k]=d=d+1
		a=max(a,d)
print(a)
0