QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#741620 | #9541. Expanding Array | tamata_1 | WA | 0ms | 3588kb | C++23 | 443b | 2024-11-13 14:49:10 | 2024-11-13 14:49:11 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
#define int long long
int a[100010];
signed main(){
int n;
cin>>n;
set<int> s;
for(int i=1;i<=n;i++){
cin>>a[i];
s.insert(a[i]);
}
for(int i=1;i<n;i++){
int num1=a[i]^a[i+1];
s.insert(num1);
s.insert(num1&a[i]);
s.insert(num1&a[i+1]);
s.insert(num1|a[i]);
s.insert(num1|a[i+1]);
s.insert(a[i]&a[i+1]);
s.insert(a[i]|a[i+1]);
}
cout<<s.size();
}
詳細信息
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: 3584kb
input:
2 3 4
output:
4
result:
ok single line: '4'
Test #3:
score: -100
Wrong Answer
time: 0ms
memory: 3536kb
input:
2 3 5
output:
7
result:
wrong answer 1st lines differ - expected: '8', found: '7'