# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
855672 |
2023-10-01T16:17:46 Z |
vjudge1 |
Nadan (COCI18_nadan) |
C++17 |
|
0 ms |
348 KB |
#include <bits/stdc++.h>
using namespace std;
#define sp << " " <<
#define int long long
#define vi vector<int>
#define pb push_back
#define F(xxx,yyy) for (int xxx=1;xxx<=yyy;xxx++)
#define pii pair<int,int>
#define all(x) x.begin()+1,x.end()
const int N = 4e5+1;
void solve() {
int n,k;
cin >> n >> k;
vi a(k+1);
int rem = n;
for (int i=1;i<k;i++) {
a[i] = i;
rem-=i;
}
a[k] = rem;
F(i,k) cout << a[i] << '\n';
}
signed main() {
ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
int t = 1;
//cin >> t;
while (t --> 0) solve();
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
0 ms |
348 KB |
Output is correct |