#include #include using namespace std; int memo[101][1001][11]; int N, D, K; vector ans; vector mians; int rec(int i, int s, int m){ if(memo[i][s][m]!=-1) return memo[i][s][m]; if(m==K){ if(s==D){ if(mians.size()==0) mians=ans; return 1; }else{ return 0; } } if(i==N){ return 0; } int ret=0; ans.push_back(i+1); int tukau=rec(i+1, s+(i+1), m+1); ans.pop_back(); int tukawanai=rec(i+1, s, m); ret=(tukau||tukawanai); return memo[i][s][m]=ret; } int main(){ cin>> N>> D>> K; fill((int*)memo, (int*)memo+101*1001*11, -1); if(rec(0, 0, 0)){ for(int i=0; i0){ cout<< " "; } cout<< mians[i]; } cout<< endl; }else{ cout<< -1<< endl; } return 0; }