QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#767054#9541. Expanding Arrayjdyt11WA 0ms3856kbC++23974b2024-11-20 19:41:082024-11-20 19:41:09

Judging History

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

  • [2024-11-20 19:41:09]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3856kb
  • [2024-11-20 19:41:08]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
#define pii pair<int,int>
#define ll long long
#define inf 0x3f3f3f3f
#define ull unsigned long long
#define pll pair<ll,ll>
#define ls d*2
#define rs d*2+1
#define mid (l+r)/2
#define lowbit(x) (x&(-x))
//#define endl "\n"
#define all(x) x.begin(),x.end()
//#define int long long
//mt19937 seed;
//uniform_int_distribution<int>num(0,2e9);
const int N=1e6+10;
const int M=33;



signed main(){
    ios::sync_with_stdio(false);
    cin.tie(0);cout.tie(0);
    int _=1;//cin>>_;
    while(_--){
        int n;
        cin>>n;
        int x;
        cin>>x;
        map<int,int>mp;
        for(int i=1;i<n;i++){
            int y;
            cin>>y;
            mp[x]=mp[y]=mp[x|y]=mp[x&y]=mp[x^y]=mp[(x^y)|x]=mp[(x^y)|x]=mp[(x^y)&x]=mp[(x^y)&y]=mp[(x|y)^x]=mp[(x|y)^y]=mp[(x&y)^x]=mp[(x&y)^y]=mp[(x|y)^x^y]=mp[(x&y)^x^y]=1;
            x=y;
        }
        cout<<mp.size()<<endl;
    }
}

詳細信息

Test #1:

score: 100
Accepted
time: 0ms
memory: 3556kb

input:

2
2 3

output:

4

result:

ok single line: '4'

Test #2:

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

input:

2
3 4

output:

4

result:

ok single line: '4'

Test #3:

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

input:

2
3 5

output:

7

result:

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