https://ac.nowcoder.com/acm/contest/9033/A
先算出选手的最终得分
如何排序
小A的总分大于等于第m名即可
#include<bits/stdc++.h> using namespace std; long long n,m,p; double s[100005]; int main() { cin>>n>>m>>p; for(int i=1;i<=n;i++){ long long a,b; scanf("%lld%lld",&a,&b); s[i]=(a*0.85+b*0.15); } sort(s+1,s+n+1); cout<<int(max(ceil((s[n-m+1]-p*0.15)/0.85),0.0))<<"\n"; return 0; }