R = list(map(int,input().split()))
cnt = int(input())
# R = [1, 4, 2, 5, 5, 1, 6]
# R = [1, 7, 8, 8, 1, 0, 2, 4, 9]
# cnt = 7
l, r = 0,max(R)
def check(limit):
sum = 0
for x in R:
sum+=min(x,limit)
return sum<=cnt
while l<r:
mid = (l+r+1)>>1
if check(mid):l=mid
else: r=mid-1
print(l)
1、交易系统的降级策略
于 2024-03-11 18:58:54 首次发布