Equalising Audio

아직 제출이 없습니다시간 제한4초메모리 제한1024 MB

문제

As a radio engineer at the Balanced Audio Podcast \copyright{} your job is to deliver an equal listening experience at all times. You did a poll among the listeners and they are especially concerned about fluctuations in loudness. To resolve this you bought a transformer to equalise the audio, but alas, its software got corrupted during transport.

Your job is to rewrite the equalising software. As input the transformer gets nn amplitudes a_1,,a_na\_1, \ldots, a\_n, with an average perceived loudness of 1n_i=1na_i2\frac{1}{n}\sum\_{i=1}^n a\_i^2. The output should contain the same amplitudes, but renormalised by some constant positive factor, such that the average perceived loudness is xx. There is one exception: total silence should always be preserved.

입력

The input consists of:

  • One line with a two integers nn and xx (1n1051\leq n\leq 10^5, 0x106)0 \leq x \leq 10^6), the number of amplitudes and the average perceived loudness to achieve.
  • One line with nn integers a_1,,a_na\_1, \ldots, a\_n (a_i106\left| a\_i \right| \leq 10^6), the amplitudes.

출력

Output one line containing nn numbers, the renormalised amplitudes with an average perceived loudness of xx.

Your answers should have an absolute or relative error of at most 10610^{-6}.