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

建议使用的浏览器:

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

1819:Disks

题目描述
Consider N floating point numbers N representing the radii of N disks. We fix a disk in the xOy system, if we position it at a positive coordinate x (big enough), tangential to the 0x axis and above it and after that we push it to 0y until it becomes tangent to 0y or to the first disk that it meets on the way. In the configuration that results by fixing in order all the given disks, some of them can be considered as being dispensible, because, if we eliminate them, the total width of the configuration is the same, which means that there is no disk that can be moved to the left.

Identify all the indispensible disks for a given configuration (in the configuration from above; the gray disks are dispensible).
输入解释
The input has the following structure:
  • the first line contains N ( N <= 1000), the number of disks;
  • the next N lines contain N real numbers representing the radii of the disks, in the order they are fixed in the configuration.

输出解释
The output will have the following structure:
  • the first line will contain an integer K, representing the number of dispensable disks;
  • each of the next K lines will contain the order number of the dispensable disks.
输入样例
7
4
0.1
0.5
3
0.5
4
1 
输出样例
3
2
3
5

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

题目来源 Romania OI 2002

源链接: POJ-1819

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

共提交 0

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