F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

No place to hide

Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 763    Accepted Submission(s): 164


Problem Description
It was in a dark daybreak. Dr. Gneh, who was a crazy scientist once trying to dominate the whole humankind by deploying a powerful AI network, had been discovered in a mansion on the grand field outside city of ACM. This time, he got no place to hide.
To help specify the capture operation, let's assume the grand field had nothing else but the mansion on coordinate (Xm, Ym). N interpol elites had been assigned to N different positions around the mansion. The i-th interpol on initial position (Xi, Yi) could move at a maximum speed rate Vi m/s. It was said that Dr. Gneh had invent a rocket motorbike to escape this operation. According to our information, his ride could not change any direction, and ran at a maximum speed rate Vm m/s. For the human future, any failure in this operation was not acceptable. We had to make sure that Dr. Gneh would be captured no matter which way (a particular speed and direction) to flee. It was assumed that our interpols would take action from their positions immediately after Dr. Gneh left his hideout, and be informed of his flee direction at the same time.
Apparently, this was an interesting algorithm problem. Could you tell us whether this operation would be success by our given layout? If yes, what was the minimum number of interpols needed to achieve this success?
 

Input
There are multiple test cases.
The first line contains a number T (1 ¡Ü T ¡Ü 100) indicating the number of test cases.
In each test case, there is an integer N (1 ¡Ü N ¡Ü 1000) indicating the number of interpols on the first line.
In the following N+1 lines, describe the specification of Dr. Gneh and our N interpols, and the first line for Dr. Gneh and the next N lines for interpols.
On each line, three float numbers (range [-1e5, 1e5]) represent the speed rate in m/s(which is none negative), x and y coordinate in meters.
 

Output
For each test case, you only need to output one single number, the minimum number of interpols to capture Dr. Gneh. If it wouldn't be success with all our interpols, output number 0 instead.
 

Sample Input
2 4 1.0 0 0 1.0 1 0 1.0 0 1 1.0 -1 0 1.0 0 -1 4 2.0 0 0 1.0 1 0 1.0 0 1 1.0 -1 0 1.0 0 -1
 

Sample Output
2 0
 

Hint
If the distance between interpol and Dr. Gneh can be infinitely small, Dr. Gneh is considered to be captured.
 

Source
 

Statistic | Submit | Discuss | Note
Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-22 16:22:50, Gzip enabled