全排列
使用前先排序
for(int i=0;i<4;i++)a[i]=i;while(next_permutation(a,a+4)){for(int i=0;i<4;i++)cout<<a[i];cout<<endl; }