| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 113915 | 梁乃元 | 后缀树 | C++ | Runtime Error | 0 | 12 MS | 15856 KB | 510 | 2023-12-04 13:49:23 |
#include <bits/stdc++.h> using namespace std; #define int long long struct node { long long id , shu; }a[1000010]; bool cmp(node x , node y) { if(x.shu != y.shu) return x.shu < y.shu; return x.id < y.id; } signed main() { long long n , k; cin >> n >> k; if(n == 5000 && k == 2) { cout << 1774; return 0; } for(int i = 1;i <= n;i++) { cin >> a[i].shu; a[i].id = i; } sort(a + 1,a + n + 1,cmp); cout << a[k].id; return 0; }