1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
#include <iostream>

using namespace std;

int main()
{
    ios_base::sync_with_stdio(false);
    int n, k, wyn=1000000;
    cin>>n>>k;
    for (int i=1; i<=n; ++i)
        for (int j=0; j<i; ++j)
        {
            int r;
            cin>>r;
            if ((j+1)*(i-j)<=k)
                wyn=min(wyn, r);
        }
    cout<<wyn<<endl;
    return 0;
}