#include using namespace std; int N, D, K; int res[11]; bool dfs(int k, int acc, int curr){ if(N - curr + 1 < K - k)return false; if(k >= K){ if(acc == D){ for(int i=0;i 0){ cout << " "; } cout << res[i]; } cout << endl; return true; } else { return false; } } if(acc >= D || curr > N)return false; res[k] = curr; if(dfs(k + 1, acc + curr, curr + 1))return true; if(dfs(k, acc, curr + 1))return true; return false; } void dfs_solver(int N_, int D_, int K_){ N = N_; D = D_; K = K_; if(!dfs(0, 0, 1)){ cout << -1 << endl; } } int main(){ int N, D, K; cin >> N >> D >> K; assert(1 <= N && N <= 100); assert(1 <= D && D <= 1000); assert(1 <= K && K <= 10); dfs_solver(N, D, K); return 0; }