criyle/codenet-compile-errors huggingface dataset:
Language: C++

#include <bits/stdc++.h>
using namespace std;
#include <atcoder/all>
using namespace atcoder;
using ll= long long;
using ld= long double;
using pll= pair<ll, ll>;
using vi= vector<int>;
using vl= vector<ll>;
using vd= vector<ld>;
using vs= vector<string>;
using vb= vector<bool>;
using vpll= vector<pll>;
using vvi= vector<vi>;
using vvl= vector<vl>;
using vvd= vector<vd>;
using vvs= vector<vs>;
using vvb= vector<vb>;
using vvpll= vector<vpll>;
constexpr ll mod= 1e9 + 7;
#define ALL(x) (x).begin(), (x).end()
#define _overload(_1, _2, _3, name, ...) name
#define REPBASE(i, a, b) for(ll(i)= (a); (i) < (b); (i)++)
#define RREPBASE(i, a, b) for(ll(i)= (a); (i) >= (b); (i)--)
#define REPB(i, n) REPBASE(i, 0, n)
#define REPS(i, n) REPBASE(i, 1, n + 1)
#define RREP(i, n) RREPBASE(i, n - 1, 0)
#define RREPS(i, n) RREPBASE(i, n, 1)
#define REP(...) _overload(__VA_ARGS__,REPBASE,REPB)(__VA_ARGS__)
#define EACH(x,c) for(auto& x : c)
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define fi first
#define se second
#define UNIQUE(v) v.erase(unique(ALL(v)), v.end())
#define YES(n) ((n) ? "YES" : "NO")
#define Yes(n) ((n) ? "Yes" : "No")
#define yes(n) ((n) ? "yes" : "no")
#define SZ(x) ((ll)(x).size())
#define BIT(n) (1LL<<(n))
template <class T>
bool chmax(T &a, const T &b) {
    if(a < b) {
        a= b;
        return 1;
    }
    return 0;
}
template <class T>
bool chmin(T &a, const T &b) {
    if(b < a) {
        a= b;
        return 1;
    }
    return 0;
}

signed main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(12);
    ll N;
    cin >> N;
    vl A(N);
    vvpll X(N,vpll(0));
    REP(i,N){
        cin >> A[i];
        X[i].assign(A[i],mp(0,0));
        REP(l,A[i]){
            cin >> X[i][l].fi >> X[i][l].se;
            X[i][l].fi--;
        }
    }
    ll count = 0;
    REP(i,BIT(N)){
        bool ok = 1;
        REP(l,N){
            if((i & BIT(l)) != 0){
                REP(k,A[l]){
                    if(X[l][k].se == 0){
                        if((i & BIT(X[l][k].fi)) != 0){
                            ok = 0;
                            break;
                        }
                    }else{
                        if((i & BIT(X[l][k].fi)) == 0){
                            ok = 0;
                            break;
                        }
                    }
                }
            }
            if(!ok)break;
        }
        if(ok)chmax(count,(ll)__builtin_popcountll(i));
    }
    cout << count << "\n";
}

Compiler output:
a.cc:3:10: fatal error: atcoder/all: No such file or directory
    3 | #include <atcoder/all>
      |          ^~~~~~~~~~~~~
compilation terminated.
Language: C

#include <stdio.h>
#include <math.h>

void zeros(int *a);

int main(void)
{
    int n=0,max=0,count=0,flag=1;
    long bit=1;
    int a[20]={},honest[20]={},x[20][20]={},y[20][20]={};
    scanf("%d",&n);
    for(int i=0;i<n;i++){
        scanf("%d",&a[i]);
        for(int j=0;j<a[i];j++) scanf("%d %d",&x[i][j],&y[i][j]);
    }

    for(long i=1;i<=pow(2,n)-1;i++){
        bit=1;
        flag=1;
        zeros(honest);
        for(int j=0;j<n;j++){
            if((i&bit)==bit) honest[j]=1;
            bit*=2;
        }
        for(int j=0;j<n;j++){
            // 正直者のとき
            if(honest[j]==1){
                for(int k=0;k<a[j];k++){
                    if(honest[x[j][k]-1]!=y[j][k]){
                        flag=0;
                        break;
                    }
                }
            }
            // 嘘つきのとき
            else {
                for(int k=0;k<a[j];k++){
                    if(honest[x[j][k]-1]==y[j][k]){}
                        flag=0;
                        break;
                    }
                }
            }
        }
        // 矛盾がなかった時
        if(flag==1){
            count=0;
            for(int j=0;j<n;j++){
                if(honest[j]==1) count+=1;
            }
            if(max<count) max=count;
        }
    }
    printf("%d",max);
    return 0;
}

void zeros(int *a){
    for(int i=0;i<20;i++) a[i]=0;
}


Compiler output:
main.c:54:12: error: expected declaration specifiers or '...' before string constant
   54 |     printf("%d",max);
      |            ^~~~
main.c:54:17: error: unknown type name 'max'
   54 |     printf("%d",max);
      |                 ^~~
main.c:55:5: error: expected identifier or '(' before 'return'
   55 |     return 0;
      |     ^~~~~~
main.c:56:1: error: expected identifier or '(' before '}' token
   56 | }
      | ^
Language: C++

#include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include<stack>
#include<queue>
#include<map>
#include<functional>
#include<math.h>
#include<x86intrin.h>
using namespace std;
#define rep(i,n) for(ll i=0;i<(n);i++)
#define pf(n) printf("%d\n",n)
#define pff(a,b) printf("%d  %d\n",a,b);
typedef long long ll;
typedef pair<ll, ll> p;
const int INF = 1001001001;
const double PI = acos(-1);

