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

建议使用的浏览器:

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

5958:New Signal Decomposition

题目描述
We consider a sequence A with p float-point numbers denoted by $a_0,a_1,...,a_{p-1}$ where p is a prime number. To simplify our problem, we guarantee that p must be 13, 103 or 100003.
To make a decomposition for this sequence, we define the kernal functions
$$r(h,k)=2^{sin^{3}(2\pi \frac{hk}{p})}$$
Therefore we can get a new sequence B = {$b_0,b_1,  ... , b_{p-1}$} tranformed from the original sequence A where
$$b_{k}=\sum_{h=0}^{p-1}a_{h}*r(h,k)$$
Your mission is to calculate the new sequence B.
输入解释
The first line is the number of test cases. Each test case contains two lines. The first line contains an integer p. The second line contains p float-point numbers corresponding to the sequence A.
输出解释
For each test case, output p float-point numbers rounded to three decimal places in one line corresponding to the sequence B.
输入样例
13
7 0 0 0 0 0 0 0 0 0 0 0 0
13
1 2 3 4 5 6 7 8 9 10 11 12 13
13
11 7 7 7 7 7 7 7 7 7 7 7 7
输出样例
7.000 7.000 7.000 7.000 7.000 7.000 7.000
7.000 7.000 7.000 7.000 7.000 7.000
91.000 85.477 92.015 93.543 91.049 99.763
98.551 98.517 97.304 106.018 103.525
105.053 111.590
95.000 102.032 102.032 102.032 102.032
102.032 102.032 102.032 102.032 102.032
102.032 102.032 102.032
提示
Pay attention, please. You may notics that p we provided must be a prime number in {13,103,100003}.
In order to avoid misleading, we emphasize that our standard algorithm only considers the natures of prime numbers. You may need to do some extra easy calculations offline for specified input 13,103 and 100003 to simplify your program.
来自杭电HDUOJ的附加信息
Recommend jiangzijing2015

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

源链接: HDU-5958

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

共提交 0

通过率 --%
时间上限 内存上限
2000/1000MS(Java/Others) 65536/65536K(Java/Others)