結果

問題 No.2309 [Cherry 5th Tune D] 夏の先取り
ユーザー 👑 p-adicp-adic
提出日時 2023-05-20 10:43:07
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 568 bytes
コンパイル時間 223 ms
コンパイル使用メモリ 82,264 KB
実行使用メモリ 85,344 KB
最終ジャッジ日時 2024-06-01 05:51:44
合計ジャッジ時間 83,380 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 316 ms
84,012 KB
testcase_01 AC 2,926 ms
79,540 KB
testcase_02 AC 2,591 ms
78,132 KB
testcase_03 AC 2,789 ms
78,772 KB
testcase_04 AC 2,617 ms
78,768 KB
testcase_05 AC 2,446 ms
78,768 KB
testcase_06 AC 2,527 ms
78,144 KB
testcase_07 AC 2,545 ms
78,516 KB
testcase_08 AC 2,848 ms
78,888 KB
testcase_09 AC 2,553 ms
78,896 KB
testcase_10 AC 2,456 ms
79,012 KB
testcase_11 AC 2,341 ms
78,396 KB
testcase_12 AC 2,473 ms
78,900 KB
testcase_13 AC 2,827 ms
79,164 KB
testcase_14 AC 2,398 ms
78,496 KB
testcase_15 AC 2,759 ms
78,424 KB
testcase_16 AC 2,271 ms
78,364 KB
testcase_17 AC 2,595 ms
78,524 KB
testcase_18 AC 2,417 ms
78,908 KB
testcase_19 AC 2,323 ms
78,624 KB
testcase_20 AC 2,372 ms
78,496 KB
testcase_21 AC 2,300 ms
79,008 KB
testcase_22 AC 2,039 ms
79,160 KB
testcase_23 AC 2,309 ms
79,140 KB
testcase_24 AC 2,939 ms
78,796 KB
testcase_25 AC 2,537 ms
78,772 KB
testcase_26 TLE -
testcase_27 AC 2,595 ms
78,880 KB
testcase_28 AC 2,577 ms
79,268 KB
testcase_29 AC 2,755 ms
78,900 KB
testcase_30 AC 2,793 ms
79,056 KB
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]*3,[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*=x[j]>=0
	for j in S:b*=s-x[j]<=B[(j+2)%3]
	if b:
		for j in R(4):c+=x[j]*X[j]
		a=max(a,c)
def V():
	for k in S:B[k]=A[k]if k!=j else y
	for i in S:
		x[i],s=0,B[(i+2)%3]
		for k in N:x[(i+1+k)%3]=s-B[(i+k)%3]
		x[3]=s-x[(i+1)%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