Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
33122 方巾予 【J】T1 C++ 通过 100 29 MS 252 KB 370 2024-10-04 14:53:05

Tests(10/10):


#include<bits/stdc++.h> using namespace std; #define int long long const int INF=1e9; int n,k; int a; int maxx,s; signed main(){ cin>>n>>k; maxx=-INF; s=0; for(int i=1;i<=n;i++){ cin>>a; maxx=max(maxx,(a^k)-a); s+=a; } cout<<s+maxx<<endl; //system("grep VmPeak/proc/$PPID/status"); return 0; }


测评信息: