Vasya and matrix#3535

Vasya and matrix

1 sekunt
128 megabaýt
Örän ýeňil

Vasya received a rectangular matrix of size n \times m as a gift from his mother. Each cell of the matrix contains an integer. At first, Vasya enthusiastically played various mathematical games with the matrix: sometimes he would swiftly compute its determinant, and sometimes he would easily raise it to different powers.

However, he eventually got bored of such games and came up with a new pastime: Vasya chooses an integer and tries to find a submatrix of maximum area such that the sum of all its elements does not exceed . A submatrix is defined as a rectangular fragment of the original matrix.

Giriş

The first line contains three integers: , , and k~(1 \le n, m \le 300,\ 1 \le k \le 10^9).

The next lines each contain non-negative integers, each of which does not exceed .

Çykyş

Print a single integer — the area of the largest submatrix whose sum of elements does not exceed .

Mysallar

1-nji mysal

Loading
Loading

2-nji mysal

Loading
Loading