赞
踩
n,L=map(int,input().split())
c=list(map(int,input().split()))
c=[0]+c
def check(mid):
a=0
b=0
for i in range(1,n+1):
if c[i]>=mid:a+=1
elif c[i]==mid-1:b+=1
return a+min(b,L)>=midl=0
r=n
while(l<r):
mid=l+r+1>>1
if check(mid):
l=mid
else:
r=mid-1print(r)
n = int(input()) a = [0] + list(map(int, input().split())) a_s = [0 for i in range(n + 1)] for i
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。