|시간 제한||메모리 제한||제출||정답||맞은 사람||정답 비율|
|2 초||512 MB||2||2||2||100.000%|
Having just recently won the lottery, you decide to build a summer resort nestled deep in a forest. However, being a very eco-friendly person, you decide not to cut down any of the trees that grow in the forest. Given a map of the forest and the positions of its trees, determine the area of the largest rectangular plot you can buy that does not contain any of the trees. (Note that your plot must have edges which are parallel to the x and y axes.)
The first line contains n, m, and t (0 < n, m < 10, 000, 0 < t < 10, 000) representing the dimensions of the given map of the forest and the number of trees indicated on the map respectively. The next t lines each contain two integers x and y (0 ≤ x ≤ n, 0 ≤ y ≤ m) describing the location of each tree (where (0, 0) is the bottom leftmost point on the map and (n, m) is the top rightmost point on the map).
Output the area of the largest rectangle that does not contain any of the given trees.
5 5 2 1 1 3 3