Language: C++

#include<bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
#define lli long long int   //used int to avoid mle
#define ulli unsigned long long int 
#define ld long double
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define loop(i,a,b) for(lli i=a;i<b;i++)
#define initialize(array,size,value) for(lli i=0;i<size;i++) array[i]=value
#define couta(array,size) for(lli i=0;i<size;i++) cout<<array[i]<<" "
#define vl vector<lli>
#define vp vector< pair <lli,lli> >
#define sl set<lli>
#define spl set<pll>
#define msl multiset <lli>
#define msp multiset <pll>
#define pll pair<lli, lli>
#define mll map<lli, lli>              //for( map<lli, lli>::iterator i=temp.begin();i!=temp.end();i++)cout<<i->fi<<" "<<i->se<<endl;
#define mvl map<lli, vl>
#define umll unordered_map<lli, lli>
#define vt vector<pair<lli, pll >  >
#define vf vector<pair<pll,pll > >
#define qu queue<lli>
#define pq priority_queue<lli>
#define dq deque <lli>
#define ptr vector<lli>::iterator
#define bs(array,x) binary_search(array.begin(),array.end(),x)
#define lb(array,x) lower_bound(array.begin(),array.end(),x)
#define ub(array,x) upper_bound(array.begin(),array.end(),x)
#define nobw(array,i,j) upper_bound(array.begin(), array.end(), j)-lower_bound(array.begin(), array.end(), i) //number of numbers between i & j
#define vc clear()
#define endl '\n'
#define sp system("pause");
#define INF 9223372036854775807
#define MINF -9223372036854775808
#define start_routine() int begtime = clock();
#define end_routine() int endtime = clock(); cerr << endl << "Time elapsed: " << (endtime - begtime)*1000/CLOCKS_PER_SEC << " ms"; return 0
lli mod=1000000007;
//string s=bitset<32>(n).to_string();
vp inp[16];
lli n;
lli rec(lli i,vl tt){
	if(i==n+1){
		lli c=0;
		for(lli i=1;i<=n;i++)if(tt[i]==1)c++;
			return c;
	}

	if(tt[i]==0){
		return rec(i+1,tt);
	}
	if(tt[i]==1){
		for(auto cc:inp[i]){
			//if(i==cc.fi && cc.se==0)return INT_MIN;
			if(tt[cc.fi]==-1){
			if(cc.se==0)tt[cc.fi]=0;
			if(cc.se==1)tt[cc.fi]=1;
			}
			else{
				if(tt[cc.fi]==cc.se)continue;
				else return INT_MIN;
			}

		}
		return rec(i+1,tt);

	}
	vl ttt=tt;
	tt[i]=1;
	ttt[i]=0;
	for(auto cc:inp[i]){
			//if(i==cc.fi && cc.se==0)return INT_MIN;
			if(tt[cc.fi]==-1){
			if(cc.se==0)tt[cc.fi]=0;
			if(cc.se==1)tt[cc.fi]=1;
			}
			else{
				if(tt[cc.fi]==cc.se)continue;
				else return rec(i+1,ttt);
			}
		}
	return max(rec(i+1,ttt),rec(i+1,tt));
}
int main()
{
 	ios::sync_with_stdio(0);
    cin.tie(0);
    cin>>n;
    for(lli i=1;i<=n;i++){
    	lli ai;
    	cin>>ai;
    	while(ai--){
    		lli x,y;
    		cin>>x>>y;
    		inp[i].pb(mp(x,y));
    	}
    }
    vl tt;
    for(lli i=0;i<=n;i++)tt.pb(-1);
    cout<<max(rec(1,tt),0);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:104:14: error: no matching function for call to 'max(long long int, int)'
  104 |     cout<<max(rec(1,tt),0);
      |           ~~~^~~~~~~~~~~~~
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:104:14: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
  104 |     cout<<max(rec(1,tt),0);
      |           ~~~^~~~~~~~~~~~~
/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:104:14: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
  104 |     cout<<max(rec(1,tt),0);
      |           ~~~^~~~~~~~~~~~~