hdu5954 Do not pour out
Posted 不积跬步无以至千里,不积小流无以成江海
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了hdu5954 Do not pour out相关的知识,希望对你有一定的参考价值。
You have got a cylindrical cup. Its bottom diameter is 2 units and its height is 2 units as well.
The height of liquid level in the cup is d (0 ≤ d ≤ 2). When you incline the cup to the maximal angle such that the liquid inside has not been poured out, what is the area of the surface of the liquid?
The height of liquid level in the cup is d (0 ≤ d ≤ 2). When you incline the cup to the maximal angle such that the liquid inside has not been poured out, what is the area of the surface of the liquid?
InputThe first line is the number of test cases. For each test case, a line contains a float-point number d.OutputFor each test case, output a line containing the area of the surface rounded to 5 decimal places.Sample Input
4 0 1 2 0.424413182
Sample Output
0.00000 4.44288 3.14159 3.51241
参考博客http://blog.csdn.net/danliwoo/article/details/53002695
以上是关于hdu5954 Do not pour out的主要内容,如果未能解决你的问题,请参考以下文章
HDU 5954 Do not pour out(二分+积分)
HDU 5954 - Do not pour out - [积分+二分][2016ACM/ICPC亚洲区沈阳站 Problem G]
RuntimeError: einsum(): operands do not broadcast with remapped shapes [original->remapped]
RuntimeError: einsum(): operands do not broadcast with remapped shapes [original->remapped]