<PREV Problem:
NEXT>
Solved by 161 users: ...
UserDateAttemptTimeCMSC
david_it2118 apr 2008Ruby108.36326 
rvashegin01 nov 2007C++100.16430 
bush10 apr 2003FPC100.21468 
kage02 oct 2009C++500.20513 
Vyshnya01 mar 2010C++1600.03524 
Savior14 mar 2006C++100.03526 
ilia23 sep 2011C++801.00539 
Fizmat_Zhomart29 dec 2006C++500.45553 
superzz12 sep 2007C++400.12554 
NDAT08 nov 2006FPC101.32558 
Languages
C++
83
FPC
47
Kylix
15
Java
9
C
6
Ruby
1
 > 
 > 
 > 
 > 
 > 
 > 
 > 
 > 
 > 
 > 

Two rectangles

Time limit = 2 second(s)

Big rectangle A is defined via inequalities 0 ≤ xMAXX, 0 ≤ yMAXY, where x and y are cartesian coordinates. There are N marked points inside the rectangle.

Rectangles B and C have sides parrallel to the sides of A. Intersection of B and C has null area. B and C have no marked points inside.

Please, write program which can determine maximum sum area of the rectangles B and C.

Input First line contains MAXX MAXY N. Then N lines follow. Each line contains coordinates of the i-th marked point — two real numbers xi and yi.

MAXX, MAXY, N ≤ 100, 0 ≤ xiMAXX, 0 ≤ yiMAXY,

Output Maximum sum area of two rectangles B and C with 2-digits precision.

Input#1
1 1 1
0.5 0.5
Output#1
1

Input#2
1 1 3
0.25 0.25
0.5 0.5
0.75 0.75

Output#2
0.75

Author:
Voroztsov Artem
16 February 2003

<PREV | Problem set | Search related messages | NEXT>


© acm.mipt DevGroup
The page was generated in 180ms

SW soft NIX
ID = 18.232.51.247