# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
877854 | slumio | Prosjek (COCI14_prosjek) | C++17 | 0 ms | 348 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;
using ll=long long;
using ull=unsigned long long;
void solve(){
ll n;
cin>>n;
ll m;
int ans=0;
vector<ll>a;
for(ll i=1;i<=n;i++)
{
cin>>m;
a.push_back(i*m-ans);
ans+=a[a.size()-1];
}
int p=a.size();
cout<<a[0];
for(int i=1;i<p;i++)cout<<' '<<fixed<<a[i];
return;
}
int main()
{
solve();
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |