QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#725657#9541. Expanding ArraymaxiaomengWA 1ms3652kbC++14447b2024-11-08 19:13:432024-11-08 19:13:44

Judging History

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

  • [2024-11-08 19:13:44]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3652kb
  • [2024-11-08 19:13:43]
  • 提交

answer

#include<bits/stdc++.h>
#define int long long
#define endl '\n'
using namespace std;
const int N=500005;
int n,a[N];
set<int>s;
signed main(){
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
	cin>>n;
	for(int i=1;i<=n;i++)cin>>a[i];
	for(int i=1;i<n;i++)s.insert(a[i]&a[i+1]),s.insert(a[i]|a[i+1]),s.insert(a[i]^a[i+1]),s.insert(a[i]&(a[i]^a[i+1])),s.insert(a[i+1]&(a[i]^a[i+1]));
	cout<<s.size();
    return 0;
}


Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 1ms
memory: 3652kb

input:

2
2 3

output:

4

result:

ok single line: '4'

Test #2:

score: 0
Accepted
time: 0ms
memory: 3648kb

input:

2
3 4

output:

4

result:

ok single line: '4'

Test #3:

score: -100
Wrong Answer
time: 0ms
memory: 3520kb

input:

2
3 5

output:

5

result:

wrong answer 1st lines differ - expected: '8', found: '5'