int main() {
	int n;
	cin >> n;
	int xy[15][15];
	rep(i, n)rep(j, n) xy[i][j] = -1;
	rep(i, n) {
		int a;
		cin >> a;
		rep(i, a) {
			int x, y;
			cin >> x >> y;
			x--;
			xy[i][x] = y;
		}	
	}
	int ans = 0;

	rep(i, 1 << n) {
		vector<int> b(n, 0);
		rep(j, n) {
			if (i >> j & 1) {
				b[j] = 1;
			}
		}
		bool ok = true;
		rep(j, n) {
			if (b[j]) {
				rep(k, n) {
					if (xy[j][k] == -1) continue;
					if (xy[j][k] != b[k]) ok = false;
				}
			}
		}
		int cnt = __popcnt(i);
		//pf(cnt);
		if (ok) ans = max(ans, cnt);
		//if (ok) pf(i);
	}
	cout << ans << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:53:27: error: '__popcnt' was not declared in this scope; did you mean '__popcntq'?
   53 |                 int cnt = __popcnt(i);
      |                           ^~~~~~~~
      |                           __popcntq
Language: C++

#include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include<stack>
#include<queue>
#include<map>
#include<functional>
#include<math.h>
#include<intrin.h>
using namespace std;
#define rep(i,n) for(ll i=0;i<(n);i++)
#define pf(n) printf("%d\n",n)
#define pff(a,b) printf("%d  %d\n",a,b);
typedef long long ll;
typedef pair<ll, ll> p;
const int INF = 1001001001;
const double PI = acos(-1);

int main() {
	int n;
	cin >> n;
	int xy[15][15];
	rep(i, n)rep(j, n) xy[i][j] = -1;
	rep(i, n) {
		int a;
		cin >> a;
		rep(i, a) {
			int x, y;
			cin >> x >> y;
			x--;
			xy[i][x] = y;
		}	
	}
	int ans = 0;

	rep(i, 1 << n) {
		vector<int> b(n, 0);
		rep(j, n) {
			if (i >> j & 1) {
				b[j] = 1;
			}
		}
		bool ok = true;
		rep(j, n) {
			if (b[j]) {
				rep(k, n) {
					if (xy[j][k] == -1) continue;
					if (xy[j][k] != b[k]) ok = false;
				}
			}
		}
		int cnt = __popcnt(i);
		//pf(cnt);
		if (ok) ans = max(ans, cnt);
		//if (ok) pf(i);
	}
	cout << ans << endl;

	return 0;
}

Compiler output:
a.cc:10:9: fatal error: intrin.h: No such file or directory
   10 | #include<intrin.h>
      |         ^~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define INF 1LL<<62
#define inf 1000000007
 
ll n,ans;
bool tr[20];
vector<pair<ll,ll>>ch[20];
void cal(){
	bool ch2=true;
	ll cnt=0;
	for(ll i=0;i<n;i++){
		if(tr[i]){
			cnt++;
			for(ll j=0;j<ch[i].size();j++){
				ll nexx=ch[i].first;
				ll nexy=ch[i].second;
				if(tr[nexx]!=nexy){
					ch2=false;
				}
			}
		}
	}
	if(ch2){
		ans=max(ans,cnt);
	}
}
void dep(ll now){
	if(now==n){
		cal();
		return ;
	}
	tr[now]=1;dep(now+1);
	tr[now]=0;dep(now+1);
}
int main() {
	cin>>n;
	for(ll i=0;i<n;i++){
		ll x;
		cin>>x;
		for(ll j=0;j<x;j++){
			ll now,y;
			cin>>now>>y;
			now--;
			ch[i].push_back(make_pair(now,y));
		}
	}
	dep(0);
	cout <<ans;
	// your code goes here
	return 0;
}

Compiler output:
a.cc: In function 'void cal()':
a.cc:17:47: error: 'class std::vector<std::pair<long long int, long long int> >' has no member named 'first'
   17 |                                 ll nexx=ch[i].first;
      |                                               ^~~~~
a.cc:18:47: error: 'class std::vector<std::pair<long long int, long long int> >' has no member named 'second'
   18 |                                 ll nexy=ch[i].second;
      |                                               ^~~~~~
Language: Java

import java.util.*;

class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int[] A = new int[N];
    int[] X = new int[N*N];
    int[] Y = new int[N*N];
    for(int i0 = 0;i0<N*N;i0++){
      Y[i0] = -1;
    }
    
    //代入
    for(int i1 = 0;i1<N;i1++){
      A[i1] = sc.nextInt();
      for(int i2 = 0;i2<A[i1];i2++){
        X[N*i1+i2] = sc.nextInt();
        Y[N*i1+i2] = sc.nextInt();
      }
    }
    
    int unkind = 0;
    int[] ukList[] = new int[N];
    for(int i3 = 0;i3<N;i3++){
      ukList[i3]=0;
    }
    for(int person = 0;person<N;person++){
      for(int Ey = 0;Ey<N;Ey++){
        if(Y[N*person + Ey] == 1){
          for(int E = 0;E<N;E++){
            if(X[N*X[Ey]-N+E]==person&&Y[N*X[Ey]-N+E]==0){
              unkind++;
              ukList[person] = 1;
              E=N;
              Ey=N;
            }
          }
        }
      }
    }
    boolean[] checked = new boolean[N];
    for(int i4 = 0;i4<N;i4++){
      checked[i4] = false;
    }
    for
    System.out.println(unkind);
  }
}

Compiler output:
Main.java:46: error: '(' expected
    for
       ^
Main.java:48: error: illegal start of expression
  }
  ^
2 errors
Language: C++

#include<bits/stdc++.h>
#define ll long long int
#define vll vector<pair<ll, ll> >
#define vl vector<ll>
#define vi vector<int>
#define vii vector<pair<int, int> >
const ll mod = 1e9 + 7;
const ll inf = LLONG_MAX;
using namespace std;

ll power_mod(ll x, ll y, ll p)
{
	ll ans = 1;
	x = x%p;
	if(x==0)
	return p;

	while(y>0)
	{
		if(y&1)
		{
			ans = (ans*x)%p;
		}
		y = y>>1;
		x = (x*x)%p;
	}
	return ans;
} 

int counter(int x) {
    if(x == 0) return 0;
    return counter(x >> 1) + (x & 1);
}


int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	int i,j,k,l,m,n;
	cin>>n;
	int A[20];
    int x[20][20];
    int y[20][20];
	
	for(i=0;i<n;i++)
	{
	    cin>>a[i];
	    for(j=0;j<a[i];j++)
	    {
	        cin>>x[i][j]>>y[i][j];
	    }
	}
	int ans = 0;
	for(j=1;j<(1<<n);j++)
	{
	    bool ok = true;
	    
	    for(i=0;i<n;i++)
	    {
	        if(!(j & 1<<(i-1)))
	        {
	            continue;
	        }
	        
	        for(k=0;k<a[i];k++)
	        {
	            if(((j >> (x[i][k]-1)) & 1) ^ y[i][k])
	            ok = false;
	        }
	    }
	    
	    if(ok)
	    ans = max(ans, counter(j));
	}
	cout<<ans<<"\n";
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:48:18: error: 'a' was not declared in this scope
   48 |             cin>>a[i];
      |                  ^
