QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#775309 | #9541. Expanding Array | Kogenta2010 | WA | 0ms | 3492kb | C++14 | 485b | 2024-11-23 15:26:33 | 2024-11-23 15:26:34 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
set<int>s;
void attempt(int x){
if(s.find(x)==s.end()){
s.insert(x);
}
return ;
}
int main(){
int n,x,y;
cin>>n;
//int ans=0;
for(int i=1;i<=n;i++){
cin>>x;
attempt(x);
attempt(x&y);
attempt(x|y);
attempt((x&y)^x);
attempt((x&y)^(x&y));
attempt((x&y)^(x|y));
attempt((x&y)^y);
attempt((x|y)^x);
attempt((x|y)^(x|y));
attempt((x|y)^y);
y=x;
}
cout<<s.size()<<endl;
return 0;
}
詳細信息
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3492kb
input:
2 2 3
output:
6
result:
wrong answer 1st lines differ - expected: '4', found: '6'