Oscar HealthOA #1
Members Lacking Provider Network Access
估计中等可在线判题
If any required specialty of a member has no provider within the maximum Euclidean distance, report that member.
The standard input/output format and supplementary bounds on this site are as defined in this problem statement.
输入格式
The first line contains the provider count P, the member count M (both ≤1000), and the integer maxDistance (≤10^9); then P lines providerId specialty x y follow, and then M lines memberId x y specialty|specialty.... Coordinates and ID values are integers, and a specialty contains no spaces; memberId is unique, and each member requires ≤10 specialty values in total.
输出格式
Output the memberId of every member who cannot get adequate network access, in ascending order, one per line; output nothing if there are none.
样例 1
输入:
2 2 5
1 Cardiology 1 2
2 Dermatology 3 4
101 2 3 Cardiology|Dermatology
102 10 10 Cardiology
输出:
102
样例 2
输入:
1 1 5
1 Cardiology 0 0
7 3 4 Cardiology
输出:
样例 3
输入:
7 7 7
0 Card 4 -10
1 Card -10 -5
2 Dental -6 5
3 Card 4 -8
4 Card 2 -5
5 Dental -6 -1
6 Dental -6 3
100 -4 5 Dental
101 10 -2 Card|Dental
102 -2 8 Dental
103 2 9 Card|Dental
104 -3 6 Card|Dental
105 5 8 Card
106 -5 3 Dental
输出:
101
103
104
105