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

建议使用的浏览器:

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

3929:Timer

题目描述
Recently, some archaeologists discovered an ancient relic on a small island in the Pacific Ocean. In the relic, they found an interesting cone shaped container with transparent bottom. The container lay on the horizontal ground with its central axis parallel to the ground. Just beside the container, they found a manual telling them something about the container. The container was a timer for a special ceremony. Ancient people filled it all with water before the ceremony, and when the ceremony began, they pulled out the plug in the small hole on the tip of the cone to let the water out. There was a horizontal line called “sacred line” carved on the bottom of the cone, and when the water level hit that line, they pushed the plug back and ended the ceremony. But the archaeologists could not found the sacred line on that cone. In order to sell the timer at a good prize, the archaeologists wanted to recover that very important line. By the manual they figured out how much water flew out when the ceremony ended, but they don't know what to do next, so they come to you for help.

They measures the height of the cone, and the diameter of the bottom, you should tell them the sacred line's height above the ground.

输入解释
The first line of the input contains an integer T(1<=T<=20), indicating the number of test cases. Each line after that is a test case. It contains three real numbers, H, D(1<=H,D<=1000) and V, indicating the height and bottom diameter of the timer, and the volume of water that flew out during the ceremony. That volume is guaranteed to be less than half volume of the container.
输出解释
For each test case, output one line containing the height of the sacred line above the ground. You should round off the answers to the 5th decimal place. (For example, rounding off 4.000005 equals to 4.00001 and rounding off 4.000004 equals to 4.00000)
输入样例
2 
5.0 10.0 0.0 
5.0 10.0 65.4498
输出样例
10.00000 
5.00000
提示
Here are some formulas you may need. Please notice that in these formulas, Log means loge or ln.

__poj_jax_start__\int\sqrt{x^2-a^2}dx=\frac{1}{2}x\sqrt{x^2-a^2}-\frac{1}{2}a^2Log\left[x+\sqrt{x^2-a^2}\right]+C__poj_jax_end__\int\sqrt{x^2-a^2}dx=\frac{1}{2}x\sqrt{x^2-a^2}-\frac{1}{2}a^2Log\left[x+\sqrt{x^2-a^2}\right]+C
__poj_jax_start__\int\sqrt{x^2+a^2}dx=\frac{1}{2}x\sqrt{x^2+a^2}+\frac{1}{2}a^2Log\left[x+\sqrt{x^2+a^2}\right]+C__poj_jax_end__\int\sqrt{x^2+a^2}dx=\frac{1}{2}x\sqrt{x^2+a^2}+\frac{1}{2}a^2Log\left[x+\sqrt{x^2+a^2}\right]+C
__poj_jax_start__\int\sqrt{a^2-x^2}dx=\frac{1}{2}\left(x\sqrt{a^2-x^2}+a^2ArcTan\left[\frac{x}{\sqrt{a^2-x^2}}\right]\right)+C__poj_jax_end__\int\sqrt{a^2-x^2}dx=\frac{1}{2}\left(x\sqrt{a^2-x^2}+a^2ArcTan\left[\frac{x}{\sqrt{a^2-x^2}}\right]\right)+C
__poj_jax_start__\int Log\left[a+\sqrt{a^2-x^2}\right]dx=aArcTan\left[\frac{x}{\sqrt{a^2-x^2}}\right]+x\left(-1+Log\left[a+\sqrt{a^2-x^2}\right]\right)+C__poj_jax_end__\int Log\left[a+\sqrt{a^2-x^2}\right]dx=aArcTan\left[\frac{x}{\sqrt{a^2-x^2}}\right]+x\left(-1+Log\left[a+\sqrt{a^2-x^2}\right]\right)+C
__poj_jax_start__\int xLog\left[a+\sqrt{a^2-x^2}\right]dx=\frac{1}{4}\left(a^2-x^2-2a\sqrt{a^2-x^2}+2x^2Log\left[a+\sqrt{a^2-x^2}\right]\right)+C__poj_jax_end__\int xLog\left[a+\sqrt{a^2-x^2}\right]dx=\frac{1}{4}\left(a^2-x^2-2a\sqrt{a^2-x^2}+2x^2Log\left[a+\sqrt{a^2-x^2}\right]\right)+C
__poj_jax_start__\int x^2Log\left[a+\sqrt{a^2-x^2}\right]dx=\frac{1}{18}\left(-2x^3-3ax\sqrt{a^2-x^2}+3a^3ArcTan\left[\frac{x}{\sqrt{a^2-x^2}}\right]+6x^3Log\left[a+\sqrt{a^2-x^2}\right]\right)+C__poj_jax_end__\int x^2Log\left[a+\sqrt{a^2-x^2}\right]dx=\frac{1}{18}\left(-2x^3-3ax\sqrt{a^2-x^2}+3a^3ArcTan\left[\frac{x}{\sqrt{a^2-x^2}}\right]+6x^3Log\left[a+\sqrt{a^2-x^2}\right]\right)+C

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

题目来源 Beijing 2008

源链接: POJ-3929

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

共提交 0

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