#P17186. [ICPC 2017 Hong Kong R] Nearby Bicycles
[ICPC 2017 Hong Kong R] Nearby Bicycles
Problem Description
With fast developments of information and communication technology, many cities today have established bicycle sharing systems. The key component of the system is to provide information on nearby bicycles to potential users.
Consider bicycles and customers, where each bicycle is located at coordinate for , and each user is located at coordinate for . The distance between two coordinates and is measured by . For each user , you are given a threshold , your task is to return the total number of bicycles that are within a distance of from user .
Input Format
The test data may contain many test cases. Each test case contains four lines. The first line of each case contains two integers, and (). The second line contains the coordinates, , of bicycles , respectively, which are separated by a space. The third line contains the coordinates, , of users , respectively, which are separated by a space. The fourth line contains the thresholds, , of the users. The last test case is followed by a line of two s. All the coordinate numbers in the input are in the range .
Output Format
The output for each test case contains a line of integers, , where each represents the total number of bicycles that are within a distance of from user , for .
4 2
(0,0) (0,1) (1,0) (1,1)
(0,0) (1,1)
1 1
0 0
3 3