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

建议使用的浏览器:

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

5395:Piano in Tina Town

Special Judge 特殊评判
题目描述
Tina Town is a friendly place. People there care about each other.<br>
One day, Tina was playing the piano. The song that she was going to play consisted of $m$ notes, and the initial stamina of her is $n$. She would spend $k_i$ points stamina on the $i$-th note. Tina was a hardworking girl and she would spend all of her stamina on playing the piano.<br>
After playing a song, she would get $ cos(k_{1}X)cos(k_{2}X) \cdot \cdot \cdot cos(k_{m}X) $ points of happiness.<br>
Of course Tina knew she had many ways to spend all of her $n$ points of stamina to play $m$ notes. She would like to know the sum of happiness gained by all ways of playing. <br>
输入解释
The first line of input contains an integer $T$, representing the number of cases.

For each test case,
the first line contains 2 integers and a real number $m$,$n$,$X$, according to the text.
$1 \leq T \leq 10,1 \leq m \leq 30,1 \leq n \leq {10}^{9},0 \leq X \leq 10$
输出解释
For each test case, output an one-digit decimal representing the answer. <br>
Your answer will be judged correct if it has a difference with standard answer at most 1%.
输入样例
3
3 1 0
2 2 0
2 3 3.1415926
输出样例
0.0
1.0
0.0

提示
In the first test case,Tina has no way to play the pinao.So the answer is 0.
In the second test case,The only way to play the piano is $k_1=1,k_2=1$,So the answer is $cos(0)\times cos(0)=1$
In the third test case,$k_1=1,k_2=2 ~~ or ~~ k_1=2,k_2=1$,so the ans is 0.
Note that please use radians
来自杭电HDUOJ的附加信息
Recommend hujie

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-5395

最后修改于 2020-10-25T23:22:19+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
3000/1500MS(Java/Others) 131072/131072K(Java/Others)