a.cc:66:27: error: 'a' was not declared in this scope
   66 |                 for(k=0;k<a[i];k++)
      |                           ^
Language: C++

#include <iostream>
#include<vector>
using namespace std;

int main(void){
   vector<vector<int>> a(15,vector<int>(15,-1));
   int n;
   cin >> n;
   
   for(int i = 0;i < n;i++){
         int A;
         cin >> A;
         for(int j = 0;j < A;j++){
               int x,y;
               cin >> x >> y;
               x--;
               a[i][x] = y;
         }
   }
   int ans = 0;
   for(int i = 0;i < 1 << n;i++){
         vector<int> d(n);
         for(int j = 0;j < n;j++){
               if(i >> j & 1)d[j] = 1;
         }
         bool ok = true;
         
         for(int j = 0;j < n;j++){
               if(d[j]){
                     for(int k = 0;k < n;k++){
                           if(a[j][k] == -1)continue;
                           if(a[j][k] != d[k])ok = false;
                     }
               }
         }
         if(ok) = max(ans,__builtin_popcount(i));
   }
   cout << ans << endl;
   
}


Compiler output:
a.cc: In function 'int main()':
a.cc:36:17: error: expected primary-expression before '=' token
   36 |          if(ok) = max(ans,__builtin_popcount(i));
      |                 ^
Language: C++

#include <bits/stdc++.h>
#include <utility>
#include <vector>
using namespace std;
using pint = pair<int ,int>;

int n; 
vector<vector<pint>> v;

bool judge(int bit){
    
    for (int i = 0; i < N; ++i) {
        
        if ( !(bit & (1 << i)) ) continue;

        for (pint xy : v[i]) {
            int x = xy.first; 
            int y = xy.second; 

            if (y == 1 && !(bit & (1 << x))) return false;
            if (y == 0 && (bit & (1 << x))) return false;
        }
    }
    return true;
}


int main(){
    cin >> n;
    v.resize(n);
    for(int i=0; i<n; ++i){
        int a; cin >> a;
        v[i].resize(a);
        for(int j=0; j<a; ++j){
            cin >> v[i][j].first >> v[i][j].second;
            --v[i][j].first;
        }
    }

    int res = 0;
    for(int bit=0; bit<(1<<n); ++bit){
        if(judge(bit)){
            int cnt;
            for(int i=0; i<n; ++i){
                if(bit&(1<<i)){cnt++;}
            }
            res = max(res, cnt);
        }
    }
    cout << res << endl;
    return 0;
}

