QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#761782#5304. Money Games1ameseWA 0ms3812kbC++20443b2024-11-19 10:14:422024-11-19 10:14:48

Judging History

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

  • [2024-11-19 10:14:48]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3812kb
  • [2024-11-19 10:14:42]
  • 提交

answer

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

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

	int n;
	cin >> n;

	vector<double> a(n);
	for (int i = 0; i < n; i++)
		cin >> a[i];

	for (int i = 0; i < min(n, 1000); i++) {
		for (int j = 0; j < n; j++) {
			a[(j + 1) % n] += a[j] / 2;
			a[j] /= 2;
		}
	}

	for (int i = 0; i < n; i++)
			cout << fixed << setprecision(8) << a[i] << " \n"[i == n - 1];
}

詳細信息

Test #1:

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

input:

2
4 2

output:

4.00000000 2.00000000

result:

ok 2 numbers

Test #2:

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

input:

2
2 3

output:

3.25000000 1.75000000

result:

wrong answer 1st numbers differ - expected: '3.3333333', found: '3.2500000', error = '0.0250000'