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

建议使用的浏览器:

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

3555:Cocktail

Special Judge 特殊评判
题目描述

Cylindrical vessel of height H (0 < H ≤ 10 000) and bottom radius R (0 < R ≤ 10000) stands on a horizontal surface. There are two liquids in the vessel. The liquids have different density and do not mix. D1 and D2 are densities of the first and the second liquids respectively, 0 < D2 < D1 ≤ 10000. h1 and h2 are heights of layers of the first and the second liquids, h1, h2 > 0, h1 + h2H. There is a cube made of a solid material. The cube’s edge length is n (0 < n ≤ 1.4*R), the material’s density is D (0 < D ≤ 10 000). The cube is put down into the vessel in such a way that one of its sides is horizontal.  Pay attention that some amount of liquid may pour out of the vessel. As a result of the operation the cube floats in liquids or lie on the vessel bottom.

You need to calculate the height of the vessel which is occupied by the liquids after the cube is put down into the vessel. You may neglect damping and some other physical effects, but you should take into account Archimedean Principle.

输入解释

The only line of the input contains numbers H, R, D1, h1, D2, h2, D and n separated by spaces. All the numbers are real. Each of them does not contain more than three digits in its fractional part.

输出解释

The output contains one real number – the height you need to calculate. Absolute error must not exceed 10−3.

输入样例
50 5 2.5 10 1.5 10 1.5 3
输出样例
20.344

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

源链接: POJ-3555

最后修改于 2020-10-29T07:04:26+00:00 由爬虫自动更新

共提交 0

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