Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
78880 sh25_ganzy 谁考了第k名 C++ 解答错误 0 MS 256 KB 511 2025-12-28 14:12:45

Tests(0/1):


#include<bits/stdc++.h> using namespace std; int main(){ int n,k; cin>>n>>k; float a[n],t; float b[n]; for(int i=0;i<n;i++){ cin>>a[i]>>b[i]; } for(int i=0;i<n;i++){ for(int j=i;j<n-1;j++){ if(b[j]<b[j+1]){ t=a[j]; a[j]=a[j+1]; a[j+1]=t; t=b[j]; b[j]=b[j+1]; b[j+1]=t; } } } cout<<a[k]<<" "<<b[k]; return 0; }


测评信息: