Convex
题号:NC237449
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
Special Judge, 64bit IO Format: %lld

题目描述

You are given two convex polygon, A and B such that B is strictly contained in A. Output the area of the largest convex polygon that is contained in A but do not have a common point with B.

In the given example, the blue polygon is A and the green one is B. The red polygon is a valid polygon that is in A but not in B, however it is not the largest such polygon.

输入描述:

The first line contains an integer n ().
The following n lines contains the n points of polygon A. The i-th point is described by two integers x_i and y_i where .
The -th line contains an integer m ().
The following m lines contains the m points of polygon B. The i-th point is described by two integers x_i and y_i where .

The points of the two convex polygons will be given in counter-clockwise order.

输出描述:

Output one real number, the answer.

Your answer will be considered correct if its absolute or relative error does not exceed . Formally let your answer be a, jury answer be b. Your answer will be considered correct if .
示例1

输入

复制
4
1 1
5 1
5 5
1 5
4
3 2
4 3
3 4
2 3

输出

复制
4.500000000000000