QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#699631#5304. Money Gametsogsummit#WA 0ms3960kbC++14852b2024-11-02 10:11:182024-11-02 10:11:19

Judging History

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

  • [2024-11-02 10:11:19]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3960kb
  • [2024-11-02 10:11:18]
  • 提交

answer

#include <iostream>
#include <algorithm>
#include <cmath>
#include <map>

#define ll long long
#define F first
#define S second
#define pb push_back
#define mp make_pair

using namespace std;

ll binpow(ll a, ll b , int mod) {
    ll res = 1;
    a %= mod;
    while(b > 0) {
        if(b & 1){
            res = res * a;
            res %= mod;
        }
        a = a * a;
        a %= mod;
        b >>= 1;
    }
    return res % mod;
}

int main(){
    long long n , i;
    cin >> n;
    long long a;
    long long sum = 0 ;
    for(i = 0 ; i < n ; i ++){
        cin >> a;
        sum += a;
    }
    long double k = sum * 1.0 / (n + 1);
    long long uld = binpow(2022 , 1204 , n);
    for(i = 0 ; i < n ; i++){
        if(i == uld) printf("%.9Lf " , k * 2.0);
        else printf("%.9Lf " , k);
    }
}

詳細信息

Test #1:

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

input:

2
4 2

output:

4.000000000 2.000000000 

result:

ok 2 numbers

Test #2:

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

input:

2
2 3

output:

3.333333333 1.666666667 

result:

ok 2 numbers

Test #3:

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

input:

2
851648 722281

output:

1049286.000000000 524643.000000000 

result:

ok 2 numbers

Test #4:

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

input:

3
450762 114467 367746

output:

466487.500000000 233243.750000000 233243.750000000 

result:

ok 3 numbers

Test #5:

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

input:

4
2 3 5 1

output:

4.400000000 2.200000000 2.200000000 2.200000000 

result:

ok 4 numbers

Test #6:

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

input:

5
616288 155735 783782 648639 349827

output:

425711.833333333 851423.666666667 425711.833333333 425711.833333333 425711.833333333 

result:

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