QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#732567#9541. Expanding ArrayCCFWA 0ms3636kbC++14768b2024-11-10 15:12:262024-11-10 15:12:26

Judging History

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

  • [2024-11-10 15:12:26]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3636kb
  • [2024-11-10 15:12:26]
  • 提交

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'