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

建议使用的浏览器:

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

2640:Playground

题目描述
George has K <= 20 steel wires shaped in the form of half-circles, with radii a1, a2, . . . , aK. They can be soldered (connected) at the ends, in any angle. Is it possible for George to make a closed shape out of these wires? He does not have to use all the wires.
The wires can be combined at any angle, but may not intersect. Beware of floating point errors.
输入解释
Each data set consists of a number 0 < K <= 20 on a line by itself, followed by a line of K space-separated numbers ai. Each number is in the range 0 < ai < 107, and has at most 3 digits after the decimal point.
The input will be terminated by a zero on a line by itself.
输出解释
For each test case, there should be one word on a line by itself; "YES" if it is possible to make a simple connected figure out of the given arcs, and "NO" if it isn’t.
输入样例
1
4.000
2
1.000 1.000
3
1.455 2.958 4.424
7
1.230 2.577 3.411 2.968 5.301 4.398 6.777
0
输出样例
NO
YES
NO
YES

该题目是Virtual Judge题目,来自 北京大学POJ

题目来源 Nordic 2005

源链接: POJ-2640

最后修改于 2020-10-29T06:37:59+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
1000 65536