제출 #1360256

#제출 시각아이디문제언어결과실행 시간메모리
1360256iamhereforfunNadan (COCI18_nadan)C++20
50 / 50
0 ms344 KiB
// Starcraft 2 enjoyer //

#include <bits/stdc++.h>

// #pragma GCC target("avx2")
// #pragma GCC optimize("O3")
// #pragma GCC optimize("unroll-loops")

using namespace std;

#define LSOne(X) ((X) & -(X))

const int N = 1e3 + 5;
const int M = 1 << 10 + 5;
const int B = 18;
const long long K = 2;
const int LG = 60;
const long long INF = 1e18 + 5;
const int C = 26;
const int MOD = 1e9 + 7;
const int nx[] = {0, 1, 0, -1}, ny[] = {-1, 0, 1, 0};

int n, k;

inline void solve()
{
    cin >> n >> k;
    for(int x = 1; x <= k - 1; x++)
    {
        cout << x << "\n";
        n -= x;
    }
    cout << n;
}

signed main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    int t = 1;
    // cin >> t;
    for (int x = 1; x <= t; x++)
    {
        solve();
    }
    return 0;
}
#결과 실행 시간메모리채점기 출력
결과를 불러오는 중입니다…