ZOJ Problem Set - 2623
Calculate the total area of two polygons.
There are multiple test cases. Each case begins with two integers N, M (3 <= N, M <= 50), the number of vertex s of two polygons. In the following N + M lines, each contains a pair of real numbers, which describes the coordinates of the vertexes, (xi, yi). The vertex starts from the first vertex to the second one, then from the second to the third, ... and so on.
Output the area one line percase (accurate to three fractional digits).
Author: LIU, Yaoting
Source: ZOJ Monthly, November 2005