# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
409196 | snasibov05 | Nadan (COCI18_nadan) | C++14 | 1 ms | 296 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <iostream>
#include <vector>
using namespace std;
int main() {
int n, k; cin >> k >> n;
vector<int> ans(n);
int x = 1;
int sm = 0;
for (int i = 0; i < n-1; ++i){
ans[i] = x++;
sm += ans[i];
}
ans.back() = k - sm;
for (auto a : ans) cout << a << "\n";
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |