func_code_string: #include <bits/stdc++.h>   using namespace std;   const int N = 1024;   int dp[N];   int n, k;   vector<int> ans;   int f(int i) {     if (i >= n) return 0;     if (i + k >= n) return 1e9;     if (dp[i] != -1) return dp[i];     return dp[i] = f(i + 2 * k + 1) + 1;   }   int main() {     ios_base::sync_with_stdio(0);     cin.tie(0);     cout.tie(0);     cin >> n >> k;     memset(dp, -1, sizeof dp);     int r = 1e9, best = -1;     for (int i = 0, ThxDem = k + 1; i < ThxDem; ++i)       if (r > f(i + k + 1) + 1) {         r = f(i + k + 1) + 1;         best = i;       }     while (best < n) {       ans.push_back(best + 1);       best += 2 * k + 1;     }     assert(((int)(ans).size()) == r);     cout << r <<   n ;     for (int x : ans) cout << x <<    ;     cout <<   n ;   }   