| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 54322 | 吴乐涵 | 第k小整数 | C++ | Wrong Answer | 18 | 0 MS | 296 KB | 334 | 2022-07-29 14:40:53 |
#include<bits/stdc++.h> using namespace std; int n,k,b=1,a[10001],t[10001]; int main(){ cin>>n>>k; for(int i=1;i<=n;i++){ cin>>a[i]; } for(int i=1;i<=n;i++){ t[a[i]]=a[i]; } for(int i=1;i<=10001;i++){ if(t[i]!=0){ a[b]=t[i]; b++; } } if(b<=k) cout<<"NO result"; else cout<<a[k]; return 0; }