結果

問題 No.2309 [Cherry 5th Tune D] 夏の先取り
ユーザー 👑 p-adicp-adic
提出日時 2023-05-20 10:43:07
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 568 bytes
コンパイル時間 993 ms
コンパイル使用メモリ 87,148 KB
実行使用メモリ 91,532 KB
最終ジャッジ日時 2023-08-23 08:07:52
合計ジャッジ時間 87,271 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 301 ms
77,848 KB
testcase_01 AC 2,393 ms
80,436 KB
testcase_02 AC 1,956 ms
80,644 KB
testcase_03 AC 2,060 ms
80,360 KB
testcase_04 AC 1,967 ms
80,440 KB
testcase_05 AC 2,046 ms
79,928 KB
testcase_06 AC 1,960 ms
79,580 KB
testcase_07 AC 2,135 ms
80,128 KB
testcase_08 AC 2,483 ms
80,156 KB
testcase_09 AC 2,081 ms
79,420 KB
testcase_10 AC 2,032 ms
80,300 KB
testcase_11 AC 1,862 ms
80,276 KB
testcase_12 AC 1,878 ms
80,268 KB
testcase_13 AC 2,149 ms
80,372 KB
testcase_14 AC 1,957 ms
80,356 KB
testcase_15 AC 2,018 ms
79,704 KB
testcase_16 AC 1,765 ms
80,256 KB
testcase_17 AC 2,034 ms
79,956 KB
testcase_18 AC 1,885 ms
80,608 KB
testcase_19 AC 1,764 ms
80,224 KB
testcase_20 AC 1,831 ms
80,480 KB
testcase_21 AC 1,792 ms
80,336 KB
testcase_22 AC 1,636 ms
80,236 KB
testcase_23 AC 1,962 ms
80,428 KB
testcase_24 AC 2,273 ms
79,980 KB
testcase_25 AC 2,115 ms
80,348 KB
testcase_26 AC 2,311 ms
79,980 KB
testcase_27 AC 2,022 ms
80,388 KB
testcase_28 AC 1,942 ms
80,168 KB
testcase_29 AC 2,160 ms
79,788 KB
testcase_30 AC 2,207 ms
79,580 KB
testcase_31 TLE -
testcase_32 TLE -
testcase_33 TLE -
testcase_34 TLE -
testcase_35 TLE -
testcase_36 AC 638 ms
78,932 KB
testcase_37 AC 327 ms
79,412 KB
testcase_38 AC 618 ms
79,460 KB
testcase_39 AC 389 ms
78,984 KB
testcase_40 AC 444 ms
77,992 KB
testcase_41 TLE -
testcase_42 TLE -
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