Language: C++

#include<bits/stdc++.h> 
using namespace std; 
typedef long long ll;



int dfs(int s , vector<vector<int>> vec , vector<bool>&visited , vector<bool>&included){
    int honest=1;
    visited[s]=true;
    included[s]=true;
    for(int i= 0 ; i < vec[s].size() ; i++){
        if(vec[s][i]==1){
            if(visited[i]==false){
                honest++;
                dfs(i,vec,visited,included);
            }
        }
        if(vec[s][i]==0){
            visited[i]=true;
        }
    }
    return honest;
}

int recursion(vector<bool>visited , vector<int>included , vector<vector<int>>vec , int n,int s){

    for(int q= 0 ; q< n+1 ; q++){
        if(included[q]==true){
            if(vec[k][q]==0){
                visited[k]=true;
            }
        }
    }

    int max=0; bool b = true; int curr = dfs(s,vec,visited,included);
    for(int i = 0 ; i<n+1 ; i++ ){
        if(visited[i]==false){  
            if(max<recursion(visited,included,vec,n,i)){
                max= recursion(visited,included,vec,n,i);
            b=false;
        }

    }

    return curr+max ;

    if(b){
        return 0;
    }



}

int main() {
    int n ; cin>>n; 
    vector< vector<int> >person (n+1,vector<int>(n+1,2));
    for(int i = 1 ; i< n+1 ; i ++ ){
        person[i][i]=1;
    }
    for(int i = 1 ; i<n+1 ; i++){
        int a ; cin>>a;
        for(int j= 0 ; j< a ; j++){
            int x,y ; cin>>x>>y;
            person[i][x]=y;
        }
    }

    vector<int>dishonest;

    for(int i =1 ; i< n+1 ; i++){
        for(int j = 1 ; j<n+1 ; j++){
            if(person[i][j]==1){
                for(int k = 1 ; k < n+1 ; k++){
                    if(person[i][k]!=person[j][k]){
                        dishonest.push_back(i);
                        for(int x=1 ; x< n+1 ; x++){
                           if(person[x][i]==1){
                            dishonest.push_back(x);
                           }
                        }
                    }
                }
            }
        }
        for(int j =0 ; j< dishonest.size() ; j++){
            for(int x= 1 ; x< n+1 ; x++){
                person[dishonest[j]][x]=0;
            }
        }
    }


    int max= 0;

    for(int i = 1 ; i < n+1 ; i++){
        vector<bool>include(n+1,false);
        vector<bool>visit(n+1 , false);
        for(int j = 0 ; j< dishonest.size() ; j++){
            visit[dishonest[j]]=true;
        }
        if(person[i][i]=1){
            if(max<recursion(visit,include,person,n,i)){
                max=recursion(visit,include,person,n,i);
            }
        }

        
        
    }

    
    cout<<max;
    int l ; cin>>l;
} 



Compiler output:
a.cc: In function 'int recursion(std::vector<bool>, std::vector<int>, std::vector<std::vector<int> >, int, int)':
a.cc:29:20: error: 'k' was not declared in this scope
   29 |             if(vec[k][q]==0){
      |                    ^
a.cc:35:60: error: invalid initialization of reference of type 'std::vector<bool>&' from expression of type 'std::vector<int>'
   35 |     int max=0; bool b = true; int curr = dfs(s,vec,visited,included);
      |                                                            ^~~~~~~~
a.cc:7:79: note: in passing argument 4 of 'int dfs(int, std::vector<std::vector<int> >, std::vector<bool>&, std::vector<bool>&)'
    7 | int dfs(int s , vector<vector<int>> vec , vector<bool>&visited , vector<bool>&included){
      |                                                                  ~~~~~~~~~~~~~^~~~~~~~
a.cc:55:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   55 | int main() {
      |         ^~
a.cc:55:9: note: remove parentheses to default-initialize a variable
   55 | int main() {
      |         ^~
      |         --
a.cc:55:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:55:12: error: a function-definition is not allowed here before '{' token
   55 | int main() {
      |            ^
a.cc:115:2: error: expected '}' at end of input
  115 | }
      |  ^
a.cc:25:96: note: to match this '{'
   25 | int recursion(vector<bool>visited , vector<int>included , vector<vector<int>>vec , int n,int s){
      |                                                                                                ^
a.cc:115:2: warning: control reaches end of non-void function [-Wreturn-type]
  115 | }
      |  ^