| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 54445 | 张弛 | 第k小整数 | C++ | Accepted | 100 | 1 MS | 376 KB | 352 | 2022-07-29 15:30:47 |
#include<bits/stdc++.h> using namespace std; int n,k,a[10001]; int b[30001]; int main(){ cin>>n>>k; if(n<k){ cout<<"NO RESULT"; return 0; } for(int i=1;i<=n;i++){ cin>>a[i]; b[a[i]]++; } for(int i=1;i<=30000;i++){ if(b[i]>0) k--; if(k==0){ cout<<i; return 0; } } cout<<"NO RESULT"; return 0; }