Logo
(追記) (追記ここまで)

25996번 - Equalising Audio 스페셜 저지다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
4 초 (추가 시간 없음) 1024 MB2451008643.655%

문제

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 $n$ amplitudes $a_1, \ldots, a_n,ドル with an average perceived loudness of $\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 $x$. There is one exception: total silence should always be preserved.

입력

The input consists of:

  • One line with a two integers $n$ and $x$ (1ドル\leq n\leq 10^5,ドル 0ドル \leq x \leq 10^6),ドル the number of amplitudes and the average perceived loudness to achieve.
  • One line with $n$ integers $a_1, \ldots, a_n$ ($\left| a_i \right| \leq 10^6$), the amplitudes.

출력

Output one line containing $n$ numbers, the renormalised amplitudes with an average perceived loudness of $x$.

Your answers should have an absolute or relative error of at most 10ドル^{-6}$.

제한

예제 입력 1

5 6
0 1 -2 3 -4

예제 출력 1

0 1 -2 3 -4

예제 입력 2

4 1
1 3 3 7

예제 출력 2

0.242535625 0.7276068751 0.7276068751 1.697749375

힌트

출처

ICPC > Regionals > Europe > Northwestern European Regional Contest > Benelux Algorithm Programming Contest > BAPC 2022 E번

  • 문제를 만든 사람: Abe Wits
(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /