QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#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;
}
Details
Tip: Click on the bar to expand more detailed information
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'