QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#380434 | #5304. Money Game | kevinyang# | WA | 1ms | 3956kb | C++17 | 648b | 2024-04-07 03:52:21 | 2024-04-07 03:52:22 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define double long double
signed main(){
cin.tie(nullptr)->sync_with_stdio(false);
int n;
cin >> n;
vector<double>a(n);
double sum = 0;
for(int i = 0; i<n; i++){
cin >> a[i];
sum+=a[i];
}
int pw = 1;
for(int i = 0; i<1204; i++){
pw*=2022;
pw%=n;
}
sum/=(n+1);
vector<double>ans(n, sum);
//cout << pw << '\n';
ans[pw]+=sum;
cout << fixed << setprecision(10);
for(int i = 0; i<n; i++){
cout << ans[i] << ' ';
}
cout << '\n';
return 0;
}
详细
Test #1:
score: 100
Accepted
time: 1ms
memory: 3884kb
input:
2 4 2
output:
4.0000000000 2.0000000000
result:
ok 2 numbers
Test #2:
score: 0
Accepted
time: 0ms
memory: 3880kb
input:
2 2 3
output:
3.3333333333 1.6666666667
result:
ok 2 numbers
Test #3:
score: 0
Accepted
time: 0ms
memory: 3944kb
input:
2 851648 722281
output:
1049286.0000000000 524643.0000000000
result:
ok 2 numbers
Test #4:
score: 0
Accepted
time: 1ms
memory: 3768kb
input:
3 450762 114467 367746
output:
466487.5000000000 233243.7500000000 233243.7500000000
result:
ok 3 numbers
Test #5:
score: 0
Accepted
time: 1ms
memory: 3836kb
input:
4 2 3 5 1
output:
4.4000000000 2.2000000000 2.2000000000 2.2000000000
result:
ok 4 numbers
Test #6:
score: -100
Wrong Answer
time: 0ms
memory: 3956kb
input:
5 616288 155735 783782 648639 349827
output:
425711.8333333333 851423.6666666667 425711.8333333333 425711.8333333333 425711.8333333333
result:
wrong answer 1st numbers differ - expected: '851423.6666667', found: '425711.8333333', error = '0.5000000'