QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#859180#9717. Defuse the BombsConfringoWA 8ms8960kbPython3342b2025-01-17 16:09:412025-01-17 16:09:53

Judging History

你现在查看的是最新测评结果

  • [2025-01-17 16:09:53]
  • 评测
  • 测评结果:WA
  • 用时:8ms
  • 内存:8960kb
  • [2025-01-17 16:09:41]
  • 提交

answer

T=int(input())
for c in range(T):
	n=int(input())
	a=[0]+list(map(int,input().split()))[::-1]
	# for i in range(n,0,-1):
		# a=[int(input())]+a
	l=0;r=10**10;s=0;m=0
	while l<r:
		print(l,r,s,m)
		if s<0:
			r=m
		else:
			l=m+1
		s=m=(l+r)>>1
		for i in range(n,0,-1):
			if a[i]<m:
				s-=m-a[i]
	print(f'Case #{c+1}: {m}')

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 8ms
memory: 8960kb

input:

2
2
1 1
3
1 2 3

output:

0 10000000000 0 0
1 10000000000 -4999999998 5000000000
1 5000000000 -2499999998 2500000000
1 2500000000 -1249999998 1250000000
1 1250000000 -624999998 625000000
1 625000000 -312499998 312500000
1 312500000 -156249998 156250000
1 156250000 -78124998 78125000
1 78125000 -39062498 39062500
1 39062500 -...

result:

wrong answer 1st lines differ - expected: 'Case #1: 3', found: '0 10000000000 0 0'