제출 #827424

#제출 시각아이디문제언어결과실행 시간메모리
827424andrewpNadan (COCI18_nadan)C++14
50 / 50
1 ms256 KiB
//Dedicated to my love, ivaziva
#define yes cout << "Yes\n"
#define no cout << "No\n"
#define here cerr<<"===========================================\n"
#define dbg(x) cerr<<#x<<": "<<x<<endl;
#define ceri(a,l,r) {for(ll i_ = l;i_<=r;i_++) cerr<<a[i_]<< " ";cerr<<endl;}
#include "bits/stdc++.h"
//#include <ext/pb_ds/tree_policy.hpp>
//#include <ext/pb_ds/assoc_container.hpp>
#define ld long double
#define ll long long
#define llinf 100000000000000000LL
#define pb push_back
#define popb pop_back
#define fi first
#define sc second
#define endl '\n'
#define pll pair<ll,ll>
#define pld pair<ld,ld>
#define all(a) a.begin(),a.end()
#define si(s) (ll)(s.size())
#define ios ios_base::sync_with_stdio(false);cerr.tie(0);cout.tie(0);cin.tie(0);
#define mod 1000000007 //1000000007
using namespace std;
/*using namespace __gnu_pbds;
typedef tree<int,null_type,less<ll>,rb_tree_tag,tree_order_statistics_node_update> ordered_set;
inline int add(int A, int B) { if(A + B >= n) return A + B - n; return A + B; }
inline int sub(int A, int B) { if(A - B < 0) return A - B + mod; return A - B; }
inline int mul(int A, int B) { return (ll)A * B % mod; }
inline int pot(int A, int B){
	int ret = 1, bs = A;
	for(; B ; B >>= 1){
		if(B & 1) ret = mul(ret, bs);
		bs = mul(bs, bs);
	}
	return ret%mod;
}*/
#define ivamanjeod3 200005
int n,k;
void tc(){
    cin >> n >> k;
    ll sum = 0;
    vector<int> ivaziva;
    for(int i = 1;i<=k-1;i++){
        ivaziva.pb(i);
        sum+=i;
    }
    ivaziva.pb(n-sum);
    for(auto ivv:ivaziva) cout<<ivv<<endl;
}
int main(){
	ios
//	freopen("248.in", "r", stdin);
//	freopen("248.out", "w", stdout);
    int t; t = 1;
    //cin >> t;
    while(t--){
        tc();
    }
	return 0;
}
#Verdict Execution timeMemoryGrader output
Fetching results...