| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 54627 | 陶俊宸 | 第k小整数 | C++ | Accepted | 100 | 1 MS | 292 KB | 336 | 2022-07-29 16:34:30 |
#include<bits/stdc++.h> using namespace std; bool f[30000]; int n,k,a,num[10000],nl; int main(){ scanf("%d %d",&n,&k); for(int i=0;i<n;i++){ scanf("%d",&a); if(!f[a-1]){ num[nl++]=a; f[a-1]=1; } } if(nl<k){ printf("NO RESULT"); return 0; } sort(num,num+nl); printf("%d",num[k-1]); return 0; }