8688: Radar Scanner

内存限制:128 MB 时间限制:1 S 标准输入输出
题目类型:传统 评测方式:文本比较 上传者:
提交:1 通过:1

题目描述


A military manoeuvre is going on a two-dimension Cartesian plane and nnn enemy targets are hiding somewhere.

Our troops has occupied a radar station located at the origin, and they realize that the radar scanner in the radar station can instruct the exact locations of the enemy targets in an open half-plane, where the boundary passes through the radar station.

Every time when the radar scanner shows some locations of the exposed enemy targets, Little Q, the commander of our troops, would like to know the minimum area of the convex polygon such that each exposed enemy target lies either on the boundary of the polygon or inside it, so that he can estimate the price to surround all the exposed enemy targets.

输入格式


The first line of the input contains two integers nnn (1≤n≤100000)(1 \le n \le 100\,000)(1n100000) and qqq (1≤q≤200000)(1 \le q \le 200\,000)(1q200000), indicating the number of enemy targets and the number of times the radar scanner shows some locations of the exposed enemy targets.
Each of the following nnn lines contains two integers xxx and yyy (−109≤x,y≤109)(-10^9 \le x,y \le 10^9)(109x,y109), indicating an enemy target located at coordinate (x,y)(x,y)(x,y).
Each of the following qqq lines contains two integers aaa and bbb (−109≤a,b≤109,a2+b2>0)(-10^9 \le a,b \le 10^9, a^2+b^2 > 0)(109a,b109,a2+b2>0), indicating that an enemy target located at coordinate (x,y)(x,y)(x,y) that satisfies ax+by>0ax+by > 0ax+by>0 will be exposed during the radar scan. Since it is a military manoeuvre, the exposed enemy targets will not be eliminated after the radar scan.

输出格式


Output qqq lines, each of which contains a single integer, indicating two times the minimum area of the desired convex polygon during the radar scan.

输入样例 复制

7 6
0 0
0 1
0 2
1 0
1 0
1 1
-1 0
0 1
1 0
1 1
0 -1
-1 2
-1 -1

输出样例 复制

1
0
2
0
3
0

分类标签