QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#797604#9541. Expanding Arrayucup-team191#WA 0ms4104kbC++23546b2024-12-03 14:44:262024-12-03 14:44:26

Judging History

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

  • [2024-12-03 14:44:26]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:4104kb
  • [2024-12-03 14:44:26]
  • 提交

answer

#include <bits/stdc++.h>

#define X first
#define Y second
#define PB push_back

using namespace std;

typedef long long ll;
typedef pair<int,int> pii;
typedef vector<int> vi;

const int N = 3e5 + 500;

int A[N];

int main() {
	set < int > S;
	int n; scanf("%d", &n);
	vi svi = {0};
	for(int i = 0;i < n;i++) {
		scanf("%d", A + i);
		svi.PB(A[i]);
		if(i) svi.PB(A[i - 1] ^ A[i]);
	}
	sort(svi.begin(), svi.end());
	svi.erase(unique(svi.begin(), svi.end()), svi.end());
	printf("%d\n", (int)svi.size());
	return 0;
}

详细

Test #1:

score: 100
Accepted
time: 0ms
memory: 3900kb

input:

2
2 3

output:

4

result:

ok single line: '4'

Test #2:

score: 0
Accepted
time: 0ms
memory: 3852kb

input:

2
3 4

output:

4

result:

ok single line: '4'

Test #3:

score: -100
Wrong Answer
time: 0ms
memory: 4104kb

input:

2
3 5

output:

4

result:

wrong answer 1st lines differ - expected: '8', found: '4'