for(intcount=summer;count>summer-select;count--)jiecheng=jiecheng*count;for(intcount=select;count>0;count--)change=change*count;jiecheng=jiecheng/change;ofile<<jiecheng<<endl;//组合个数int*seat=newint[select];for(inti=0;i<select;i++)seat[i]=i+1;boolpass=true;while(pass){intj=select-1;for(;j>=0;j--){boolfind=false;if(seat[j]+1>summer)continue;intk=0;for(;k<select;k++){if((seat[j]+1)==seat[k]){find=true;break;}}if(!find)break;}intm=0;for(;m<select;m++){ofile<<seat[m]<<"";}ofile<<endl;m=1;inttemp=seat[j];for(;j<select;j++){seat[j]=temp+m;m++;}m=summer-select+1;boolequal=true;for(j=0;j<select;j++){if(seat[j]!=m){equal=false;break;}m++;}if(equal)pass=false;}intm=0;for(;m<select;m++){ofile<<seat[m]<<"";}ofile<<endl;delete[]seat;returntrue;}//字典排序生成组合intmain(){listmakels;ls.init();ls.make();return0;}