QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#734448#5304. Money GameEMTzWA 0ms3920kbC++201.0kb2024-11-11 10:46:272024-11-11 10:46:30

Judging History

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

  • [2024-11-11 10:46:30]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3920kb
  • [2024-11-11 10:46:27]
  • 提交

answer

#include<bits/stdc++.h>
#define int long long
#define ull unsigned long long
using namespace std;
typedef pair<int,int>PII;
typedef pair<int,PII>PPI;
typedef array<int,3>ar;
typedef __int128 i28; 
const int N=100+7;
const int N1=1e9+9;
const int M=998244353;
const ull mask = std::chrono::steady_clock::now().time_since_epoch().count();
mt19937_64 rng(time(0));
const int M1=19260817;
const int base=233;
const int base1=131;
const int INF = 0x3f3f3f3f;
int a[N],val[N],dp[N][N*27][N];
int op[]={0,1,-1,2,-2};
int md(int a,int b)
{
	
	if(b==0)
	{
		if(a==0) return 0;
		return -1;
	}
//	if(a*b<0) return -1;
	if(a%b==0) return a/b;
	else return -1;
}
void solve()
{
	int n,a,b;
	cin>>n;
	double sum=0;
	for(int i=1;i<=n;i++)
	{
		int x;
		cin>>x;
		sum+=x;
	}
	sum/=(n+1);
	cout<<sum*2<<" ";
	for(int i=2;i<=n;i++)
	{
		cout<<sum<<" ";
	}
}	
signed main()
{
	std::ios::sync_with_stdio(false);
	cout.tie(0);cin.tie(0);
	int _=1;
//	cin>>_;
	while(_--)
	{
		solve();
	}
}

詳細信息

Test #1:

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

input:

2
4 2

output:

4 2 

result:

ok 2 numbers

Test #2:

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

input:

2
2 3

output:

3.33333 1.66667 

result:

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