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
https://codeforces.net/contest/407/problem/D
Thanks so much ❤❤