Educational Codeforces Round 157 (Rated for Div. 2)D. XOR Construction

Educational Codeforces Round 157 (Rated for Div. 2)D. XOR Construction_第1张图片

#include
using namespace std;
#define N 1010000
#define ll long long 
#define lb long double
#define P pair
#define LL long long 
//#define P 1000000007ll
//priority_queueque; 
//priority_queue,greater >que;
//upper_bound(nums.begin(), nums.end(), value);
ll a[N],b[N],ans[N];
int n,cnt;
void solve(){
    cin>>n;
    for(int i=1;i>a[i];
        b[i]=b[i-1]^a[i];
    }
    for(int i=0;i<=20;i++){
        cnt=0;
        for(int j=1;j>i)& 1) cnt++;
        for(int j=0;j>i)& 1) cnt--;
        if(cnt!=0) ans[1]+=(1<

你可能感兴趣的:(算法,c++,数据结构)