func_code_string: #include <bits/stdc++.h>   using namespace std;   template <class A, class B>   inline bool mina(A &first, B second) {     return (first > second) ? (first = second, 1) : 0;   }   template <class A, class B>   inline bool maxa(A &first, B second) {     return (first < second) ? (first = second, 1) : 0;   }   const int MAXN = 1e5 + 5;   int N, K;   int ans[MAXN];   long long minimum(long long prev, long long num) {     long long start = prev + 1;     long long end = start + num - 1;     return (start + end) * num / 2;   }   int main() {     cin >> N >> K;     int ll = 1, rr = N;     while (ll <= rr) {       int mid = (ll + rr) / 2;       if (mid + minimum(mid, K - 1) > N) {         rr = mid - 1;       } else {         ll = mid + 1;       }     }     if (rr == 0) {       cout <<  NO  << endl;       return 0;     }     ans[0] = rr;     int left = N - rr;     int now = 1;     while (left) {       if (now >= K) {         cout <<  NO  << endl;         return 0;       } else if (now + 1 == K) {         ans[now] = left;         if (left > ans[now - 1] && left <= 2 * ans[now - 1]) {           break;         } else {           cout <<  NO  << endl;           return 0;         }       } else {         if (2LL * ans[now - 1] + minimum(ans[now - 1] * 2, K - now - 1) > left) {           int ll = ans[now - 1] + 1;           int rr = 2LL * ans[now - 1];           while (ll <= rr) {             int mid = (ll + rr) / 2;             if (mid + minimum(mid, K - now - 1) > left) {               rr = mid - 1;             } else {               ll = mid + 1;             }           }           if (rr < ans[now - 1] + 1) {             cout <<  NO  << endl;             return 0;           }           ans[now] = rr;           left -= ans[now];           now++;         } else {           ans[now] = ans[now - 1] * 2;           left -= ans[now];           now++;         }       }     }     cout <<  YES  << endl;     for (int i = 0; (i) < (K); ++(i)) {       cout << ans[i] <<    ;     }     cout << endl;     return 0;   }   