QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#510967#7845. Fast Forward122WA 0ms3616kbC++14516b2024-08-09 14:41:232024-08-09 14:41:23

Judging History

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

  • [2024-08-09 14:41:23]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3616kb
  • [2024-08-09 14:41:23]
  • 提交

answer

#include <bits/stdc++.h>
#define IOS ios::sync_with_stdio(false);cin.tie(0); 
using namespace std;
#define int long long
#define INF 0x3f3f3f3f
#define inf 1e9


signed main() {
	IOS;
	int n,m;
	cin>>n>>m;
	vector<int>vec(2*n+1,0);
	int sum=0;
	for(int i=1;i<=n;i++)
	{
		cin>>vec[i];
		vec[i+n]=vec[i];
		sum+=vec[i];
	}
	vector<int>ans;
	for(int i=1;i<=n;i++)
	{
		int c=sum;
		c-=vec[i];
		ans.push_back(c/m);	
	}
	for(int i=ans.size()-1;i>=0;i--)
		cout<<ans[i]<<" ";
}    





详细

Test #1:

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

input:

7 7
1 1 1 1 1 1 1

output:

0 0 0 0 0 0 0 

result:

ok single line: '0 0 0 0 0 0 0 '

Test #2:

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

input:

3 3
1 1 3

output:

0 1 1 

result:

ok single line: '0 1 1 '

Test #3:

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

input:

10 5
4 1 5 5 1 3 2 1 5 2

output:

5 4 5 5 5 5 4 4 5 5 

result:

wrong answer 1st lines differ - expected: '5 4 5 4 4 5 4 4 5 4', found: '5 4 5 5 5 5 4 4 5 5 '