Language: C++

#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/trie_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
int prime[100001];
typedef tree<int,null_type,less<int>,rb_tree_tag,tree_order_statistics_node_update>ordered_set;
#define ll unsignedlong long 
#define mod 1000000007
#define MOD 998244353
int d=64;
void fast(){
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
}
inline ll max(ll a,ll b){return a>b?a:b;}
inline ll min(ll a,ll b){return a<b?a:b;}
inline ll mul(ll a,ll b){
  a=(a+MOD)%MOD;
  b=(b+MOD)%MOD;
  ll c=a*b;
  c=(c+MOD)%MOD;
  return c;
}
inline ll add(ll a,ll b){
  a=(a+MOD)%MOD;
  b=(b+MOD)%MOD;
  ll ans=(a+b);
  ans=(ans+MOD)%MOD;
  return ans;
}

ll power(ll a,ll b,ll c){
  ll ans=1;
  while(b){
    if(b&1){
      ans=mul(ans,a);
  }
  a=mul(a,a);
  b=b/2;
}
return ans;
}
void pre(){
  prime[1]=1;
  for(int i=2;i*i<=100000;++i){
    if(prime[i]==0){
      for(int j=i*i;j<=100000;j+=i)
        prime[j]=1;
    }
  }
  for(int i=1;i<=100000;++i)
    prime[i]=(prime[i]^1);
} 
ll basis[64]; 
int sz; 
ll basis2[64];
ll ex[64];
void insertVector(ll mask) {
    for (int i = 0; i < d; i++) {
        ll zz=ex[i];
        if ((mask & zz) == 0) continue; // continue if i != f(mask)
        if (!basis[i]) {  
            basis[i] = mask;
            ++sz;   
            return;
        }
        mask ^= basis[i]; 
    }
}
void insertVector2(ll mask) {
    for (int i = 0; i < d; i++) {
        ll zz=ex[i];
        if ((mask & zz) == 0) continue; // continue if i != f(mask)
        if (!basis2[i]) { 
            basis2[i] = mask;
            ++sz;   
            return;
        }
        mask ^= basis2[i]; 
    }
}
int main() 
{ 
    fast();
    ex[0]=1;
    for(int i=1;i<64;++i)ex[i]=ex[i-1]*2;
    int t;cin>>t;
    while(t--){
        int n; cin>>n;
        ll a[n];
        for(int i=0;i<n;++i)cin>>a[i];
        string s; cin>>s;
        ll ans=0;
        set<int> s1,s2;
        int j=0;
        while(j<n){
            memset(basis,0,sizeof(basis));
            while(j<n&&s[j]=='1'){
                insertVector(a[j]);
                j++;
            }
            for(int i=0;i<64;++i)if(basis[i]){
                if(s2.count(i))s2.erase(i);
                s1.insert(i);
            }
            memset(basis2,0,sizeof(basis2));
            while(j<n&&s[j]=='0'){
                insertVector2(a[j]);
                j++;
            }
            for(int i=0;i<64;++i){
                if(basis2[i]){
                    s2.insert(i);
                    if(s1.count(i)){
                    s1.erase(i);
                }
                }
            }
        }
        //for(auto x: s1)cout<<x<<endl;
        ans=s1.size();
        if(ans==0)cout<<0<<endl;
        else cout<<1<<endl;
    }
    return 0; 
} 


Compiler output:
a.cc:8:12: error: 'unsignedlong' does not name a type; did you mean 'unsigned'?
    8 | #define ll unsignedlong long
      |            ^~~~~~~~~~~~
a.cc:17:8: note: in expansion of macro 'll'
   17 | inline ll max(ll a,ll b){return a>b?a:b;}
      |        ^~
a.cc:8:12: error: 'unsignedlong' does not name a type; did you mean 'unsigned'?
    8 | #define ll unsignedlong long
      |            ^~~~~~~~~~~~
a.cc:18:8: note: in expansion of macro 'll'
   18 | inline ll min(ll a,ll b){return a<b?a:b;}
      |        ^~
a.cc:8:12: error: 'unsignedlong' does not name a type; did you mean 'unsigned'?
    8 | #define ll unsignedlong long
      |            ^~~~~~~~~~~~
a.cc:19:8: note: in expansion of macro 'll'
   19 | inline ll mul(ll a,ll b){
      |        ^~
a.cc:8:12: error: 'unsignedlong' does not name a type; did you mean 'unsigned'?
    8 | #define ll unsignedlong long
      |            ^~~~~~~~~~~~
a.cc:26:8: note: in expansion of macro 'll'
   26 | inline ll add(ll a,ll b){
      |        ^~
a.cc:8:12: error: 'unsignedlong' does not name a type; did you mean 'unsigned'?
    8 | #define ll unsignedlong long
      |            ^~~~~~~~~~~~
a.cc:34:1: note: in expansion of macro 'll'
   34 | ll power(ll a,ll b,ll c){
      | ^~
a.cc:8:12: error: 'unsignedlong' does not name a type; did you mean 'unsigned'?
    8 | #define ll unsignedlong long
      |            ^~~~~~~~~~~~
a.cc:56:1: note: in expansion of macro 'll'
   56 | ll basis[64];
      | ^~
a.cc:8:12: error: 'unsignedlong' does not name a type; did you mean 'unsigned'?
    8 | #define ll unsignedlong long
      |            ^~~~~~~~~~~~
a.cc:58:1: note: in expansion of macro 'll'
   58 | ll basis2[64];
      | ^~
a.cc:8:12: error: 'unsignedlong' does not name a type; did you mean 'unsigned'?
    8 | #define ll unsignedlong long
      |            ^~~~~~~~~~~~
a.cc:59:1: note: in expansion of macro 'll'
   59 | ll ex[64];
      | ^~
a.cc:60:6: error: variable or field 'insertVector' declared void
   60 | void insertVector(ll mask) {
      |      ^~~~~~~~~~~~
a.cc:8:12: error: 'unsignedlong' was not declared in this scope; did you mean 'unsigned'?
    8 | #define ll unsignedlong long
      |            ^~~~~~~~~~~~
a.cc:60:19: note: in expansion of macro 'll'
   60 | void insertVector(ll mask) {
      |                   ^~
a.cc:72:6: error: variable or field 'insertVector2' declared void
   72 | void insertVector2(ll mask) {
      |      ^~~~~~~~~~~~~
a.cc:8:12: error: 'unsignedlong' was not declared in this scope; did you mean 'unsigned'?
    8 | #define ll unsignedlong long
      |            ^~~~~~~~~~~~
a.cc:72:20: note: in expansion of macro 'll'
   72 | void insertVector2(ll mask) {
      |                    ^~
a.cc: In function 'int main()':
a.cc:87:5: error: 'ex' was not declared in this scope; did you mean 'exp'?
   87 |     ex[0]=1;
      |     ^~
      |     exp
a.cc:8:12: error: 'unsignedlong' was not declared in this scope; did you mean 'unsigned'?
    8 | #define ll unsignedlong long
      |            ^~~~~~~~~~~~
a.cc:92:9: note: in expansion of macro 'll'
   92 |         ll a[n];
      |         ^~
a.cc:93:34: error: 'a' was not declared in this scope
   93 |         for(int i=0;i<n;++i)cin>>a[i];
      |                                  ^
a.cc:8:25: error: expected ';' before 'long'
    8 | #define ll unsignedlong long
      |                         ^~~~
a.cc:95:9: note: in expansion of macro 'll'
   95 |         ll ans=0;
      |         ^~
a.cc:99:20: error: 'basis' was not declared in this scope
   99 |             memset(basis,0,sizeof(basis));
      |                    ^~~~~
a.cc:101:30: error: 'a' was not declared in this scope
  101 |                 insertVector(a[j]);
      |                              ^
a.cc:101:17: error: 'insertVector' was not declared in this scope
  101 |                 insertVector(a[j]);
      |                 ^~~~~~~~~~~~
a.cc:108:20: error: 'basis2' was not declared in this scope
  108 |             memset(basis2,0,sizeof(basis2));
      |                    ^~~~~~
a.cc:110:31: error: 'a' was not declared in this scope
  110 |                 insertVector2(a[j]);
      |                               ^
a.cc:110:17: error: 'insertVector2' was not declared in this scope
  110 |                 insertVector2(a[j]);
      |                 ^~~~~~~~~~~~~
a.cc:123:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
  123 |         ans=s1.size();
      |         ^~~
      |         abs