Run ID Author Problem Lang Verdict Score Time Memory Code Length Submit Time
43287 liuyuche 【J】T2 C++ Accepted 100 247 MS 256 KB 343 2026-10-28 14:35:45

Tests(10/10):


#include<bits/stdc++.h> using namespace std; int main(){ // freopen("xor.in","r",stdin); // freopen("xor.out","w",stdout); int n; cin>>n; while(n--){ int n,x; cin>>n>>x; int cnt=__builtin_popcount(x); if((n-cnt)%2==0) cout<<x+n-cnt<<endl; else cout<<x+n-cnt+1<<endl; } return 0; }


Judgement Protocol: