| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 54624 | 梅煦洋 | 第k小整数 | C++ | Wrong Answer | 18 | 0 MS | 368 KB | 379 | 2022-07-29 16:34:14 |
#include<bits/stdc++.h> using namespace std; int a[30010]={0}; int f[10010]={0}; int n,k,ren; int l=30001; int main(){ cin>>n>>k; for(int i=1;i<=n;i++){ cin>>ren; a[ren]=1; if(ren<l) l=ren; } int jj=1; for(int i=1;i<=30000;i++){ if(a[i]==1){ f[jj]=i; jj++; } } if(jj<k) cout<<"NO RESULT"<<endl; else cout<<f[k]<<endl; return 0; }