Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
43286 liuyuche 【J】T1 C++ 输出超限 0 4 MS 252 KB 343 2026-10-28 14:35:15

Tests(0/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; }


测评信息: