Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll = int64_t;
template<class T, class U> bool chmin(T& a, const U& b){ if(a > b){ a = b; return 1; } return 0; }

void solve(){
    ll n;
    cin >> n;
    vector<ll> a(n);
    for(ll& i : a) cin >> i;
    string s;
    cin >> s;
    vector<ll> base;
    for(ll i = n; i--; ){
        if(s[i] == '0'){
            for(ll b : base) chmin(a[i], a[i] ^ b);
            if(a[i]) base.insert(a[i]);
        }
        else{
            for(ll b : base) chmin(a[i], a[i] ^ b);
            if(a[i]){
                cout << 1 << endl;
                return;
            }
        }
    }
    cout << 0 << endl;
}
int main(){
    ll t;
    cin >> t;
    while(t--) solve();
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:17:33: error: no matching function for call to 'std::vector<long int>::insert(__gnu_cxx::__alloc_traits<std::allocator<long int>, long int>::value_type&)'
   17 |             if(a[i]) base.insert(a[i]);
      |                      ~~~~~~~~~~~^~~~~~
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h:1484:9: note: candidate: 'template<class _InputIterator, class> std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::insert(const_iterator, _InputIterator, _InputIterator) [with <template-parameter-2-2> = _InputIterator; _Tp = long int; _Alloc = std::allocator<long int>]'
 1484 |         insert(const_iterator __position, _InputIterator __first,
      |         ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:1484:9: note:   candidate expects 3 arguments, 1 provided
In file included from /usr/include/c++/14/vector:72:
/usr/include/c++/14/bits/vector.tcc:133:5: note: candidate: 'std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::insert(const_iterator, const value_type&) [with _Tp = long int; _Alloc = std::allocator<long int>; iterator = std::vector<long int>::iterator; const_iterator = std::vector<long int>::const_iterator; value_type = long int]'
  133 |     vector<_Tp, _Alloc>::
      |     ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/vector.tcc:133:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_vector.h:1395:7: note: candidate: 'std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::insert(const_iterator, value_type&&) [with _Tp = long int; _Alloc = std::allocator<long int>; iterator = std::vector<long int>::iterator; const_iterator = std::vector<long int>::const_iterator; value_type = long int]'
 1395 |       insert(const_iterator __position, value_type&& __x)
      |       ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:1395:7: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_vector.h:1413:7: note: candidate: 'std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::insert(const_iterator, std::initializer_list<_Tp>) [with _Tp = long int; _Alloc = std::allocator<long int>; iterator = std::vector<long int>::iterator; const_iterator = std::vector<long int>::const_iterator]'
 1413 |       insert(const_iterator __position, initializer_list<value_type> __l)
      |       ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:1413:7: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_vector.h:1439:7: note: candidate: 'std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::insert(const_iterator, size_type, const value_type&) [with _Tp = long int; _Alloc = std::allocator<long int>; iterator = std::vector<long int>::iterator; const_iterator = std::vector<long int>::const_iterator; size_type = long unsigned int; value_type = long int]'
 1439 |       insert(const_iterator __position, size_type __n, const value_type& __x)
      |       ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:1439:7: note:   candidate expects 3 arguments, 1 provided