
ZOJ Problem Set  2623
Calculate the total area of two polygons. Input 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 Output the area one line percase (accurate to three fractional digits). Sample Input
3 3 Sample Output 0.750 Author: LIU, Yaoting Source: ZOJ Monthly, November 2005 