void make_permute(int pos) { int i,j; if(pos==n) { for(i=0;i<n;i++) { printf("%d",arr[i]); } printf("\n"); } else { for(j=1;j<=n;j++) { if(no_repeat(pos,j)==1) { arr[pos]=j; make_permute(pos+1); } } } }
int main() { scanf("%d",&n); make_permute(0); return 0; }
void init_d_fft(int mo, int nz, int sz, D_COSIN_TABLE *tab, unsigned short int *perm) { make_permute(mo, nz, sz, perm); make_d_sincos(mo, sz, tab); }