QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#707890#5304. Money Gamelonelywolf#WA 0ms3932kbC++20649b2024-11-03 18:01:332024-11-03 18:01:34

Judging History

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

  • [2024-11-03 18:01:34]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3932kb
  • [2024-11-03 18:01:33]
  • 提交

answer

#include <bits/stdc++.h>  
using namespace std;  

#define int long long  

signed main() {  
    ios::sync_with_stdio(false);
    cin.tie(nullptr);  

    int n;
    cin >> n;

    int s = 0;
    for (int i = 0; i < n; i++) {
    	int x;
    	cin >> x;
    	s += x;
    }

    double v = 1.0 * s / (n + 1);
    int d = 1;
    for (int i = 1; i <= 1204; i++) {
    	d = (d * 2022) % n;
    }

    cout << fixed << setprecision(10);
    for (int i = 0; i < n; i++) {
    	if (i == d) {
    		cout << 2 * v << " \n"[i == n - 1];
    	} else {
    		cout << v << " \n"[i == n - 1];
    	}
    }

    return 0;
}  
  

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

2
4 2

output:

4.0000000000 2.0000000000

result:

ok 2 numbers

Test #2:

score: 0
Accepted
time: 0ms
memory: 3932kb

input:

2
2 3

output:

3.3333333333 1.6666666667

result:

ok 2 numbers

Test #3:

score: 0
Accepted
time: 0ms
memory: 3800kb

input:

2
851648 722281

output:

1049286.0000000000 524643.0000000000

result:

ok 2 numbers

Test #4:

score: 0
Accepted
time: 0ms
memory: 3924kb

input:

3
450762 114467 367746

output:

466487.5000000000 233243.7500000000 233243.7500000000

result:

ok 3 numbers

Test #5:

score: 0
Accepted
time: 0ms
memory: 3800kb

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: 3868kb

input:

5
616288 155735 783782 648639 349827

output:

425711.8333333333 851423.6666666666 425711.8333333333 425711.8333333333 425711.8333333333

result:

wrong answer 1st numbers differ - expected: '851423.6666667', found: '425711.8333333', error = '0.5000000'