#icpc2015summerday4e. [icpc2015summer_day4_e]Enclose Points
[icpc2015summer_day4_e]Enclose Points
MathJax.Hub.Config({ tex2jax: { inlineMath: [[""], ["\\(","\\)"]], processEscapes: true }}); blockquote { font-family: Menlo, Monaco, "Courier New", monospace; color: #333333; display: block; padding: 8.5px; margin: 0 0 9px; font-size: 12px; line-height: 18px; background-color: #f5f5f5; border: 1px solid #ccc; border: 1px solid rgba(0, 0, 0, 0.15); -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; white-space: pre; white-space: pre-wrap; word-break: break-all; word-wrap: break-word; }
Problem Statement
There are points and segments on the -plane. Each segment connects two of these points and they don't intersect each other except at the endpoints. You are also given points as queries. Your task is to determine for each query point whether you can make a polygon that encloses the query point using some of the given segments. Note that the polygon should not necessarily be convex.
Input
Each input is formatted as follows.
...
...
...
The first line contains three integers (), (), and (), which represent the number of points, the number of segments, and the number of queries, respectively. Each of the following lines contains two integers and (), the coordinates of the -th point. The points are guaranteed to be distinct, that is, when . Each of the following lines contains two integers and (), which indicate that the -th segment connects the -th point and the -th point. Assume that those segments do not intersect each other except at the endpoints. Each of the following lines contains two integers and (), the coordinates of the -th query point.
You can assume that, for any pair of query point and segment, the distance between them is at least .
Output
The output should contain lines. Print "Yes" on the -th line if there is a polygon that contains the -th query point. Otherwise print "No" on the -th line.
Sample Input 1
4 5 3
-10 -10
10 -10
10 10
-10 10
1 2
1 3
1 4
2 3
3 4
-20 0
1 0
20 0```
### Output for the Sample Input 1
```plain
No
Yes
No```
* * *
### Sample Input 2
```plain
8 8 5
-20 -20
20 -20
20 20
-20 20
-10 -10
10 -10
10 10
-10 10
1 2
1 4
2 3
3 4
5 6
5 8
6 7
7 8
-25 0
-15 0
0 0
15 0
25 0```
### Output for the Sample Input 2
```plain
No
Yes
Yes
Yes
No```
* * *
### Sample Input 3
```plain
8 8 5
-20 -10
-10 -10
-10 10
-20 10
10 -10
20 -10
20 10
10 10
1 2
2 3
3 4
1 4
5 6
6 7
7 8
5 8
-30 0
-15 0
0 0
15 0
30 0```
### Output for the Sample Input 3
```plain
No
Yes
No
Yes
No```
* * *