結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 297 ms
77,520 KB
testcase_01 AC 2,267 ms
80,152 KB
testcase_02 AC 1,958 ms
80,372 KB
testcase_03 AC 2,209 ms
80,320 KB
testcase_04 AC 2,120 ms
79,560 KB
testcase_05 AC 1,926 ms
80,648 KB
testcase_06 AC 1,982 ms
79,380 KB
testcase_07 AC 1,981 ms
80,216 KB
testcase_08 AC 2,187 ms
80,360 KB
testcase_09 AC 2,204 ms
80,768 KB
testcase_10 AC 1,931 ms
80,064 KB
testcase_11 AC 1,892 ms
80,312 KB
testcase_12 AC 1,916 ms
80,324 KB
testcase_13 AC 2,193 ms
80,592 KB
testcase_14 AC 1,982 ms
80,284 KB
testcase_15 AC 2,093 ms
80,748 KB
testcase_16 AC 1,798 ms
79,908 KB
testcase_17 AC 2,285 ms
80,184 KB
testcase_18 AC 2,001 ms
80,040 KB
testcase_19 AC 1,705 ms
79,212 KB
testcase_20 AC 1,799 ms
80,552 KB
testcase_21 AC 1,957 ms
80,196 KB
testcase_22 AC 1,661 ms
80,308 KB
testcase_23 AC 1,778 ms
80,312 KB
testcase_24 AC 2,148 ms
80,356 KB
testcase_25 AC 2,104 ms
79,892 KB
testcase_26 AC 2,208 ms
80,152 KB
testcase_27 AC 2,114 ms
79,996 KB
testcase_28 AC 2,021 ms
80,052 KB
testcase_29 AC 2,180 ms
80,328 KB
testcase_30 AC 2,200 ms
80,104 KB
testcase_31 TLE -
testcase_32 TLE -
testcase_33 TLE -
testcase_34 TLE -
testcase_35 TLE -
testcase_36 AC 666 ms
79,380 KB
testcase_37 AC 346 ms
80,368 KB
testcase_38 AC 618 ms
80,796 KB
testcase_39 AC 402 ms
79,636 KB
testcase_40 AC 471 ms
78,948 KB
testcase_41 TLE -
testcase_42 TLE -
testcase_43 AC 2,203 ms
79,760 KB
testcase_44 AC 2,110 ms
79,844 KB
testcase_45 AC 1,846 ms
79,716 KB
testcase_46 AC 1,998 ms
79,940 KB
testcase_47 AC 499 ms
78,112 KB
testcase_48 AC 706 ms
79,076 KB
testcase_49 AC 1,557 ms
78,400 KB
権限があれば一括ダウンロードができます

ソースコード

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:
		x[i],s=0,B[i+2]
		for k in N:x[(i+1+k)%3]=s-B[i+k]
		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