QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#537317#5304. Money GameSound_MediumWA 0ms3820kbC++23565b2024-08-30 09:58:242024-08-30 09:58:27

Judging History

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

  • [2024-08-30 09:58:27]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3820kb
  • [2024-08-30 09:58:24]
  • 提交

answer

#include <bits/stdc++.h>
#define int long long
using namespace std;
int n, m;

void solve () {
    cin>>n;
    vector<double>a(n);
    for(auto &v:a)cin>>v;
    int cnt=0;
    while(cnt<100){
        for(int i=0;i<n;i++){
            a[i]/=2;
            a[(i+1)%n]+=a[i];
        }
        
        cnt++;
    }for(int i=0;i<n;i++){
            cout<<a[i]<<" ";
        }cout<<endl;
}
signed main () {
    int T = 1; 
    std::ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
    //cin>>T;
    while (T --) solve ();
    return 0;
}

詳細信息

Test #1:

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

input:

2
4 2

output:

4 2 

result:

ok 2 numbers

Test #2:

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

input:

2
2 3

output:

3.33333 1.66667 

result:

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