QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#732567 | #9541. Expanding Array | CCF | WA | 0ms | 3636kb | C++14 | 768b | 2024-11-10 15:12:26 | 2024-11-10 15:12:26 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define pii pair<int,int>
#define fs first
#define sc second
#define pb push_back
#define epb emplace_back
#define endl
#define SZ(X) (int)((X).size())
template<typename T>T mabs(T x){return x>=0?x:-x;}
const int N=1.1e6,mod=998244353;
int a[N];
int main(){
int n;
scanf("%d",&n);
int v=0;
for(int i=1;i<=n;i++)scanf("%d",a+i);
set<int>se;
for(int i=1;i<n;i++){
int x=a[i],y=a[i+1];
se.insert(x),se.insert(y);
se.insert(x&y),se.insert(x|y),se.insert(x^y);
se.insert((x&y)^y),se.insert((x&y)^x);
se.insert((x|y)^y),se.insert((x|y)^x);
se.insert((x^y)&x),se.insert((x^y)&y);
se.insert((x^y)|x),se.insert((x^y)|y);
}
cout<<se.size()<<"\n";
return 0;
}
详细
Test #1:
score: 100
Accepted
time: 0ms
memory: 3616kb
input:
2 2 3
output:
4
result:
ok single line: '4'
Test #2:
score: 0
Accepted
time: 0ms
memory: 3612kb
input:
2 3 4
output:
4
result:
ok single line: '4'
Test #3:
score: -100
Wrong Answer
time: 0ms
memory: 3636kb
input:
2 3 5
output:
7
result:
wrong answer 1st lines differ - expected: '8', found: '7'