50分,WA#3,#4,#6,#7,#10
#include <bits/stdc++.h>
using namespace std;
const int M = 2e6 + 1e3 + 5;
int n, k;
int a[M];
int main() {
cin >> n >> k;
n = (n * (n + 1)) / 2;
for (int i = 1; i <= n; i ++) cin >> a[i];
int tot = 0;
for (int i = 1; i <= n; i ++) {
tot += i;
if (tot >= k) break;
}
sort(a + 1, a + tot + 1);
cout << a[1] << endl;
return 0;
}