题目等价于异或,异或后的数字有几个1就是有几个不同,统计1可以用lowbit来统计,时间复杂度O( a,b的位数) #include <iostream> using namespace std; typedef long long ll; #define IOS ios::sync_with_stdio(false),cin.tie(0); #define endl cout<<"\n"; const int N=1e3+7; const int M=1e5+7; int ans; int a[N][N]; int n; #define lowbi...