Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
78541 sh25_ganzy 求第k大数 C++ 解答错误 0 MS 236 KB 329 2025-12-26 18:37:52

Tests(0/1):


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


测评信息: