编程介的小学生 2020-02-08 11:53 采纳率: 20.5%
浏览 208

No place to hide 隐藏的问题

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

  • 写回答

1条回答 默认 最新

  • CSDN-Ada助手 CSDN-AI 官方账号 2022-09-20 23:52
    关注
    不知道你这个问题是否已经解决, 如果还没有解决的话:

    如果你已经解决了该问题, 非常希望你能够分享一下解决方案, 写成博客, 将相关链接放在评论区, 以帮助更多的人 ^-^
    评论

报告相同问题?

悬赏问题

  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog