Submission #483914

# Submission time Handle Problem Language Result Execution time Memory
483914 2021-11-01T10:43:24 Z asandikci Prosjek (COCI14_prosjek) C++17
50 / 50
1 ms 204 KB
/*
Copyright © 2021 Aliberk Sandıkçı. All rights reserved.

    ddddddddddddddddddddddddddddddddddhdhhhhhho//+yhddddddhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh 
  ddddddddddddddddddddddddddddddhhhhhhhhhhdhh+/syo/yhhy/+yhhhysyysyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
 dddddddddddddddddddddddddddddhyhddddhdhddhho/sos+-:++-:/:osyoosshysysssyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
ddddddddddddddddddddddddddddhsyhddhhyyyyso/:/o/o:-::..`./-/:-..-oo:+ossoyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
ddddddddddddddddddddddddddddhyhhsso+++++/:-..:+/:-....```:....```:::oyyyoyhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
ddddddddddddddddddddddddddddhhhs/:/++::---.......-....`````..````-:/+so++syyhhhhhhhdddhhhhhhhhhhhhhhhhhhhhhhhhh
mmmmmmmmmmmmmmmmmmmmmmdddddddyo----..-----.-:-.```...`  `````````.:----::::+syyhhddddddhhhhhhhhhhhhhhhhhhhhhhhh
mmmmmmmmmmmmmmmmmmmmmmmmddddh++-````.....``.--.```````  ` ``.``````.``-/+/-:+++shddhdddddddddhhhhhhhhhhhhhhhhhh
mmmmmmmmmmmmmmmmmmmmmmdddhyy/-:-``````````````````      `  ```````````----.-:---:shhhhhhhdddddddddhhhhhhhhhhhhh
mmmmmmmmmmmmmmmmmmmmmdhy+:--.``..``````````` ```               ```` ```.-..://o++.+yyhhhhhdddddddddddddhhhhhhhh
mmmmmmmmmmmmmmmmmmmmdsos-.``````.``````````````                  ``   ``.--+sssos`-sssyhhhddddddddddddddhhhhhhh
mmmmmmmmmmmmmmmmmmddsosh/.`````````````````````                   ``  `````.----.`-//oyhhhdddddddddddddddddddhh
mmmmmmmmmmmmmmmdhhhyo:+/-.```````  ```````````                         ```````.-`.-.-+syyyhhddddddddddddddddddd
mmmmmmmmmmmmmmhyoshy::/:-.``````  `````````````                       ``````.`````````:+sysyhhhdddddddddddddddd
mmmmmmmmmmmmdsyyso/o:/:.```````   ````` ```````````                    ```````    ``````.:-::oyyhdddddddddddddd
mmmmmmmmmmmmyhhhy+:++-..`` ```     `   `````.`.....`````````````                 `````````-/.`:shdddddddddddddd
mmmmmmmmmmmmdyyys+:/+-..`` ```      ` ``.---..-------:-:::----..````            `````-````-:.`.ohdddddddddddddd
mmmmmmmmmmmmmmds:-/:.`..`````      ```.::://----------:/:::::::--..````         ` ``````...-``.sddddddddddddddd
mmmmmmmmmmmmmmdh:-..````````      ```.://+ooo+/::-----/////////:-:-..````         ```````.````+hddddddddddddddd
mmmmmmmmmmmmmdhyo/....``````` ``````-/+osyyssssoo++//+++++/////:-::--...``           `` `` ``+shddddddddddddddd
mmmmmmNNNNmmmdhs:-```..```````````.:osyyhyyyyyyyyssssssooo+++///:::----..``      `   `  ```.:oooossyhdddddddddd
NNNNNNNNNNmmdho-..``.```````````../osyyhhhhhhhhhyyyysssssssoo+++/::::---..``    ```````` ```....-+ssshddddddddd
NNNNNNNNNNmmo/:-.``````````````.-+osyhhhddddddhhhyyyyyyyysssooo++//:::---..``  `      ``  ```.....-ssyhdddddddd
NNNNNNNNNNmh.--.```````````````-/ssyhhhhdddddddhhhhyyyyyyysssooo++//::::---..`            ````:-...+oshhddddddd
NNNNNNNNNNmd+-..```.``.```````.:+syhhhyyyhhhhhhhhhhhyyyyyyssoo+//:--.........``             ``:-..--oyhdddddddd
NNNNNNNNNNdsyo-.`.```.```````.-+ssso++//:::://+osyyyyyyssso+::..`````.....``..`     `      ```-/-.-./shdddddddd
NNNNNNNNNNmho:.``````````````.:oo/-::/::::::::::+osssssoo+/-.``````.......`````            ````.``---ohdddddddd
NNNNNNNNNNmd+:.``````````````...`.:/+++//:--.....-:/++//:-.``````.-::::-----..``.`       `` ````.`o+ydddddddddd
NNNNNNNNNNmd/...````````` `:+/..-+yyso++o++/::://:. ::     `..`..-:::-------.`.-``        ``````-./yddddddddddd
NNNNNNNNmdyyo-..```````   `./..`.//////o+/:--.--/oo..-```  ..```...```....--.``+         `````.`-:/hddddddddddd
NNNNNNNNmshdy:--..`````    `.:.///oos+:/--```..-/oo`.sys/` ...``.`` `.-...-:. `+         ` ````.:+ohddddddddddd
NNNNNNNNNyhyo-...````````    :..-shyy++o+:---::/+o/`sdhyo/``-...-----------:- `/           ````./shdddddddddddd
NNNNNNNNNdyhs/:-...``..```   ...-hdhhhhyso+///+ooo.oddhyo+:``-------:::::::/:`:.            ```-/ohdddddddddddd
NNNNNNNNNNdhy/---...``.```   `..-hdddddhyssoosss+./dddhyo+/-``--:::::::://///.-            ````..+hdddddddddddd
NNNNNNNNNNNmyo--/:-.`````` ```:/-+syhhhyyssoo+/:-/ddddhyo+//-.``.---::::::---..           `.``.:+:+dddddddddddd
NNNNNNNNNNNNmo//:+:-.````` ``.:hhysooo++//////+oshddmdhys++/:---.-------:::///-          ``-:`-/++ydddddddddddd
NNNNNNNNNNNNNo+s:-.`````````.--ymmmmmmmddhhhyyyhhddmmdhhso++//:---://///+++++/.        ````.-`:oohddddddddddddd
NNNNNNNNNNNNNdo/--...```````...odmmmNNmmmddhhyyhddhdddhys+//://--::///+++++++/`        ``````-hdhddmdmmmdmddddd
NNNNNNNNNNNNNNmhs+//+-..````...+hmmmNNNmmddhyhhhhyoshhyoo/--.-:::///+++++++++:````   ``.-.:-:yhhddmmmmmmmmmmmmd
NNNNNNNNNNNNNNNNNmhh+:..``.`-::/ymmmmNmmmdhhhddddhhdhyso+/:::::////++++++++++:.-.`  ````/shydddmmmmmmmmmmmmmmmd
NNNNNNNNNNNNNNNNNNmyo:...````-osydmmmmmmdddddddddhhhhysyyo+////////+++///+++/::::``.:/+.sddmmmmmmmmmmmmmmmmmmmm
NNNNNNNNNNNNNNNNNNNmh:..`````-yhddmmmmmmdddhdddddhhhhyyyyso++/////////////++/:/:` -oss+sddmmmmmmmmmmmmmmmmmmmmm
NNNNNNNNNNNNNNNNNNNNNdo+:-...`-shhmmmmmdddhyhddhhyyyssso+++///:://:-::///+++-``  `-/+osyhdmmmmmmmmmmmmmmmmmmmmm
NNNNNNNNNNNNNNNNNNNNNNNdhs-::.```-mmmmmddho:+osysso+o+////:::--:-..-:////+++`    -://++oymmmmmmmmmmmmmmmmmmmmmm
NNNNNNNNNNNNNNNNNNNNNNmdyo-::--.``ommmmmdhyshhhhhhyyssooo++/////////////+++-    `.-:+shdmmmmmmmmmmmmmmmmmmmmmmm
NMNNNNNNNNNNNNNNNNNNNNNms+:--.````.ymmmmddddmmmmddhhyssoo++///////++////++:````-oshdmmmmmmmmmmmmmmmmmmmmmmmmmmm
NMMMMMMNNNNNNNNNNNNNNNNNmho+o+:.```-dmmmmmmmmmmmddhhysoo+o+++////+++///+++...`.ydmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
MMMMMMMNMMNNNNNNNNNNNNNNNNmmddo-....hmmmmmmmmmmdddhhyssssssoo+++/+++++++++.-+:/dmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
MMMMMMMMMMMNNNNNNNNNNNNNNNNNNNdo///:dmmmmmmmmmmmmdddddhhyysso+++++++++++++.-++-+hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
MMMMMMMMMMMNMMMMNNNNNNNNNNNNNNNmms:-dmmmmmmmmmmmmmmmmddhhyyso+++++++++++++.-yo:odmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
MMMMMMMMMMMMMMMMMMMMNNNNNNNNNNNNmsssmmmmmmmmmmmmmmmmddhhyyyoo+++++++//++++ooo+smmmNmmmmmmmmmmmmmmmmmmmmmmmmmmmm
MMMMMMMMMMMMMMMMMMMMNNNNNNNNNNNNNNmmmNmNmmmmmmmmmddddhhyysoo+++++//////+++dhhmmNNNNmNmmmmmmmmmmmmmmmmmmmmmmmmmm
MMMMMMMMMMMMMMMMMMNMMNNNNNNNNNNNNNNNmNNNmmmmmmmmddhhyyssoo++//////////++++dmNNNNNNNNNmmmmmmmmmmmmmmmmmmmmmmmmmm
 MMMMMMMMMMMMMMMMMMMMMNNNNNNNNNNNNNNNNNNNmmmmmmmmmddhysso++//////////+++++dNNNNNNNNNNNmmmmmmmmmmmmmmmmmmmmmmmm 
  MMMMMMMMMMMMMMMMMMMMNNNNNNNNNNNNNNNNNNNmmmmmmmmmmmdhhyso+/////////++++++hNNNNNNNNNNmmmmmmmmmmmmmmmmmmmmmmmm  
    MMMMMMMMMMMMMMMMMMMMMMNNNNNNNNmdNNNNNNNmmmNNNNmmddhyyso+++++++++++++++osdmNNNmmNmmmmmmmmmmmmmmmmmmmmmmm    
*/



#include "bits/stdc++.h"
#define pb push_back
#define lwb lower_bound
#define upb upper_bound
#define fi first
#define se second
#define debu cout << "*debug*\n"
#define debug(x) cout << "debug " << x <<"\n"
#define int long long
constexpr int modn = 1e9+7;		// 998244353
constexpr int maxn = 1e6+5;	
constexpr int INF = 1e9+5;	
using namespace std;


void solve(){
	int n;
	cin >> n;
	int arr[n+5];
	for(int i =1;i<=n;i++){
		cin >> arr[i];
	}
	int pre = arr[1];
	cout << pre << " ";
	for(int i=2;i<=n;i++){
		int tmp = arr[i] * i - pre;
		pre += arr[i] * i - pre;
		cout << tmp << " " ;
	}
}

signed main(){
	ios::sync_with_stdio(0);
	cin.tie(0);	
	//freopen("segmenttree37.gir","r",stdin);
	//freopen("segmenttree37.cik","w",stdout);	

	int T=1;
	//cin >> T;	
	while(T--){
		solve();	
	}	
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 1 ms 204 KB Output is correct
4 Correct 0 ms 204 KB Output is correct
5 Correct 0 ms 204 KB Output is correct
6 Correct 0 ms 204 KB Output is correct
7 Correct 1 ms 204 KB Output is correct
8 Correct 0 ms 204 KB Output is correct
9 Correct 0 ms 204 KB Output is correct
10 Correct 0 ms 204 KB Output is correct