编程介的小学生 2017-11-21 03:03 采纳率: 20.5%
浏览 563
已采纳

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

  • 写回答

2条回答 默认 最新

  • threenewbee 2018-08-14 16:13
    关注
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 有兄弟姐妹会用word插图功能制作类似citespace的图片吗?
  • ¥15 请教:如何用postman调用本地虚拟机区块链接上的合约?
  • ¥15 为什么使用javacv转封装rtsp为rtmp时出现如下问题:[h264 @ 000000004faf7500]no frame?
  • ¥15 乘性高斯噪声在深度学习网络中的应用
  • ¥15 关于docker部署flink集成hadoop的yarn,请教个问题 flink启动yarn-session.sh连不上hadoop,这个整了好几天一直不行,求帮忙看一下怎么解决
  • ¥15 深度学习根据CNN网络模型,搭建BP模型并训练MNIST数据集
  • ¥15 C++ 头文件/宏冲突问题解决
  • ¥15 用comsol模拟大气湍流通过底部加热(温度不同)的腔体
  • ¥50 安卓adb backup备份子用户应用数据失败
  • ¥20 有人能用聚类分析帮我分析一下文本内容嘛