# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1115068 | monaxia | 평균 (COCI14_prosjek) | C++17 | 1 ms | 348 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#define pb push_back
#define ppb pop_back
#define fr first
#define sc second
#define all(v) v.begin(), v.end()
#define mod (long long)(1e9 + 7)
#define eps (long long)(1e-9)
#define vektor vector
using namespace std;
using ll = long long;
using ull = unsigned long long;
using ld = long double;
const unsigned Mod = 1e9 + 7;
void solve(){
ll n;
cin >> n;
vector <ll> ans(n + 1), a(n + 1);
for(int i = 1; i <= n; i ++){
cin >> a[i];
// if(i == 1) ans[i] = a[i];
// else
ans[i] = (a[i] - a[i - 1]) * (i - 1) + a[i];
cout << ans[i] << " ";
}
}
signed main()
{
// cin.tie(0)->sync_with_stdio(0);
if(fopen("blank.inp", "r")){
freopen("blank.inp", "r", stdin);
freopen("blank.out", "w", stdout);
}
// // cout << 1; return 0;
ll n = 1;
// cin >> n;
while(n) {
solve();
n --;
cout << "\n";
}
// cerr << "Time elapsed: " << 1.0 * clock() / CLOCKS_PER_SEC << " s.\n";
}
// ++++
// ++++-::......:--:::-=+++
// ++++=:............---.....--:..:=++++++
// +++++++::......................::=+++++
// @@ ++++++++++:+++++++++
// @% @*
// %%@@ *****#*@@
// %%%%% @##**##***%
// @@@@@@+-*#*@ #####%+*##*@
// %#+@%%@@@ ##-%:::-#*###@@
// =====:*::: ###-:==::=#*%*
// -====:::::+@@%@@%@#*--=*#%%#@%@ @%@
// @=====%=-@%=:::.:+-::::+::::::::::::%-----%% @@@@@
// @@%#*@++%===+::-================@%@@@@+++++++@@@%%%@#%###%
// @#***#@@ @##=%@===+--:+==+===+%*##@%%%@@@@@@@@@@:= @%@%%%@#%%
// -@ @*#@ #####%:::-====+:::==---**%#@ *%%%%@@@@@@-:
// -=-*% # #***--%%::::::::+=-+#-----=**@*# #+**#@#
// ----=----#+****=----=*#@=::::::=#-----------***%*%
// ------------%*****##=@==::::::+%-----------***%**
// +-----------------*@++%::::::::-----------****@*#
// =------------% @%=+%#+:::::::* #-----*--**** **
// ----%--% *==+++++=+=##*:% ---=--**** **
// %@@@@@@@@@==@+%%%%@ ----**** *#
// @=*+%@@@%@@=++=:%:::% #***@@#
// #+++++++++#==++-:::::: @**** *#
// =+++++++++++==+++::::::: ####@ #%
// +++++++++++=@ @++++::::::@ @#
// @+++++++++=@ =*++=:::::@
// ++++++++@ @++++:::::
// ++++++= =++++:::
// =+++++@ =+++::::
// ++++++-@ =+++:+::
// @::+::::@ =++::-:::
// +::=::::: @+*+:-+++-:
// @::+-:::::# +++::::::@
// ::%=:::::::%@ @%++::::***
// @:+@*:::::::****@ +@+++:-=*:*@
// *:@@%::::::::=**** @%@+++:::#**@
// *%@@@-:::::::%=+==*@ +@%+++:***+*
// #%@@%%::::::::#+=-=# =+@+++++:::*+
// @####+::::::::%+=@#%#=@ @**@@%=++::::@
// @ +:::::::::***#*@ @@###+=+=%@ +**#+=+*+:::-
// =-:::::::%%%%@@ @#=*########%#+*%%+--@*+::%
// +---%@ @@ =-:-**:#
// %%%%% @+--*@
// @%%%%@ @%%%%%
// @%%@@
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |