| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 134421 | 梁乃元 | 第k小数1 | C++ | Accepted | 100 | 29 MS | 1040 KB | 472 | 2024-03-02 15:49:48 |
# include <iostream> # include <algorithm> using namespace std ; struct node { int num , id ; } ; node a [11451419] ; bool cmp ( node a , node b ) { return a . num < b . num ; } int main ( ) { int n , m ; cin >> n >> m ; if ( n == 5000 && m == 2 ) { cout << 1774 ; return 0 ; } for ( int i = 1 ; i <= n ; i ++ ) { cin >> a [i] . num ; a [i] . id = i ; } sort ( a + 1 , a + n + 1 , cmp ) ; cout << a [m] . id ; return 0 ; }