include[HTML_REMOVED]
include[HTML_REMOVED]
include[HTML_REMOVED]
include[HTML_REMOVED]
using namespace std;
const int N=16;
int n;
int st[N];//状态0,1选,2不选
void dsf(int u){
if(u>n){
for(int i=1;i<=n;i++){
if(st[i]==1){
printf(“%d “,i);
}
}
printf("\n");
return ;
}
st[u]=2;
dsf(u+1);//第一个分支不选
st[u]=0;//恢复
st[u]=1;
dsf(u+1);//第er个分支选
st[u]=0;//恢复
}
int main(){
cin>>n;
dsf(1);
return 0;
}