QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#334448#5304. Money Game552HzWA 0ms3940kbC++14511b2024-02-21 23:13:492024-02-21 23:13:50

Judging History

你现在查看的是最新测评结果

  • [2024-02-21 23:13:50]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3940kb
  • [2024-02-21 23:13:49]
  • 提交

answer

#include<iostream>
const int N=1e6+10;
double a[N];
int n;
int main(){
    std::ios::sync_with_stdio(0);
    std::cin.tie(0);std::cout.tie(0);
    std::cin>>n;
    double sum=0;
    for(int i=1;i<=n;i++){
        std::cin>>a[i];
        sum+=a[i];
    }
    sum/=n+1;
    for(int i=1;i<=n;i++){
        a[i]=sum;
    }
    int x=0;
    for(int i=1;i<=1024;i++){
        x=(x*2022)%n;
    }
    a[x+1]+=sum;
    for(int i=1;i<=n;i++){
        std::cout<<a[i]<<" ";
    }
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3940kb

input:

2
4 2

output:

4 2 

result:

ok 2 numbers

Test #2:

score: -100
Wrong Answer
time: 0ms
memory: 3860kb

input:

2
2 3

output:

3.33333 1.66667 

result:

wrong answer 2nd numbers differ - expected: '1.6666667', found: '1.6666700', error = '0.0000020'