int cnt=0;
ans[cnt]=0;
for(int j=0;j<Max_Base;++j){
for(int k=cnt;k>=0;--k){
ans[++cnt]=ans[k]^tmp[j];
}
}
for(int j=0;j<=cnt;++j){
cout<<ans[j]<<" ";
}
cout<<endl;
// tmp[i]数组存的是二进制位第i位为1
格雷码构造模版
最新推荐文章于 2022-11-19 23:15:15 发布