# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
882796 | unexpectedbro | Prosjek (COCI14_prosjek) | C++14 | 1 ms | 436 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<bits/stdc++.h>
using namespace std;
int main() {
int n; cin >> n;
vector<int>a(n);
for (int &i : a) {
cin >> i;
}
vector<int>ans;
int x = 0;
for (int i = 1; i <= n; i++) {
ans.push_back(a[i - 1] * i - x);
x += ans.back();
}
for (auto i : ans) {
cout << i << " ";
}
cout << endl;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |