# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
398712 | Alexandra | 평균 (COCI14_prosjek) | C++14 | 1 ms | 316 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(NULL);
int n;
vector<int> b;
vector<int> a;
cin >> n;
for (int i=0; i<n; i++) {
int c;
cin >> c;
b.push_back(c);
}
a.push_back(b[0]);
int media=a[0];
for (int nums=1; nums<n; nums++) {
a.push_back(b[nums]*(nums+1)-media);
media += a[nums];
}
for (int i=0; i<n; i++) {
cout << a[i];
if (i!=(n-1)) {
cout << " ";
}
}
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |