Animesh decides to settle down

All submissions for this problem are available.
After trying his luck in programming contests, Animesh has decided to accept his fate and settle down the good oldfashioned way. He has decided to own a farm and be a shepherd. He knows of n grass varieties, each of which grows in a convex polygon area. Some of these polygons may intersect each other. Each grass is lush green and nutritious, and he cannot make up his mind on where he should settle.
His friend Malvika, a long time shepherd herself (this is the other Malvika), suggested that he buy a piece of land where he can find all the n grass varieties, so that his sheep will be fat and produce lots of wool. Animesh liked the idea and wants to buy as much of such a pasture as possible. However, being short on money, he decided to be judicious, and only buy land which is covered by all the n grasses. That is, he would not buy even a bit of land which isn't part of all n of the grassy polygons. Can you please help in finding out the maximum area of land he can buy?
Input
 First line will contain an integer n, denoting the number of polygons.
 Then, the next lines will contain description of n polygons, description of the i^{th} polygon is given as below.
 First line will contains a single integer c denoting number of points in the polygon.
 each of the next c lines will have two space separated integers x[j], y[j] denoting x and y coordinate respectively of the jth point of the polygon. These points will be given in anticlockwise order.
Output
 Output your answer in a separate line. Your answer will be considered correct if it has an absolute error less than 1e2.
Constraints
 1 ≤ n ≤ 30
 3 ≤ c ≤ 30
 10^{5} ≤ x, y ≤ 10^{5}
Example
Input: 3 4 15 0 15 5 0 5 0 0 4 2 3 15 3 15 10 2 10 4 19 7 5 7 5 1 19 1 Output: 20.000
Explanation
Each region in the current case is rectangular in shape. You can check that the area of intersection of all the three input rectangles is another rectangle with corners at (5,3), (15,3), (15,5) and (5,5). This is the place Animesh is going to settle in. The area of this rectangle is 10 * 2 = 20.
Author:  admin2 
Tags  acm15chn, admin2, computational, geometry 
Date Added:  17012016 
Time Limit:  1 sec 
Source Limit:  50000 Bytes 
Languages:  C, CPP14, JAVA, PYP3 
Comments
 Please login at the top to post a comment.
SUCCESSFUL SUBMISSIONS
Fetching successful submissions
HELP
If you are still having problems, see a sample solution here. 