#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define ALL(g) (g).begin(),(g).end() #define REP(i, x, n) for(int i = x; i < n; i++) #define rep(i,n) REP(i,0,n) #define F(i,j,k) fill(i[0],i[0]+j*j,k) #define P(p) cout<<(p)< vi; typedef vector vl; typedef vector vd; typedef pair pii; typedef pair pll; typedef long long ll; int N,D,K; int dp[101][1001][11]; vectornow; vectorans; int solve(int a,int b,int c){ //n,d,k if(dp[a][b][c]!=-1)return dp[a][b][c]; if(c==K){ if(b==D){ if(ans.size()==0) ans=now; return 1; } else{ return 0; } } if(a==N) return 0; int ret=0; now.push_back(a+1); int use=solve(a+1,b+(a+1),c+1); now.pop_back(); int not_use=solve(a+1,b,c); ret=(use||not_use); return dp[a][b][c]=ret; } int main(){ cin>>N>>D>>K; fill((int*)dp,(int*)dp+101*1001*11,-1); if(solve(0,0,0)){ for(int i=0;i