Home > Back-end >  matrix
matrix

Time:11-11

Title description
Before McRae number N, and a matrix R * C, his task now is from R * C a N number, and fill in the this matrix, the matrix method of value of each row for bank is the difference between the maximum and minimum values, and the method of value for each row of the matrix maximum value of the method, the now, Tom wants to know what is the method of minimum value matrix,
Enter
Input a total of two lines,
The first line are three integers: n, r, c, (r, c & lt;=104 r * c & lt;=n & lt;
=106)The second line is n integers, Pi (0 & lt; PI & lt;
=109)O
Output an integer, which meet the conditions of minimum value,
The sample input Copy
2, 3, 7
170 205 225 190 260 225 160
Sample output Copy
30
Hope the guy to answer key code, or way of thinking, the younger brother thanked here,
The best is the antithesis of C code,