Compiler output:
a.cc: In function 'bool judge(int)':
a.cc:12:25: error: 'N' was not declared in this scope
   12 |     for (int i = 0; i < N; ++i) {
      |                         ^
Language: C++

#include <bits/stdc++.h>
#include <utility>
#include <vector>
using namespace std;
using pint = pair<int ,int>;

int n; 
vector<vector<pint>> v;

bool judge(int bit){
    // i 人目の証言を検証する
    for (int i = 0; i < N; ++i) {
        
        // i 人目が「不親切」だったら、証言はすべて無意味
        if ( !(bit & (1 << i)) ) continue;

        // それぞれ確認
        for (pint xy : v[i]) {
            int x = xy.first; // x が
            int y = xy.second; // y = 1: 正直、y = 0: 不親切

            // y = 1 なのに「不親切」だったらダメ
            if (y == 1 && !(bit & (1 << x))) return false;

            // y = 0 なのに「正直者」だったらダメ
            if (y == 0 && (bit & (1 << x))) return false;
        }
    }
    return true;
    /*for(int i=0; i<n; ++i){
        if(!(bit&(1<<i))) continue;

        for(pint xy : v[i]){
            int x = xy.first;
            int y = xy.second;

            if(y==1 && !(bit&(1<<i))){return false;}
            if(y==0 && (bit&(1<<i))){return false;}
        }
    }
    return true;*/
}


int main(){
    cin >> n;
    v.resize(n);
    for(int i=0; i<n; ++i){
        int a; cin >> a;
        v[i].resize(a);
        for(int j=0; j<a; ++j){
            cin >> v[i][j].first >> v[i][j].second;
            --v[i][j].first;
        }
    }

    int res = 0;
    for(int bit=0; bit<(1<<n); ++bit){
        if(judge(bit)){
            int cnt;
            for(int i=0; i<n; ++i){
                if(bit&(1<<i)){cnt++;}
            }
            res = max(res, cnt);
        }
    }
    cout << res << endl;
    return 0;
}

Compiler output:
a.cc: In function 'bool judge(int)':
a.cc:12:25: error: 'N' was not declared in this scope
   12 |     for (int i = 0; i < N; ++i) {
      |                         ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
using pint = pair<int ,int>;

int n; 
vector<vector<pint>> v;

bool judge(int bit){
    for(int i=0; i<n; ++i){
        if(!(bit&(1<<i))){continue;}

        for(pint xy : v[i]){
            int x = xy.first;
            int y = xy.second;

            if(y==1 && !(bit&(1<<i))){return false;}
            if(y==0 && !(bit&(1<<i))){return false;}
        }
    }
    return true;
}


int main(){
    cin >> n;
    v.resize(n);
    for(int i=0; i<n; ++i){
        int a; cin >> a;
        v[i].resize(a);
        for(int j=0; j<a; ++j){
            cin >> v[i][j].first >> v[i][j].second;
            --v[i][j].first;
        }
    }

    int res = 0;
    for(int bit=0; bit<(1<<n); ++bit){
        if(judge(bid)){
            int cnt;
            for(int i=0; i<n; ++i){
                if(bit&(1<<i)){cnt++;}
            }
            res = max(res, cnt);
        }
    }
    cout << res << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:38:18: error: 'bid' was not declared in this scope; did you mean 'bit'?
   38 |         if(judge(bid)){
      |                  ^~~
      |                  bit
Language: C++

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

int main(){
    int n;
    cin >> n;

    int a[15];
    int x[15][15];
    int y[15][15];

    for(int i = 1; i <= n; i++){
        cin >> a[i];
        for(int j = 1; j <= a[i]; j++){
            cin >> x[i][j] >> y[i][j];
        }
    }
-
    int ans = 0;
    for(int bit = 1; bit < (1 << n); bit++){
        bool flag = true;
        for(int i = 1; i <= n; i++){
            if(!(bit & (1 << i)))
                continue;
            for(int j = 1; j <= a[i]; j++){
                if(y[i][j] == 1 && !(bit & ( 1 << x[i][j])))
                    flag = false;
                if(y[i][j] == 0 && (bit & (1 << x[i][j])))
                    flag = false;
            }
        }
        if(flag)
            ans++;
    }

    cout << ans << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:5: error: expected primary-expression before 'int'
   19 |     int ans = 0;
      |     ^~~
a.cc:33:13: error: 'ans' was not declared in this scope; did you mean 'abs'?
   33 |             ans++;
      |             ^~~
      |             abs
a.cc:36:13: error: 'ans' was not declared in this scope; did you mean 'abs'?
   36 |     cout << ans << endl;
      |             ^~~
      |             abs
Language: C++

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

int main(){
    int n;
    cin >> n;

    int a[15];
    int x[15][15];
    int y[15][15];

    for(int i = 1; i <= n; i++){
        cin >> a[i];
        for(int j = 1; j <= a[i]; j++){
            cin >> x[i][j] >> y[i][j];
        }
    }
-
    int ans = 0;
    for(int bit = 1; bit < (1 << n); bit++){
        bool flag = true;
        for(int i = 1; i <= n; i++){
            if(!(bit & (1 << i)))
                continue;
            for(int j = 1; j <= A[i]; j++){
                if(y[i][j] == 1 && !(bit & ( 1 << x[i][j])))
                    flag = false;
                if(y[i][j] == 0 && (bit & (1 << x[i][j])))
                    flag = false;
            }
        }
        if(flag)
            ans++;
    }

    cout << ans << endl;

    

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:5: error: expected primary-expression before 'int'
   19 |     int ans = 0;
      |     ^~~
a.cc:25:33: error: 'A' was not declared in this scope
   25 |             for(int j = 1; j <= A[i]; j++){
      |                                 ^
a.cc:33:13: error: 'ans' was not declared in this scope; did you mean 'abs'?
   33 |             ans++;
      |             ^~~
      |             abs
a.cc:36:13: error: 'ans' was not declared in this scope; did you mean 'abs'?
   36 |     cout << ans << endl;
      |             ^~~
      |             abs
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define pi acos(-1)
#define IOS ios_base::sync_with_stdio(0); cin.tie(); cout.tie();
#define ff first
#define ss second
#define pb push_back
#define debug(val) cerr << "The Value Of " << #val << " is : " << val << '\n';
typedef long double ld;
typedef long long ll;
typedef unsigned long long ull;
const ll mod = 1e9 + 7;
const ll inf = 0x3f3f3f3f;
const ll mininf = -922337203685477;
const ll nax = 0;
ll n, a[20], maks=-1;
vector<vector<ll>>b(20), c(20);
	
int main(){
	IOS
	cin >> n;
	for(ll i=0;i<n;i++){
		cin >> a[i];
		for(ll j=0;j<a[i];j++){
			ll nomor, isi;
			cin >> nomor >> isi;
			nomor--;
			b[i].pb(nomor);
			c[i].pb(isi);
		}
	}
	for(ll mask=0;mask<(1<<n);mask++){
		bool ok=1;
		ll ans=0;
		for(ll i=0;i<n;i++){
			if(mask&(1<<i)){
				ans++;
				for(ll j=0;j<a[i];j++){
					if((mask&(1ll<<b[i][j]) && c[i][j])){
						continue;
					}
					else if((!(mask&(1ll<<b[i][j])) && !(c[i][j]))){
						 continue;
					}
	5				else{
						ok=0;
						break;
					}
				}
			}
		}
		if(ok){
			maks=max(maks, ans);
		}
	}
	cout << maks << '\n';
}


Compiler output:
a.cc: In function 'int main()':
a.cc:45:16: error: expected ';' before 'else'
   45 |         5                               else{
      |          ^~~~~~~                        ~~~~
      |                ;
Language: C++

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

int main(){
    int N;
    cin>>N;
    int a[N][N];
    rep(i,N)rep(j,N)a[i][j]=-1;
    rep(i,N){
        int A;
        cin>>A;
        rep(j,A){
            int x,y;
            cin>>x>>y;
            a[i][x-1]=y;
        }
    }
    int ans=0;
    for(int bit=0; bit<(1<<N); ++bit){
        int flag=1;
        int cnt=0;
        rep(i,N){
            if(bit&(1<<i)){
                rep(j,N){
                    if(a[i][j]!=-1){
                        if(a[i][j]==1){
                            if(!(bit&(1<<j)){
                                flag=0;
                                break;
                            }    
                        }
                        if(a[i][j]==0){
                            if(bit&(1<<j)){
                                flag=0;
                                break;
                            }
                        }
                    }
                }
            }
            if(flag==0)break;
        }
        if(flag==1)cnt=__builtin_popcount(bit);
        if(flag==1&&cnt>ans)ans=cnt;
    }
    cout<<ans<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:45: error: expected ')' before '{' token
   28 |                             if(!(bit&(1<<j)){
      |                               ~             ^
      |                                             )
a.cc:32:25: error: expected primary-expression before '}' token
   32 |                         }
      |                         ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll=long long;
#define rep(i,n) for(int i=0;i<n;i++)
int main() {
  int n;
  cin>>n;
  vector<vector<int>>l(n);
  rep(i,n){
    int a;
    cin>>a;
    rep(j,a){
      int x,y;
      cin>>x>>y;
      l[i].push_back(x);
      l[i].push_back(y);
    }
  }
  int ans=0;
  for(int tmp=0;tmp<(1<<15);tmp++){
    bitset<15>t(tmp);
    int tans=0;
    bool check=true;
    for(int i=0;i<n;i++){
      if(t.test(i)){
        for(int j=0;j<x[i].size();j+=2){
          tans++;
          if(l[i][j+1]==1 && (!t.test(l[i][j]-1))) check=false;
          if(l[i][j+1]==0 && (t.test(l[i][j]-1))) check=false;
        }
      }
    }
    if(check) ans=max(ans,tans);
  }
  cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:26:23: error: 'x' was not declared in this scope
   26 |         for(int j=0;j<x[i].size();j+=2){
      |                       ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll=long long;
#define rep(i,n) for(int i=0;i<n;i++)
int main() {
  int n;
  cin>>n;
  vector<vector<pair<int,int>>>x(n);
  rep(i,n){
    int a;
    cin>>a;
    rep(j,a){
      int k,y;
      cin>>k>>y;
      x[i].push_back(pair(k,y));
    }
  }
  int ans=0;
  for(int tmp=0;tmp<(1<<15);tmp++){
    bitset<15>t(tmp);
    tans=0;
    bool check=true;
    for(int i=0;i<n;i++){
      if(t.test(i)){
        for(int j=0;j<x[i].size();j++){
          tans++;
          if(x[i][j].second==1 && (!t.test(x[i][j].first-1))) check=false;
          if(x[i][j].second==0 && (t.test(x[i][j].first-1))) check=false;
        }
      }
    }
    if(check) ans=max(ans,tans);
  }
  cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:5: error: 'tans' was not declared in this scope; did you mean 'ans'?
   21 |     tans=0;
      |     ^~~~
      |     ans
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll=long long;
#define rep(i,n) for(int i=0;i<n;i++)
int main() {
  int n;
  cin>>n;
  vector<vector<int>>>l(n);
  rep(i,n){
    int a;
    cin>>a;
    rep(j,a){
      int x,y;
      cin>>x>>y;
      l[i].push_back(x);
      l[i].push_back(y);
    }
  }
  int ans=0;
  for(int tmp=0;tmp<(1<<15);tmp++){
    bitset<15>t(tmp);
    int tans=0;
    bool check=true;
    for(int i=0;i<n;i++){
      if(t.test(i)){
        for(int j=0;j<x[i].size();j+=2){
          tans++;
          if(l[i][j+1]==1 && (!t.test(l[i][j]-1))) check=false;
          if(l[i][j+1]==0 && (t.test(l[i][j]-1))) check=false;
        }
      }
    }
    if(check) ans=max(ans,tans);
  }
  cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:22: error: expected unqualified-id before '>' token
    8 |   vector<vector<int>>>l(n);
      |                      ^
a.cc:15:7: error: 'l' was not declared in this scope
   15 |       l[i].push_back(x);
      |       ^
a.cc:26:23: error: 'x' was not declared in this scope
   26 |         for(int j=0;j<x[i].size();j+=2){
      |                       ^
a.cc:28:14: error: 'l' was not declared in this scope
   28 |           if(l[i][j+1]==1 && (!t.test(l[i][j]-1))) check=false;
      |              ^
a.cc:29:14: error: 'l' was not declared in this scope
   29 |           if(l[i][j+1]==0 && (t.test(l[i][j]-1))) check=false;
      |              ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll=long long;
#define rep(i,n) for(int i=0;i<n;i++)
int main() {
  int n;
  cin>>n;
  vector<vector<pair<int,int>>>x(n);
  rep(i,n){
    int a;
    cin>>a;
    rep(j,a){
      int x,y;
      cin>>x>>y;
      x[i].push_back(pair(x,y));
    }
  }
  int ans=0;
  for(int tmp=0;tmp<(1<<15);tmp++){
    bitset<15>t(tmp);
    tans=0;
    bool check=true;
    for(int i=0;i<n;i++){
      if(t.test(i)){
        for(int j=0;j<x[i].size();j++){
          tans++;
          if(x[i][j].second==1 && (!t.test(x[i][j].first-1))) check=false;
          if(x[i][j].second==0 && (t.test(x[i][j].first-1))) check=false;
        }
      }
    }
    if(check) ans=max(ans,tans);
  }
  cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:8: error: invalid types 'int[int]' for array subscript
   15 |       x[i].push_back(pair(x,y));
      |        ^
a.cc:21:5: error: 'tans' was not declared in this scope; did you mean 'ans'?
   21 |     tans=0;
      |     ^~~~
      |     ans
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll=long long;
#define rep(i,n) for(int i=0;i<n;i++)
int main() {
  int n;
  cin>>n;
  vector<vector<pair<int,int>>>x(n);
  rep(i,n){
    int a;
    cin>>a;
    rep(j,a){
      int x,y;
      cin>>x>>y;
      x[i].push_back(pair(x,y));
    }
  }
  int ans=0;
  for(int tmp=0;tmp<(1<<15);tmp++){
    bitset<15>t(tmp);
    tans=0;
    bool check=true;
    for(int i=0;i<n;i++){
      if(t.test(i)){
        rep(j,x[i].size()){
          tans++;
          if(x[i][j].second==1 && (!t.test(x[i][j].first-1))) check=false;
          if(x[i][j].second==0 && (t.test(x[i][j].first-1))) check=false;
        }
      }
    }
    if(check) ans=max(ans,tans);
  }
  cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:8: error: invalid types 'int[int]' for array subscript
   15 |       x[i].push_back(pair(x,y));
      |        ^
a.cc:21:5: error: 'tans' was not declared in this scope; did you mean 'ans'?
   21 |     tans=0;
      |     ^~~~
      |     ans
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll=long long;
#define rep(i,n) for(int i=0;i<n;i++)
int main() {
  int n;
  cin>>n;
  vector<vector<pair<int,int>>>x(n);
  rep(i,n){
    int a;
    cin>>a;
    rep(j,a){
      int x,y;
      cin>>x>>y;
      x[i].push_back(make_pair(x,y));
    }
  }
  int ans=0;
  for(int tmp=0;tmp(1<<15);tmp++){
    bitset<15>t(tmp);
    tans=0;
    bool check=true;
    for(int i=0;i<n;i++){
      if(t.test(i)){
        rep(j,x[i].size()){
          tans++;
          if(x[i][j].second==1 && (!t.test(x[i][j].first-1))) check=false;
          if(x[i][j].second==0 && (t.test(x[i][j].first-1))) check=false;
        }
      }
    }
    if(check) ans=max(ans,tans);
  }
  cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:8: error: invalid types 'int[int]' for array subscript
   15 |       x[i].push_back(make_pair(x,y));
      |        ^
a.cc:19:20: error: 'tmp' cannot be used as a function
   19 |   for(int tmp=0;tmp(1<<15);tmp++){
      |                 ~~~^~~~~~~
a.cc:21:5: error: 'tans' was not declared in this scope; did you mean 'ans'?
   21 |     tans=0;
      |     ^~~~
      |     ans
Language: C++

#include <iostream>
#include <vector>
using namespace std;

#define ll long long int
#define rep0(i,n) for(ll i=0;i<=(ll)(n);i++)
#define rep1(i,n) for(ll i=1;i<=(ll)(n);i++)
#define repd(i,n) for(ll i=n-1;i>=0;i--)

int main() {
    int n;
    cin >> n;
    int x[n+1][n+1];
    int y[n+1][n+1];
    int a[n+1];
    bool all_not_told = true;
    rep1(i, n){
        cin >> a[i];
        if(a[i] > 0) all_not_told = false;
        rep1(j, a[i]){
            cin >> x[i][j] >> y[i][j];
        }
    }
    if(all_not_told){
        cout << n << endl;
        return 0;
    
    

    int max_honest_count = 0;
    // {0, 1, ..., n-1} の部分集合の全探索
    for(int bit = 0; bit < (1<<n); ++bit){
        if(bit == 0) continue;//全員真偽不明
        
        bool ishonest[n+1];

        int honest_count = 0;
        rep0(i,n-1){
            if (bit & (1<<i)) { // i が bit に入るかどうか
                ishonest[i+1] = true;
                honest_count++;
            }
        }    

        bool contradiction = false;
        rep1(i,n){
            if(ishonest[i]){
                rep1(j,a[i]){
                    if(y[i][j] == 1){   //honest
                      if(!ishonest[x[i][j]]){
                          contradiction = true;
                          break;
                      }
                    }else{  //not know whether honest or a lier
                        if(ishonest[x[i][j]]){
                          contradiction = true;
                          break;
                      }
                    }
                }
            }
        }
        if(contradiction) continue;
        if(honest_count > max_honest_count){
            max_honest_count = honest_count;
        }
    }
    cout << max_honest_count << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:70:2: error: expected '}' at end of input
   70 | }
      |  ^
a.cc:10:12: note: to match this '{'
   10 | int main() {
      |            ^
Language: C++

#include<iostream>
#include<string>
#include<algorithm>
#include<math.h>
#include<queue>
#include<vector>
#include<map>



using namespace std;

#define rep(i,n) for(int i=0;i<(n);i++)

int G[15][15];

int main(){
    int n;
    cin >> n;
    rep(i,n)rep(i,n) g[i][j] = -1;
    rep(i,n){
        int m;
        cin >> m;
        rep(j,m){
            int a,x;
            cin >> a >> x;
            a--;
            G[i][a] = x;
        }
    }
    int ans=0;
    rep(i,i<<n){
        vector<int> d(n);
        rep(j,n){
            // iを二進数であらわして、j桁目が1であるかどうかを判定、１ならjは正直者としてbit全探索の準備
            if((i>>j) & 1){ 
                d[j] = 1;
            }
        }
        bool ok = true;
        rep(j,n){
            rep(k,G[j].size()){
                if(d[j] == 1){
                    if(G[j][k] == 1 || G[j][k] == -1) continue;
                    else ok = false;  
                }
            }
        }

        if(ok){
            int anscandi=0;
            rep(j,n){
                if((i>>j) & 1) anscandi++; 
            }
            ans = max(ans, anscandi);
        }
    }
    cout << ans << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:22: error: 'g' was not declared in this scope
   20 |     rep(i,n)rep(i,n) g[i][j] = -1;
      |                      ^
a.cc:20:27: error: 'j' was not declared in this scope
   20 |     rep(i,n)rep(i,n) g[i][j] = -1;
      |                           ^
a.cc:42:24: error: request for member 'size' in 'G[j]', which is of non-class type 'int [15]'
   42 |             rep(k,G[j].size()){
      |                        ^~~~
a.cc:13:33: note: in definition of macro 'rep'
   13 | #define rep(i,n) for(int i=0;i<(n);i++)
      |                                 ^
Language: C++

#include<iostream>
#include<string>
#include<algorithm>
#include<math.h>
#include<queue>
#include<vector>
#include<map>



using namespace std;

#define rep(i,n) for(int i=0;i<(n);i++)

int G[15][15];

int main(){
    int n;
    cin >> n;
    rep(i,n)rep(i,n) g[i][j] = -1;
    rep(i,n){
        int m;
        cin >> m;
        rep(j,m){
            int a,x;
            cin >> a >> x;
            a--;
            G[i][a] = x;
        }
    }
    int ans=0;
    rep(i,i<<n){
        vector<int> d;
        rep(j,n){
            // iを二進数であらわして、j桁目が1であるかどうかを判定、１ならjは正直者としてbit全探索の準備
            if((i>>j) & 1){ 
                d[j] = 1;
            }
        }
        bool ok = true;
        rep(j,n){
            rep(k,G[j].size()){
                if(d[j] == 1){
                    if(G[j][k] == 1 || G[j][k] == -1) continue;
                    else ok = false;  
                }
            }
        }

        if(ok){
            int anscandi=0;
            rep(j,n){
                if((i>>j) & 1) anscandi++; 
            }
            ans = max(ans, anscandi);
        }
    }
    cout << ans << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:22: error: 'g' was not declared in this scope
   20 |     rep(i,n)rep(i,n) g[i][j] = -1;
      |                      ^
a.cc:20:27: error: 'j' was not declared in this scope
   20 |     rep(i,n)rep(i,n) g[i][j] = -1;
      |                           ^
a.cc:42:24: error: request for member 'size' in 'G[j]', which is of non-class type 'int [15]'
   42 |             rep(k,G[j].size()){
      |                        ^~~~
a.cc:13:33: note: in definition of macro 'rep'
   13 | #define rep(i,n) for(int i=0;i<(n);i++)
      |                                 ^
Language: Java

import java.util.*;

public class Main {

    private static class BitManipulations {

        // Sets the i'th bit to 1
        public static int setBit(int set, int i) {
            return set | (1 << i);
        }

        // Checks if the i'th is set
        public static boolean isSet(int set, int i) {
            return (set & (1 << i)) != 0;
        }

        // Sets the i'th bit to zero
        public static int clearBit(int set, int i) {
            return set & ~(1 << i);
        }

        // Toggles the i'th bit from 0 -> 1 or 1 -> 0
        public static int toggleBit(int set, int i) {
            return set ^ (1 << i);
        }

        // Returns a number with the first n bits set to 1
        public static int setAll(int n) {
            return (1 << n) - 1;
        }

        // Verifies if a number n is a power of two
        public static boolean isPowerOfTwo(int n) {
            return n > 0 && (n & (n - 1)) == 0;
        }

        // Count number of 1's
        public static int countSetBits(int n) {
            int count = 0;
            while (n > 0) {
                count += n & 1;
                n >>= 1;
            }
            return count;
        }
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        List<List<Pair<Integer, Integer>>> arr = new ArrayList<>();
        for (int i = 0; i < n; ++i) arr.add(new ArrayList<>());
        for (int i = 0; i < n; ++i) {
            int a = sc.nextInt();
            for (int j = 0; j < a; ++j) {
                arr.get(i).add(new Pair<>(sc.nextInt(), sc.nextInt()));
            }
        }

        int tmp = 0;
        int ans = 0;
        for (int bit = 0; bit < (1 << n); ++bit) {
            boolean flag = true;

            for (int i = 0; i < n; ++i) {

                if (!BitManipulations.isSet(bit, i)) continue;

                for (Pair<Integer, Integer> pair : arr.get(i)) {
                    if (pair.second == 1) {
                        if (!BitManipulations.isSet(bit, pair.first - 1)) flag = false;
                    } else {
                        if (BitManipulations.isSet(bit, pair.first - 1)) flag = false;
                    }
                }
            }

            if (flag) {
                tmp = BitManipulations.countSetBits(bit);
                ans = Math.max(ans, tmp);
            }
        }

        System.out.println(ans);
    }
}

Compiler output:
Main.java:51: error: cannot find symbol
        List<List<Pair<Integer, Integer>>> arr = new ArrayList<>();
                  ^
  symbol:   class Pair
  location: class Main
Main.java:56: error: cannot find symbol
                arr.get(i).add(new Pair<>(sc.nextInt(), sc.nextInt()));
                                   ^
  symbol:   class Pair
  location: class Main
Main.java:69: error: cannot find symbol
                for (Pair<Integer, Integer> pair : arr.get(i)) {
                     ^
  symbol:   class Pair
  location: class Main
3 errors
Language: Java

import lib.others.Pair;
import java.util.*;

public class Main {

    private static class BitManipulations {

        // Sets the i'th bit to 1
        public static int setBit(int set, int i) {
            return set | (1 << i);
        }

        // Checks if the i'th is set
        public static boolean isSet(int set, int i) {
            return (set & (1 << i)) != 0;
        }

        // Sets the i'th bit to zero
        public static int clearBit(int set, int i) {
            return set & ~(1 << i);
        }

        // Toggles the i'th bit from 0 -> 1 or 1 -> 0
        public static int toggleBit(int set, int i) {
            return set ^ (1 << i);
        }

        // Returns a number with the first n bits set to 1
        public static int setAll(int n) {
            return (1 << n) - 1;
        }

        // Verifies if a number n is a power of two
        public static boolean isPowerOfTwo(int n) {
            return n > 0 && (n & (n - 1)) == 0;
        }

        // Count number of 1's
        public static int countSetBits(int n) {
            int count = 0;
            while (n > 0) {
                count += n & 1;
                n >>= 1;
            }
            return count;
        }
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        List<List<Pair<Integer, Integer>>> arr = new ArrayList<>();
        for (int i = 0; i < n; ++i) arr.add(new ArrayList<>());
        for (int i = 0; i < n; ++i) {
            int a = sc.nextInt();
            for (int j = 0; j < a; ++j) {
                arr.get(i).add(new Pair<>(sc.nextInt(), sc.nextInt()));
            }
        }

        int tmp = 0;
        int ans = 0;
        for (int bit = 0; bit < (1 << n); ++bit) {
            boolean flag = true;

            for (int i = 0; i < n; ++i) {

                if (!BitManipulations.isSet(bit, i)) continue;

                for (Pair<Integer, Integer> pair : arr.get(i)) {
                    if (pair.second == 1) {
                        if (!BitManipulations.isSet(bit, pair.first - 1)) flag = false;
                    } else {
                        if (BitManipulations.isSet(bit, pair.first - 1)) flag = false;
                    }
                }
            }

            if (flag) {
                tmp = BitManipulations.countSetBits(bit);
                ans = Math.max(ans, tmp);
            }
        }

        System.out.println(ans);
    }
}

Compiler output:
Main.java:1: error: package lib.others does not exist
import lib.others.Pair;
                 ^
Main.java:52: error: cannot find symbol
        List<List<Pair<Integer, Integer>>> arr = new ArrayList<>();
                  ^
  symbol:   class Pair
  location: class Main
Main.java:57: error: cannot find symbol
                arr.get(i).add(new Pair<>(sc.nextInt(), sc.nextInt()));
                                   ^
  symbol:   class Pair
  location: class Main
Main.java:70: error: cannot find symbol
                for (Pair<Integer, Integer> pair : arr.get(i)) {
                     ^
  symbol:   class Pair
  location: class Main
4 errors
Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
const int INF = 1e9;
const ll mod = 1e9 + 7;
const int dx[] = {1, 0, -1, 0}, dy[] = {0, 1, 0, -1};

int g[15][15];

int main() {
  int n;
  cin >> n;
  rep(i,n) rep(j,n) g[i][j] = -1;
  rep(i,n) {
    int m;
    cin >> m;
    rep(j,m) {
      int a, x;
      cin >> a >> x;
      --a;
      g[i][a] = x;
    }
  }

  int ans = 0;
  rep(i,1<<n) {
    vector<int> d(n);
    rep(i,n) if (i >> j&1) {
      d[i] = 1;
    }
    bool ok = true;
    rep(j,n) {
      if (d[i]) {
        rep(k,n) {
          if (g[j][k] == -1) continue;
          if (g[j][k] != d[k]) ok = false;
        }
      }
    }
    if (ok) ans = max(ans, __builtin_popcount(i));
  }

  cout << ans << endl;

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:30:23: error: 'j' was not declared in this scope
   30 |     rep(i,n) if (i >> j&1) {
      |                       ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vec;
typedef vector<vec> mat;
typedef pair<ll,ll> pll;
const ll mod=1e9+7;
//const ll mod=998244353;
const ll inf=1LL<<61;

int main() {
  ll n;
  cin >> n;
  vector<vector<pll>> a(n);
  for(ll i=0;i<n;i++) {
    ll k;
    cin >> k;
    while(k--) {
      ll x,y;
      cin >> x >> y;
      x--;
      a[i].push_back({x,y});
    }
  }
  ll ans=0;
  for(ll i=0;i<(1<<n);i++) {
    ll f=0;
    ll tans=0;
    for(ll j=0;j<n;j++) {
      if((i>>j)&&1||) {
        tans++;
        for(ll k=0;k<a[j].size();k++) {
          if((i>>a[j][k].first)!=a[j][k].second) {
            f=1;
            break;
          }
        }
      }
      if(f) break;
    }
    if(!f) ans=max(ans,tans);
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:21: error: expected primary-expression before ')' token
   30 |       if((i>>j)&&1||) {
      |                     ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int N;
int A[20];
int x[20][20];
int y[20][20];
 
int counter(int x) {
    if(x == 0) return 0;
    return counter(x >> 1) + (x & 1);
}
 
void solve() {
    cin >> N;
    for(int i = 1; i <= N; i++) {
        cin >> A[i];
        for(int j = 1; j <= A[i]; j++) {
            cin >> x[i][j] >> y[i][j];
        }
    }
    int ans = 0;
    for(int bits = 1; bits < (1 << N); bits++) {
        bool ok = true;
        for(int i = 1; i <= N; i++) {
            if(!(bits & (1 << (i-1)))) continue;
            for(int j = 1; j <= A[i]; j++) {
                if((bits >> (x[i][j]-1)) ^ y[i][j]){
                  ok = false;
                  break;
            }
            }
            if(ok == false) break;
        }
        if(ok) ans = max(ans, counter(bits));
    }
    cout << ans << endl;
    return;
}


Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int N;
int A[20];
int x[20][20];
int y[20][20];
 
int counter(int x) {
    if(x == 0) return 0;
    return counter(x >> 1) + (x & 1);
}
 
void solve() {
    cin >> N;
    for(int i = 1; i <= N; i++) {
        cin >> A[i];
        for(int j = 1; j <= A[i]; j++) {
            cin >> x[i][j] >> y[i][j];
        }
    }
    int ans = 0;
    for(int bits = 1; bits < (1 << N); bits++) {
        bool ok = true;
        for(int i = 1; i <= N; i++) {
            if(!(bits & (1 << (i-1)))) continue;
            for(int j = 1; j <= A[i]; j++) {
                if((bits >> (x[i][j]-1)) ^ y[i][j]){
                  ok = false;
                  break;
            }
            if(ok == false) break;
        }
        if(ok) ans = max(ans, counter(bits));
    }
    cout << ans << endl;
    return;
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:38:2: error: expected '}' at end of input
   38 | }
      |  ^
a.cc:14:14: note: to match this '{'
   14 | void solve() {
      |              ^
Language: C++

#include<iostream>
#include<vector>
using namespace std;
using pint=pair<int,int>;

int N;
vector<vector<pint>> v;

bool judge(int bit){
  for(int i=0;i<N;i++){
    if(!(bit&(1<<i))) continue;
    
    for(pint xy:v[i]){
      int x=xy.first;
      int y=xy.second;
      
      if(y==1&&!(bit&(1<<x))) return false;
      if(y==0&&(bit&(1<<x))) return false;
    }
       }
       return true;
       }
   
int main(){
  cin>>N;
  v.resize(N);
  for(int i=0;i<N;i++){
    int A
      cin>>A;
    v[i].resize(A);
    for(int j=0;j<A;j++){
      cin>>v[i][j].first>>v[i][j].second;
      --v[i][j].first;
    }
  }
  int res=0;
  for(int bit=0;bit<(1<<N);bit++){
     if(judge(bit)){
       int count=0;
       for(int i=0;i<N;i++){
         if(bit&(1<<i)) ++count;
       }
  res=max(res,count);
     }
  }
  cout<<res<<endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:29:7: error: expected initializer before 'cin'
   29 |       cin>>A;
      |       ^~~
a.cc:30:17: error: 'A' was not declared in this scope
   30 |     v[i].resize(A);
      |                 ^
Language: C++

#include<iostream>
#include<vector>
using namespace std;
using pint=pair<int,int>;

int N;
vector<vector<pint>> v;

bool judge(int bit){
  for(int i=0;i<N;i++){
    if(!(bit&(1<<i)) continue;
    
    for(pint xy:v[i]){
      int x=xy.first;
      int y=xy.second;
      
      if(y==1&&!(bit&(1<<x))) return false;
      if(y==0&&(bit&(1<<x))) return false;
    }
       }
       return true;
       }
   
int main(){
  cin>>N;
  v.resize(N);
  for(int i=0;i<N;i++){
    int A
      cin>>A;
    v[i].resize(A);
    for(int j=0;j<A;j++){
      cin>>v[i][j].first>>v[i][j].second;
      --v[i][j].first;
    }
  }
  int res=0;
  for(int bit=0;bit<(1<<N);bit++){
     if(judge(bit)){
       int count=0;
       for(int i=0;i<N;i++){
         if(bit&(1<<i)) ++count;
       }
  res=max(res,count);
     }
  }
  cout<<res<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'bool judge(int)':
a.cc:11:21: error: expected ';' before 'continue'
   11 |     if(!(bit&(1<<i)) continue;
      |                     ^~~~~~~~~
      |                     ;
a.cc:13:5: error: expected primary-expression before 'for'
   13 |     for(pint xy:v[i]){
      |     ^~~
a.cc:11:31: error: expected ')' before 'for'
   11 |     if(!(bit&(1<<i)) continue;
      |       ~                       ^
      |                               )
   12 | 
   13 |     for(pint xy:v[i]){
      |     ~~~                        
a.cc:20:8: error: expected primary-expression before '}' token
   20 |        }
      |        ^
a.cc: In function 'int main()':
a.cc:29:7: error: expected initializer before 'cin'
   29 |       cin>>A;
      |       ^~~
a.cc:30:17: error: 'A' was not declared in this scope
   30 |     v[i].resize(A);
      |                 ^
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
        int m = sc.nextInt();
        int x = sc.nextInt();
        int ans = 0;
		int [] [] [] in = new int [n][n][2];
       
        for(int i=0;i<n;i++){in[n][0][0]=sc.nextInt();
                             for(int j=1;j<=in[n][0][0];j++){
                               for(int k=0;k<2;k++){in[j][k] = sc.nextInt();}}
                            }
        int max = 1;
        for(int i=0;i<n;i++){max*=2;}
        max--;
        int [] check = new int [n];  
        for(int i=0;i<=max;i++){int p = i; int count = 0; int bool = 0;
                                for(int j=0;j<n;j++){check[j]=p%2;p/=2;count+=(1+check[j])%2;}
                                for(int j=0;j<n;j++){if(check[j]==0){
                                                      for(int k=1;k<=in[j][0][0];k++)
                                                      {
                                                      if(check[in[j][k][0]-1]!=in[j][k][1])
                                                      {bool=1;}
                                                      }
                                                    }
                               if(bool==0){ans=Math.max(ans,count);}
                               }        
		System.out.println(ans);
}
}

Compiler output:
Main.java:32: error: reached end of file while parsing
}
 ^
1 error