# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
81630 | xiaowuc1 | Prosjek (COCI14_prosjek) | C++14 | 2 ms | 708 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>
/*
unsigned seed1 = std::chrono::system_clock::now().time_since_epoch().count();
mt19937 g1.seed(seed1);
ios_base::sync_with_stdio(false);
cin.tie(NULL);
*/
using namespace std;
const double PI = 2 * acos(0);
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;
typedef pair<int, ll> pill;
typedef pair<ll, ll> pll;
typedef long double ld;
typedef vector<vector<ll>> matrix;
ll l[105];
ll ret[105];
int n;
int main() {
scanf("%d", &n);
for(int i = 1; i <= n; i++) {
scanf("%lld", &l[i]);
}
ret[1] = l[1];
for(int i = 2; i <= n; i++) {
ret[i] = l[i] * i;
for(int a = 1; a < i; a++) {
ret[i] -= ret[a];
}
}
for(int i = 1; i <= n; i++) {
printf("%lld", ret[i]);
if(i == n) printf("\n");
else printf(" ");
}
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |