Submission #483914

#TimeUsernameProblemLanguageResultExecution timeMemory
483914asandikciProsjek (COCI14_prosjek)C++17
50 / 50
1 ms204 KiB
/* 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 timeMemoryGrader output
Fetching results...