QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#759374#9541. Expanding ArrayAlphaMale06WA 0ms3784kbC++14407b2024-11-18 06:10:222024-11-18 06:10:22

Judging History

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

  • [2024-11-18 06:10:22]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3784kb
  • [2024-11-18 06:10:22]
  • 提交

answer

#include <bits/stdc++.h>

using namespace std;

int main(){
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	int n;
	cin >> n;
	int a[n];
	for(int i=0; i< n; i++){
		cin >> a[i];
	}
	set<int> st;
	for(int i=0; i< n-1; i++){
		st.insert(a[i]&a[i+1]);
		st.insert(a[i]^a[i+1]);
		st.insert(a[i]|a[i+1]);
		st.insert(a[i]);
	}
	st.insert(a[n-1]);
	st.insert(0);
	cout << st.size() << '\n';
}

详细

Test #1:

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

input:

2
2 3

output:

4

result:

ok single line: '4'

Test #2:

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

input:

2
3 4

output:

4

result:

ok single line: '4'

Test #3:

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

input:

2
3 5

output:

6

result:

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