#include #define rep(i,n) for(int i=0;i pp; const int INF = 1e9; const int MOD = 1000000007; int main() { int n,d,k; cin >> n >> d >> k; vector>> dp(n+1,vector>(k+1,vector(d+1,0))); dp[0][0][0] = 1; for(int i =1;i <=n;i++){ rep(cnt,k+1)rep(value,d+1){ dp[i][cnt][value] += dp[i-1][cnt][value]; if(value - i >= 0 && cnt -1 >= 0){ dp[i][cnt][value] += dp[i-1][cnt-1][value-i]; } } } if(dp[n][k][d] <= 0){ cout << -1 << endl; return 0; } vector ans; int now = n,cnt = k,value = d; while(now >= 0){ if(cnt - 1 >= 0 && value - now >= 0){ if(dp[now-1][cnt-1][value-now] > 0){ ans.push_back(now); value -= now;now --;cnt --; } else{ now --; } } else{ now --; } } reverse(ans.begin(),ans.end()); rep(i,ans.size()) cout << ans[i] << " "; cout << endl; return 0; }