logo AlgoBeat OnlineJudge
登录 注册

#213872. [CERC 2021] Radar

内存限制:256 MiB 时间限制:2000 ms 标准输入输出
题目类型:VJudge(洛谷) 评测方式:VJudge
上传者: 匿名

题目描述

We are using a special radar to scan an area. The radar accepts a list of distances, e.g. 2, 4, 1, and a list of angles, e.g. , , , , , and scans the points across all the given distances and angles. How close to some other points of interest will we be able to scan?

输入格式

The first line of the input gives three space-separated integers: , , , representing the number of radii, the number of angles, and the number of points of interest, respectively. Then lines follow, -th of which contains an integer , representing the distance from the radar that will be scanned. Then, lines follow, each containing two space-separated integers , , that represent Cartesian coordinates of a point, defining the -th angle. Then, lines follow, each containing two space-separated integers , , that represent the Cartesian coordinates of the -th point.

The angle, defined by the point , is the angle from the -axis to the ray from the origin through , .

输出格式

Output lines, -th of which should contain the distance from the point to the closest scanned point. The result will be considered correct if it is within the of absolute or relative precision.

样例

样例输入 1

3 7 5
2
4
7
8 4
2 8
-1 5
-7 2
-4 -4
1 -8
6 -3
3 -1
8 1
2 6
-5 2
-1 -1

样例输出 1

0.977772290466
2.750120773895
0.846777708005
1.464071052924
0.585786437627

数据范围与提示

Comment

Illustration of sample case:

:::align{center} :::

Input limits

  • All are pairwise distinct.
  • Rays, defined by , are pairwise distinct.