[Help] Maximum Area Rectangle Consists Of Distinct Values ?!

Revision en1, by Libraion, 2021-05-28 04:18:39

Given a 2D table of size $$$n \times m (n, m \leq 400)$$$. Cell $$$(i, j)$$$ has value $$$a[i][j] \leq 10^6$$$. Find the rectangle which has maximum area and the rectangle consists of pairwise distinct values.

Input:

3 3

1 3 4

2 4 3

5 6 3

Output: 6. (Rectangle $$$(1,1) \rightarrow (3, 2)$$$).

Thanks! <3

Tags rectangle, distinct value, maximum area

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Libraion 2021-05-28 04:18:39 372 Initial revision (published)