QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#510967 | #7845. Fast Forward | 122 | WA | 0ms | 3616kb | C++14 | 516b | 2024-08-09 14:41:23 | 2024-08-09 14:41:23 |
Judging History
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 '