Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0; i<n; i++)

int main(){
    int N;
    vector<int> A(N);
    vector<vector<pair<int,int>>> x(N);
    cin >> N;
    int z;
    int b,c;
    rep(i,N){
        cin >> z;
        A[i] = z;
        rep(j,z){
            //cout << z << " "<<j<<endl;
            cin >> b >> c;
            b--;
            c;
            x[i].push_back(make_pair(b,c));
            //cout << "aaaaaaaaaaaaaaa"<<endl;
        }
    }
    unsigned int cnt = 0;
    for(int i=0;i < (1 << (N));i++){
        bitset<15> V(i);
        bitset<15> W(i);
        vector<int> used(N,0);
        queue<int> que;
        rep(j,N){
            if(W[j]){
                que.emplace(j);
                used[j] = 1;
            }
        }
        while(!que.empty()){
            int q = que.front();
            que.pop();
            rep(j,A[q]){
                if(used[x[q][j].first])continue;
                if(x[q][j].second){
                    W[x[q][j].first] = 1;
                    used[x[q][j].first] = 1;
                    que.emplace(x[q][j].first);
                }
            }
        }
        bool flag = false;
        
        //cout << W << endl;
        rep(j,N){
            if(!W[j]) continue;
            rep(k,A[j]){
                if(!x[j][k].second){
                    if(W[x[j][k].first]){
                        //cout << W << endl;
                        //cout << x[j][k].first << " "<< x[j][k].second << endl; 
                        flag = true;
                        break;
                    }
                }
            }
            if(flag)break;
        }
        if(!flag){
            cnt = max(W.count(), cnt);
        }

    }
    
    cout << cnt << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:66:22: error: no matching function for call to 'max(std::size_t, unsigned int&)'
   66 |             cnt = max(W.count(), cnt);
      |                   ~~~^~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:66:22: note:   deduced conflicting types for parameter 'const _Tp' ('long unsigned int' and 'unsigned int')
   66 |             cnt = max(W.count(), cnt);
      |                   ~~~^~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:66:22: note:   mismatched types 'std::initializer_list<_Tp>' and 'long unsigned int'
   66 |             cnt = max(W.count(), cnt);
      |                   ~~~^~~~~~~~~~~~~~~~