1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | #include<bits/stdc++.h>
using namespace std;
int32_t main(){
ios::sync_with_stdio(false);
int n,k;
cin >> n >> k;
int res = 1e9;
for(int i=0;i<n;i++) {
int x;
for(int j=0;j<=i;j++) {
cin >> x;
if((j+1)*(i-j+1) <= k)
res = min(res,x);
}
}
cout<<res<<"\n";
}
|