Submission #729755

#TimeUsernameProblemLanguageResultExecution timeMemory
729755WinterProsjek (COCI14_prosjek)C++17
50 / 50
1 ms320 KiB
#include <bits/stdc++.h> using namespace std; #define pb push_back #define ll long long #pragma GCC optimize("O3") #pragma GCC target("avx,avx2") int main(){ ios_base::sync_with_stdio(false); cin.tie(NULL); ll n; cin >> n; vector<ll> v(n); for(ll i = 0; i<n; i++){ cin >> v[i]; } vector<ll> ans; ans.pb(v[0]); ll sum=v[0]; for(ll i = 1; i<n; i++){ ans.pb(((i+1)*v[i])-sum); sum+=ans[i]; } for(ll i = 0; i<n; i++) cout << ans[i] << " "; }
#Verdict Execution timeMemoryGrader output
Fetching results...