QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#859173 | #9717. Defuse the Bombs | zhenghanyun | TL | 10ms | 8960kb | Python3 | 227b | 2025-01-17 16:07:41 | 2025-01-17 16:07:42 |
Judging History
answer
T = int(input())
for i in range(T):
input();a=list(map(int,input().split()));l=1;r=int(9e9)
while l<=r:
s=0;m=l+r>>1
for x in a:
s+=max(0,m-x)
if s<=m:
l=m+1
else:
r=m-1
print(f"Case #{i+1}: {l}")
詳細信息
Test #1:
score: 100
Accepted
time: 10ms
memory: 8960kb
input:
2 2 1 1 3 1 2 3
output:
Case #1: 3 Case #2: 4
result:
ok 2 lines
Test #2:
score: -100
Time Limit Exceeded
input:
3 100000 968870229 246637522 23867348 170512761 317727561 135784257 788061221 6692201 96102115 164513402 826612817 675345177 690177641 969959105 957765211 678805726 936166573 281739681 760822473 521447491 619742216 102531432 633299481 698320991 55968513 399427883 808303141 53228160 432641457 7250014...
output:
Case #1: 2 Case #2: 2