| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 109590 | 凌艺樽 | 第k小数1 | C++ | Wrong Answer | 0 | 29 MS | 1040 KB | 339 | 2023-11-09 20:19:05 |
#include <bits/stdc++.h> using namespace std; const int N=1e5+10; const int INF=0x3f3f3f3f; int n,k; struct node{ int sum,s; }a[N]; bool cmp(node x,node y) { return x.sum>y.sum; } int main() { cin>>n>>k; for(int i=1;i<=n;i++) { cin>>a[i].sum; a[i].s=i; } sort(a+1,a+n+1,cmp); cout<<a[k].s; return 0; }