QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#725784#9541. Expanding ArraygzyWA 0ms3956kbC++14415b2024-11-08 20:01:382024-11-08 20:01:38

Judging History

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

  • [2024-11-08 20:01:38]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3956kb
  • [2024-11-08 20:01:38]
  • 提交

answer

#include<bits/stdc++.h>
#define ins s.insert
using namespace std;
using ll = long long;

const int N = 2e5 + 7;
int i, j, k, n, m, x, y;
set<int> s;

int main() {
	scanf("%d%d", &n, &x);
	for(i = 1; i < n; i++) {
		scanf("%d", &y);
		ins(x);
		ins(y);
		ins(x | y);
		ins(x & y);
		ins(x ^ y);
		ins(x & (x ^ y));
		ins(y & (x ^ y));
		x = y;
	}
	printf("%d\n", s.size());
	return 0;
}



Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

2
2 3

output:

4

result:

ok single line: '4'

Test #2:

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

input:

2
3 4

output:

4

result:

ok single line: '4'

Test #3:

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

input:

2
3 5

output:

7

result:

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