3 条题解

  • 1
    @ 2025-9-5 21:24:52
    #include<queue>
    #include<math.h>
    #include<stdio.h>
    #include<iostream>
    #include<vector>
    #include<iomanip>
    #include<string.h>
    #include<algorithm>
    #include<cmath>
    #include<cstdio>
    #include<utility>
    #include<cstring>
    #include<stack>
    #include<fstream>
    #include <sstream>
    #include<string>
    #include<stdlib.h>
    using namespace std;
    #define ll long long
    const int N = 1e6 + 10;
    const int INF = 0x3f3f3f3f;
    int aa;
    int main()
    {
        int n , one = 0 , two = 0 , three = 0;
        cin >> n;
        for ( int i = 1 ; i <= n ; i++ )
        {
            cin >> aa;
            two ^= ( one & aa );
            one ^= aa;
            three =~ ( one & two );
            two &= three;
            one &= three;
        }
        cout << one;
        return 0;
    }
    

    感谢huhe(小小苦力怕)http://temege.com/user/698

    信息

    ID
    1224
    时间
    1000ms
    内存
    5MiB
    难度
    7
    标签
    递交数
    339
    已通过
    78
    上传者