1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include <iostream>

using namespace std;;

int main ()
{
    int mi = 2020;
    int n, k;
    cin >> n >> k;
    for(int j=1;j<=n;j++)
    {
        for (int i=1;i<=j;i++)
        {
            int x;
            cin >> x;
            if (i*(j-i+1) <= k)
                mi = min (x, mi);
        }
    }
    cout << mi;
}
/*
5 7
1999
2019 2010
850 1500 1600
900 900 710 650
1000 800 600 1 500
*/