結果

問題 No.2309 [Cherry 5th Tune D] 夏の先取り
ユーザー 👑 p-adicp-adic
提出日時 2023-05-20 15:47:13
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 621 bytes
コンパイル時間 395 ms
コンパイル使用メモリ 87,064 KB
実行使用メモリ 83,648 KB
最終ジャッジ日時 2023-08-23 09:42:22
合計ジャッジ時間 75,123 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 385 ms
78,068 KB
testcase_01 AC 2,837 ms
78,732 KB
testcase_02 AC 2,669 ms
78,356 KB
testcase_03 AC 2,761 ms
78,892 KB
testcase_04 AC 2,605 ms
78,352 KB
testcase_05 AC 2,450 ms
78,708 KB
testcase_06 AC 2,535 ms
78,484 KB
testcase_07 AC 2,532 ms
78,492 KB
testcase_08 AC 2,876 ms
78,396 KB
testcase_09 AC 2,584 ms
78,584 KB
testcase_10 AC 2,493 ms
78,420 KB
testcase_11 AC 2,352 ms
78,308 KB
testcase_12 AC 2,532 ms
78,424 KB
testcase_13 AC 2,761 ms
78,796 KB
testcase_14 AC 2,385 ms
78,528 KB
testcase_15 AC 2,737 ms
78,848 KB
testcase_16 AC 2,347 ms
78,264 KB
testcase_17 AC 2,643 ms
78,628 KB
testcase_18 AC 2,418 ms
78,912 KB
testcase_19 AC 2,354 ms
78,288 KB
testcase_20 AC 2,379 ms
78,608 KB
testcase_21 AC 2,283 ms
78,132 KB
testcase_22 AC 2,035 ms
78,152 KB
testcase_23 AC 2,130 ms
78,416 KB
testcase_24 AC 2,740 ms
78,660 KB
testcase_25 AC 2,551 ms
78,256 KB
testcase_26 AC 2,939 ms
78,436 KB
testcase_27 AC 2,600 ms
79,016 KB
testcase_28 AC 2,591 ms
78,620 KB
testcase_29 AC 2,745 ms
78,480 KB
testcase_30 AC 2,809 ms
78,460 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 #

def m():
	I,R=input,range
	S,N,B,x=R(3),R(2),[0]*6,[0]*4
	def J():
		return list(map(int,I().split()))
	def U():
		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]
		return c if b else 0
	def V():
		m=0
		for k in R(6):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]=B[i]+B[i+1]-B[i+2]
			m=max(m,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
			m=max(m,U())
		return m
	for t in R(int(I())):
		A,X,a=J(),J(),0
		for j in S:
			for y in R(A[j]+1):a=max(a,V())
		print(a)
if __name__=="__main__":m()
0