QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#51642#4810. Add OneCrysflyWA 2ms3652kbC++11734b2022-10-03 10:10:042022-10-03 10:10:05

Judging History

你现在查看的是最新测评结果

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2022-10-03 10:10:05]
  • 评测
  • 测评结果:WA
  • 用时:2ms
  • 内存:3652kb
  • [2022-10-03 10:10:04]
  • 提交

answer

// what is matter? never mind.
#include<bits/stdc++.h>
#define For(i,a,b) for(int i=(a);i<=(b);++i)
#define Rep(i,a,b) for(int i=(a);i>=(b);--i)
#define int long long
using namespace std;
inline int read()
{
    char c=getchar();int x=0;bool f=0;
    for(;!isdigit(c);c=getchar())f^=!(c^45);
    for(;isdigit(c);c=getchar())x=(x<<1)+(x<<3)+(c^48);
    if(f)x=-x;return x;
}

#define fi first
#define se second
#define pb push_back
#define mkp make_pair
typedef pair<int,int>pii;
typedef vector<int>vi;

#define maxn 500005
#define inf 0x3f3f3f3f

int n,a[maxn],res,sum;

signed main()
{
	n=read();
	For(i,1,n)a[i]=read(),sum^=a[i];
	For(i,1,n)res=max(res,sum^a[i]^(a[i]+1));
	cout<<res;
	return 0;
}

详细

Test #1:

score: 0
Wrong Answer
time: 2ms
memory: 3652kb

input:

4
1 2 1 2

output:

3

result:

wrong answer 1st numbers differ - expected: '7', found: '3'