QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#95299 | #5129. Equalising Audio | _b_ | WA | 74ms | 4084kb | C++14 | 544b | 2023-04-09 13:49:42 | 2023-04-09 13:49:47 |
Judging History
answer
#include<iostream>
#include<iomanip>
#include<cmath>
using namespace std;
#define ll long long
const int MAXN = 1e5 + 50;
double n; int x;
int a[MAXN];
int main() {
cin >> n >> x;
ll xs = 0;
for (int i = 1; i <= n; i++) {
cin >> a[i];
xs += 1LL * a[i] * a[i];
}
long long wbbb = xs / n;
long double new_xs = (long double)wbbb;
long double ans = sqrt((long double)x / new_xs);
for (int i = 1; i <= n; i++) {
long double tmp = ans * (long double)a[i];
cout << setprecision(15) << tmp << " ";
}
return 0;
}
详细
Test #1:
score: 100
Accepted
time: 2ms
memory: 3588kb
input:
5 6 0 1 -2 3 -4
output:
0 1 -2 3 -4
result:
ok 5 numbers
Test #2:
score: 0
Accepted
time: 1ms
memory: 3588kb
input:
4 1 1 3 3 7
output:
0.242535625036333 0.727606875108999 0.727606875108999 1.69774937525433
result:
ok 4 numbers
Test #3:
score: 0
Accepted
time: 2ms
memory: 3584kb
input:
1 0 -1000000
output:
-0
result:
ok found '-0.0000000', expected '-0.0000000', error '-0.0000000'
Test #4:
score: 0
Accepted
time: 2ms
memory: 3700kb
input:
1 1000000 -1000000
output:
-1000
result:
ok found '-1000.0000000', expected '-1000.0000000', error '-0.0000000'
Test #5:
score: 0
Accepted
time: 2ms
memory: 3524kb
input:
1 1000000 1000000
output:
1000
result:
ok found '1000.0000000', expected '1000.0000000', error '0.0000000'
Test #6:
score: 0
Accepted
time: 74ms
memory: 4084kb
input:
100000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 10000...
output:
1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 ...
result:
ok 100000 numbers
Test #7:
score: -100
Wrong Answer
time: 40ms
memory: 4020kb
input:
100000 1000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...
output:
-nan -nan -nan -nan -nan -nan -nan -nan -nan -nan -nan -nan -nan -nan -nan -nan -nan -nan -nan -nan -nan -nan -nan -nan -nan -nan -nan -nan -nan -nan -nan -nan -nan -nan -nan -nan -nan -nan -nan -nan -nan -nan -nan -nan -nan -nan -nan -nan -nan -nan -nan -nan -nan -nan -nan -nan -nan -nan -nan -nan ...
result:
wrong output format Expected double, but "-nan" found