Logo
(追記) (追記ここまで)

6793번 - Biggest (Zero Carbon) Footprint 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 512 MB265531.250%

문제

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.

제한

예제 입력 1

5 5 2
1 1
3 3

예제 출력 1

12

힌트

출처

Olympiad > Canadian Computing Competition & Olympiad > 2011 > CCO 2011 6번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /