QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#859180 | #9717. Defuse the Bombs | Confringo | WA | 8ms | 8960kb | Python3 | 342b | 2025-01-17 16:09:41 | 2025-01-17 16:09:53 |
Judging History
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'