#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
vector<ll> solve_subtask_2(ll n, const vector<ll>& a, const vector<ll>& c) {
vector<ll> ans(n, 0);
partial_sum(c.rbegin(), c.rend(), ans.begin(), plus<ll>());
return ans;
}
void print_vec(const vector<ll>& v) {
for(const ll& vv : v) {
cout << vv << " ";
}
cout << endl;
}
int main() {
ll n;
cin >> n;
vector<ll> a(n, 0);
vector<ll> c(n, 0);
for(ll& av : a) {
cin >> av;
}
for(ll& cv : c) {
cin >> cv;
}
// Assume that subtask 2 holds
print_vec(solve_subtask_2(n, a, c));
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
3 ms |
332 KB |
Output is correct |
3 |
Correct |
12 ms |
980 KB |
Output is correct |
4 |
Correct |
123 ms |
7648 KB |
Output is correct |
5 |
Correct |
235 ms |
15244 KB |
Output is correct |
6 |
Correct |
0 ms |
212 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
169 ms |
12284 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |