Language: C++

#include <iostream>
#include <vector>
#include <map>
#include <unordered_map>
#include <queue>
#include <set>
#include <algorithm>
#include <string>
#include <math.h>
#include <limits.h>
#include <stack>
#include <complex>
#include <stdlib.h>
#include <stdio.h>
#include <functional>
#include <cfloat>
#include <math.h>
#include <numeric>
#include <string.h>
#include <sys/time.h>
#include <random>


#define fs first
#define sc second
#define endl "\n"

using namespace std;

typedef unsigned long long ll;
typedef unsigned int uint;
typedef pair<string, int> P;


int main(){
    int n;  cin >> n;
    vector<ll> s(n, 0), t(n, 0), u(n, 0), v(n, 0);
    for(int i = 0; i < n; i++){
        cin >> s[i];
    }
    for(int i = 0; i < n; i++){
        cin >> t[i];
    }
    for(int i = 0; i < n; i++){
        cin >> u[i];
    }
    for(int i = 0; i < n; i++){
        cin >> v[i];
    }

    vector<vector<ll>> res(n, vector<ll>(n, -1));
    for(int i = 0; i < n; i++){
        for(int j = 0; j < n; j++){
            if(s[i] == 0 && t[j] == 0){
                res[i][j] = u[i] | v[j];
            }
            else if(s[i] == 1 && t[j] == 1){
                res[i][j] = u[i] & v[j];
            }
        }
    }


    vector<ll> ustate(n, 0), vstate(n, 0);
    for(int i = 0; i < n; i++){
        ll tmp;
        if(s[i] == 0)   tmp = 0-1;
        else tmp = 0;
        for(int j = 0; j < n; j++){
            if(res[i][j] == -1) continue;
            if(s[i] == 0)   tmp &= res[i][j];
            else tmp |= res[i][j];
        }
        ustate[i] = tmp;
    }

    for(int i = 0; i < n; i++){
        ll tmp;
        if(t[i] == 0)   tmp = 0-1;
        else tmp = 0;
        for(int j = 0; j < n; j++){
            if(res[j][i] == -1) continue;
            if(t[i] == 0)   tmp &= res[j][i];
            else tmp |= res[j][i];
        }
        vstate[i] = tmp;
    }

    for(int i = 0; i < n; i++){
        for(int j = 0; j < n; j++){
            if(s[i] )
        }
    }

    for(int i = 0; i < n; i++){
        for(int k = 0; k < 64; k++){
            if(s[i] == 0 && (ustate[i] >> k) % 2 == 1 && (u[i] >> k) % 2 == 0){
                for(int j = 0; j < n; j++){
                    if(t[j] == 0)   continue;
                    if((vstate[j] >> k) % 2 == 1){
                        res[i][j] -= (((ll)1) << k);
                    }
                    break;
                }
            }
            if(s[i] == 0 && (ustate[i] >> k) % 2 == 0 && (u[i] >> k) % 2 == 1){
                for(int j = 0; j < n; j++){
                    if(t[j] == 1)   continue;
                    if((vstate[j] >> k) % 2 == 0){
                        res[i][j] += (((ll)1) << k);
                    }
                    break;
                }
            }
        }
    }

    for(int j = 0; j < n; j++){
        for(int k = 0; k < 64; k++){
            if(t[j] == 0 && (vstate[j] >> k) % 2 == 1 && (v[j] >> k) % 2 == 0){
                for(int i = 0; i < n; i++){
                    if(s[i] == 0)   continue;
                    if((ustate[i] >> k) % 2 == 1){
                        res[i][j] -= (((ll)1) << k);
                    }
                    break;
                }
            }
            if(t[j] == 0 && (vstate[j] >> k) % 2 == 0 && (v[j] >> k) % 2 == 1){
                for(int i = 0; i < n; i++){
                    if(s[i] == 1)   continue;
                    if((ustate[j] >> k) % 2 == 0){
                        res[i][j] += (((ll)1) << k);
                    }
                    break;
                }
            }
        }
    }

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:92:9: error: expected primary-expression before '}' token
   92 |         }
      |         ^