# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
99537 | AKaan37 | Prosjek (COCI14_prosjek) | C++14 | 4 ms | 576 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;
typedef long long int lo;
typedef pair< int,int > PII;
#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define fio() ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define FOR for(lo i=1;i<=n;i++)
#define mid (bas+son)/2
const lo MAX = -1000000000000000000;
const lo MIN = 1000000000000000000;
const lo inf = 1000000000;
const lo KOK = 100000;
const lo LOG = 30;
const lo li = 100005;
const lo mod = 1000000007;
lo n,m,cev,b[li],a[li],k;
string s;
vector<int> v;
int main(){
scanf("%lld",&n);
FOR{
scanf("%lld",&a[i]);
}
lo tut=0;
b[1]=a[1];
tut+=a[1];
for(lo i=2;i<=n;i++){
b[i]=a[i]*i-tut;
tut+=b[i];
}
FOR printf("%lld ",b[i]);
return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |