为啥两个哇啊
查看原帖
为啥两个哇啊
930127
fzukzh楼主2023/2/10 22:31
n,m=map(int,input().split())
lst=[]
for i in range(n):
    lst1=list(map(int,input().split()))
    lst.append(lst1)
lst.sort(key=lambda x:(x[1],-x[0]),reverse=True)
s=lst[int(m*1.5)][1]
count=0
for x in lst:
    if x[1]>=s:
        count+=1
print(f'{s} {count}')
for x in lst:
    if x[1]>=s:
        print(f'{x[0]} {x[1]}')
2023/2/10 22:31
加载中...