QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#775309#9541. Expanding ArrayKogenta2010WA 0ms3492kbC++14485b2024-11-23 15:26:332024-11-23 15:26:34

Judging History

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

  • [2024-11-23 15:26:34]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3492kb
  • [2024-11-23 15:26:33]
  • 提交

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'