#include <bits/stdc++.h>
#define ll long long
using namespace std;
int main() {
int N;
cin >> N;
vector<int> A;
for (int i = 0; i < N; i++) {
int Ai;
cin >> Ai;
A.push_back(Ai);
}
vector<int> C;
for (int i = 0; i < N; i++) {
int Ci;
cin >> Ci;
C.push_back(Ci);
}
ll revenue = 0;
for (auto p = C.rbegin(); p + 1 != C.rend(); p++) {
revenue += *p;
cout << revenue << ' ';
}
revenue += C.front();
cout << revenue << endl;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
2 ms |
340 KB |
Output is correct |
3 |
Correct |
13 ms |
728 KB |
Output is correct |
4 |
Correct |
145 ms |
4660 KB |
Output is correct |
5 |
Correct |
224 ms |
9056 KB |
Output is correct |
6 |
Correct |
1 ms |
212 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
160 ms |
6184 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |