QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#797610#9541. Expanding Arrayucup-team191#WA 1ms4116kbC++231.1kb2024-12-03 14:51:532024-12-03 14:51:54

Judging History

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

  • [2024-12-03 14:51:54]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:4116kb
  • [2024-12-03 14:51:53]
  • 提交

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;
	for(int i = 0;i < n;i++) {
		scanf("%d", A + i);
		svi.PB(A[i]);
		if(i) {
			svi.PB(A[i - 1] ^ A[i]);
			svi.PB(A[i - 1] | A[i]);
			svi.PB(A[i - 1] & A[i]);
			svi.PB((A[i - 1] ^ A[i]) & A[i - 1]);
			svi.PB((A[i - 1] ^ A[i]) & A[i]);
			svi.PB((A[i - 1] ^ A[i]) | A[i - 1]);
			svi.PB((A[i - 1] ^ A[i]) | A[i]);
			svi.PB((A[i - 1] | A[i]) ^ A[i - 1]);
			svi.PB((A[i - 1] | A[i]) ^ A[i]);
			svi.PB((A[i - 1] | A[i]) & A[i - 1]);
			svi.PB((A[i - 1] | A[i]) & A[i]);
			svi.PB((A[i - 1] & A[i]) ^ A[i - 1]);
			svi.PB((A[i - 1] & A[i]) ^ A[i]);
			svi.PB((A[i - 1] & A[i]) | A[i - 1]);
			svi.PB((A[i - 1] & A[i]) | 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: 1ms
memory: 3824kb

input:

2
2 3

output:

4

result:

ok single line: '4'

Test #2:

score: 0
Accepted
time: 1ms
memory: 3820kb

input:

2
3 4

output:

4

result:

ok single line: '4'

Test #3:

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

input:

2
3 5

output:

7

result:

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