当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

3825:Splendid Moment Collector

题目描述
Being a traveler is always an exciting and memorable experience, especially for iSea. He is a crazy Splendid Moment Collector, not only he likes the wonderful scenery very much, what’s more, he wants himself go through the moment at the very time!

Our beautiful country has N scenic spots, which can be treated as some single points with a coordinate (Xi, Yi), and as a clever prophet, iSea knows the splendid moment of each spots Ti, and he must arrive this spot exactly at Ti time if he want to collect this spot’s splendid moment.
iSea has a speed of V, while travelling between spots, obviously he will choose the shortest path: the straight line. In the beginning, he can choose any spot to start his journey, but in the end, he must return the spot he chooses at first.
Perfectionist pushes himself to gather everything all the time, so does iSea. However, life can’t stand by you the whole days. So iSea wonders the maximum number of splendid moments he can collect, and in all of these journeys have the maximum number, he expects to choose the one has the shortest distance.
输入解释
The first line contains a single integer T, indicating the number of test cases.
Each test case begins with two integers N, V. Their meanings are the same as the description.
Then N lines follow, each line contains three integers Xi, Yi, Ti, their meanings are also mentioned in the description.

Technical Specification

1. 1 <= T <= 50
2. 1 <= N <= 100
3. 1 <= V <= 1000
4. 1 <= Ti <= 100000
5. 1 <= Xi, Yi <= 10000
输出解释
or each test case, output the case number first, then the maximum number of splendid moments iSea can collect, then the minimum distance among all the eligible journeys, rounded to three fractional digits.
输入样例
3
2 2
1 1 1
1 3 2
3 2
1 1 1
2 2 2
1 3 2
3 2
1 1 1
2 2 2
1 3 3
输出样例
Case 1: 2 4.000
Case 2: 2 2.828
Case 3: 3 4.828
来自杭电HDUOJ的附加信息
Author iSea@WHU
Recommend lcy

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-3825

最后修改于 2020-10-25T23:07:19+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
2000/1000MS(Java/Others) 32768/32768K(Java/Others)