32选8所有排列组合

```c
void f()
{
    int i1,i2,i3,i4,i5,i6,i7,i8;
   
    for (i1=1;i1<32;i1++)
        
        for (i2=1;i2<32;i2++){
            
            if (i1==i2) continue;
            
            for (i3=1;i3<32;i3++){
                
                if (i1==i3) continue;
                if (i2==i3) continue;
                
                for (i4=1;i4<32;i4++){
                    
                    if (i1==i4) continue;
                    if (i2==i4) continue;
                    if (i3==i4) continue;
                    
                    for (i5=1;i5<32;i5++){
                        
                        if (i1==i5) continue;
                        if (i2==i5) continue;
                        if (i3==i5) continue;
                        if (i4==i5) continue;
                        
                        for (i6=1;i6<32;i6++){
                            
                            if (i1==i6) continue;
                            if (i2==i6) continue;
                            if (i3==i6) continue;
                            if (i4==i6) continue;
                            if (i5==i6) continue;
                            
                            for (i7=1;i7<32;i7++){
                                
                                if (i1==i7) continue;
                                if (i2==i7) continue;
                                if (i3==i7) continue;
                                if (i4==i7) continue;
                                if (i5==i7) continue;
                                if (i6==i7) continue;
                                
                                for (i8=1;i8<32;i8++){
                                    
                                    if (i1==i8) continue;
                                    if (i2==i8) continue;
                                    if (i3==i8) continue;
                                    if (i4==i8) continue;
                                    if (i5==i8) continue;
                                    if (i6==i8) continue;
                                    if (i7==i8) continue;
                                    
                                    printf("%d,%d,%d,%d,%d,%d,%d,%d\
                                           ",i1,i2,i3,i4,i5,i6,i7,i8);
                                }}}}}}}
}


```

posted @ 2013-10-10 16:50  常伟华  阅读(1024)  评论(0编辑  收藏  举报