結果

問題 No.2309 [Cherry 5th Tune D] 夏の先取り
ユーザー 👑 p-adicp-adic
提出日時 2023-05-20 11:27:49
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 514 bytes
コンパイル時間 329 ms
コンパイル使用メモリ 87,160 KB
実行使用メモリ 80,576 KB
最終ジャッジ日時 2023-08-23 08:34:54
合計ジャッジ時間 84,958 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 354 ms
78,072 KB
testcase_01 TLE -
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 2,605 ms
80,564 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 2,578 ms
80,276 KB
testcase_08 AC 2,858 ms
79,544 KB
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 AC 2,739 ms
79,728 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 TLE -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 TLE -
testcase_32 -- -
testcase_33 -- -
testcase_34 -- -
testcase_35 -- -
testcase_36 -- -
testcase_37 -- -
testcase_38 -- -
testcase_39 -- -
testcase_40 -- -
testcase_41 -- -
testcase_42 -- -
testcase_43 -- -
testcase_44 -- -
testcase_45 -- -
testcase_46 -- -
testcase_47 -- -
testcase_48 -- -
testcase_49 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

I,R,=input,range
S,N,B,x=R(3),R(2),[0]*5,[0]*4
def J():
	return list(map(int,I().split()))
def U():
	global a
	s,b,c=sum(x),1,0
	for j in R(4):b,c=b*(x[j]>=0),c+x[j]*X[j]
	for j in S:b*=s-x[j]<=B[j+2]
	if b*(a<c):a=c
def V():
	for k in R(5):B[k]=A[k%3]if k%3!=j else y
	for i in S:
		for k in S:x[k]=B[i+2]-B[k+2]
		x[3]-=x[(i+2)%3]
		U()
	for w in N:
		x[3],x[0]=w,(B[0]+B[1]-B[2]-w)//2
		for k in N:x[1+k]=B[1-k]-x[0]-w
		U()
for t in R(int(I())):
	A,X,a=J(),J(),0
	for j in S:
		for y in R(A[j]+1):V()
	print(a)
0