1 #include2 #include 3 using namespace std; 4 5 int f[33][33]; 6 void init(){ 7 f[0][0] =1; 8 for(int i=1;i<=31;i++){ 9 f[i][0] = f[i-1][0];10 for(int j=0;j<=i;j++)11 f[i][j] = f[i-1][j]+f[i-1][j-1];12 }13 }14 15 int change(int x,int b){16 string s;17 while(x){18 s = (char)(x%b+'0')+s;19 x = x/b;20 }21 for(int i=0;i '1'){23 for(int j=i;j 0;i--){37 if(x&(1< k) break;40 x = x^(1< >x>>y>>k>>b;56 x= change(x,b);57 y = change(y,b);58 int resx = cal(x-1,k);59 int resy = cal(y,k);60 cout< <