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

建议使用的浏览器:

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

1231:New Horizons

题目描述

I’m king of a house! And, what’s more, beyond that,
I’m king of a blueberry bush and a cat!
I’m Yertle the Turtle! Oh, marvelous me!
For I am the ruler of all that I see!"
The Problem
Yertle has determined that the number of objects he can see, and hence rule, depends on the height of his
throne. Your task, as Minister of Computing and Vertigo (a new combined Super Ministry), is to
determine which objects Yertle would see should he build his throne to a particular height.
Standard input consists of:
A floating point number on a line by itself, specifying the diameter of Yertle’s planet in "flipper
lengths".
A line containing three floating point numbers: the height of Yertle’s throne (in flipper lengths), the
latitude of Yertle’s throne (between -90 and +90 degrees), the longitude of Yertle’s throne (between 0
and 360 degrees).
Several lines, each containing three floating point numbers and a string of alphabetic and space
characters. Each line indicates the height, latitude, longitude and name of an object on the surface of
Yertle’s planet. The last line is indicated by the end of standard input.
All distances are in flipper lengths, and all latitudes and longitudes are in degrees. Floating point values
are formatted as a string of decimal digits with an optional decimal point and sign. The fields in the input
are separated by exactly one space character. You may assume that no object hides another; only the
horizon limits Yertle’s view.
Standard output consists of:
The list of objects whose tops are visible to Yertle, in alphabetical order.

输入样例
20000.0
100.0 45.0 100.0
2.0 46.0 99.0 Cat
20.0 -45.0 260.0 House
5.0 45.1 100.2 Blueberry Bush
输出样例
Blueberry Bush
Cat

该题目包含在题集 ACM赛制

题目来源 19 June

共提交 11

通过率 54.55%
时间上限 内存上限
1000 MS 128 MB