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

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

int main(){
    int k,m;
    cin >> k >> m;
    vector<vector<int>> vec(m);
    rep(i,m){
        int k; cin >> k;
        vec[i].resize(k);
        rep(j,k){
            cin >> vec[i][j];
            vec[i][j]--;
        }
    }
    vector<int> p(m);
    rep(i,m) cin >> p[i];
    int ans = 0;
    for(int i; i < (1 << n;i++){
        bool ok = true;
        for(int j = 0;j < m;j++){
            int c = 0;
            for(int id ;vec[j]){
                if((i >> id) & 1){
                    c++;
                }
            }
            c %= 2;
            if(c != p[j]){
                ok = false;
            }
        }
        if(ok){
            ans++;
        }
    }
    cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:26: error: 'n' was not declared in this scope
   21 |     for(int i; i < (1 << n;i++){
      |                          ^
a.cc:21:27: error: expected ')' before ';' token
   21 |     for(int i; i < (1 << n;i++){
      |                    ~      ^
      |                           )
a.cc:25:30: error: could not convert 'vec.std::vector<std::vector<int> >::operator[](((std::vector<std::vector<int> >::size_type)j))' from '__gnu_cxx::__alloc_traits<std::allocator<std::vector<int> >, std::vector<int> >::value_type' {aka 'std::vector<int>'} to 'bool'
   25 |             for(int id ;vec[j]){
      |                              ^
      |                              |
      |                              __gnu_cxx::__alloc_traits<std::allocator<std::vector<int> >, std::vector<int> >::value_type {aka std::vector<int>}
a.cc:25:31: error: expected ';' before ')' token
   25 |             for(int id ;vec[j]){
      |                               ^
      |                               ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
 
int main() {
 
    int n, m;
    cin >> n >> m;
 
    vector<vector<int>> s(m);
    vector<int> k(m);
    for(int i = 0; i < m; ++i){
        cin >> k[i];
        vector<int> sk(k[i]);
        for(int j = 0; j < k[i]; ++j) cin >> sk[j];
 
        s[i] = sk;
    }

    vector<int> p(m);
    for(int i = 0; i < m; ++i) cin >> p[i];
 
    int res = 0;
    for(int i = 0; i < (1<<n); ++i){
        vector<int> on(n, 0);
        for(int j = 0; j < n; ++j){
            if(i & (1<<j)) on[j] = 1;
        }
 
        bool all_on = true;
        for(int j = 0; j < m; ++j)){
            int on_num = 0;
            for(int l = 0; l < k[j]; ++l){
                if(on[s[j][l] - 1]) ++on_num;
            }
 
            if(on_num%2 != p[j]) {
                all_on = false;
                break;
            }
        }
        
        if(all_on) ++res;
    }
 
    cout << res << endl;
 
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:31:35: error: expected primary-expression before ')' token
   31 |         for(int j = 0; j < m; ++j)){
      |                                   ^
Language: C++

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

int main() {
  int N, M; cin >> N >> M;
  vector<vector<int>> vec(M);
  for (int i = 0; i < M; i++) {
    int k; cin >> k;
    vec[i].resize(k);
    for (int j = 0; j < k; j++) {
      cin >> vec[i][j];
      vec[i][j] -= 1;
    }
  }
  vector<int> p(M);
  for (int i = 0; i < M; i++) {
    cin >> p[i];
  }

  int ans = 0;
  for (int bit = 0; bit < (1 << N); i++) {
    bool ok = true;
    for (int j = 0; j < M; j++) {
      int c = 0; // 電球jにつながっていて，かつonになっているスイッチの個数
      for (auto id : vec[j]) {
        if ((bit >> id) & 1) {
          c++;
        }
      }
      c %= 2;
      if (c != p[j]) {
        ok = false;
      }
    }
    if (ok) ans++;
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:37: error: 'i' was not declared in this scope
   21 |   for (int bit = 0; bit < (1 << N); i++) {
      |                                     ^
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <cmath>
#include <algorithm>
 
using namespace std;
 
int main(){
    int N,M;
    cin>>N>>M;
    vector<vector<int>> array(M);
    vector<int> light(M);
    for(int i=0;i<M;i++){
        int k;
        cin>>k;
        array[i].resize(k);
         for(int j=0;j<k;j++){
            cin>>array[i][j];
            array[i][j]--;
        }
    }
    for(int i= 0;i<M;i++)cin>>light[i];
    int ans = 0;
    for(int i=0;i<(1<<N);i++){
        bool ok = 1;
        for(int j=0;j<M;j++){
            int c=0;
            for(int id;array[j];){
                if((i>>id)&1){
                    c++;
                }
            }
            c%=2;
            if(c != light[j])ok =0;
        }
        if(ok)ans++;
    }
    cout<<ans<<endl;
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:31: error: could not convert 'array.std::vector<std::vector<int> >::operator[](((std::vector<std::vector<int> >::size_type)j))' from '__gnu_cxx::__alloc_traits<std::allocator<std::vector<int> >, std::vector<int> >::value_type' {aka 'std::vector<int>'} to 'bool'
   29 |             for(int id;array[j];){
      |                               ^
      |                               |
      |                               __gnu_cxx::__alloc_traits<std::allocator<std::vector<int> >, std::vector<int> >::value_type {aka std::vector<int>}
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <cmath>
#include <algorithm>
 
using namespace std;
 
int main(){
    int N,M;
    cin>>N>>M;
    vector<vector<int>> array(M);
    vector<int> light(M);
    for(int i=0;i<M;i++){
        int k;
        cin>>k;
        array[i].resize(k);
         for(int j=0;j<k;j++){
            cin>>array[i][j];
            array[i][j]--;
        }
    }
    for(int i= 0;i<M;i++)cin>>light[i];
    int ans = 0;
    for(int i=0;i<(1<<N);i++){
        bool ok = 1;
        for(int j=0;j<M;j++){
            int c=0;
            for(int id;vec[j]){
                if((i>>id)&1){
                    c++;
                }
            }
            c%=2;
            if(c != p[j])ok =0;
        }
        if(ok)ans++;
    }
    cout<<ans<<endl;
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:24: error: 'vec' was not declared in this scope
   29 |             for(int id;vec[j]){
      |                        ^~~
a.cc:29:30: error: expected ';' before ')' token
   29 |             for(int id;vec[j]){
      |                              ^
      |                              ;
a.cc:35:21: error: 'p' was not declared in this scope
   35 |             if(c != p[j])ok =0;
      |                     ^
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <cmath>
#include <algorithm>
 
using namespace std;
 
int main(){
    int N,M;
    cin>>N>>M;
    vector<vector<int>> array(M);
    vector<int> light(M);
    for(int i=0;i<M;i++){
        int k;
        cin>>k;
        array[i].resize(k);
         for(int j=0;j<k;j++){
            cin>>array[i][j];
            array[i][j]--;
        }
    }
    for(int i= 0;i<M;i++)cin>>light.at();
    int ans = 0;
    for(int i=0;i<(1<<N);i++){
        bool ok = 1;
        for(int j=0;j<M;j++){
            int c=0;
            for(int id;vec[j]){
                if((i>>id)&1){
                    c++;
                }
            }
            c%=2;
            if(c != p[j])ok =0;
        }
        if(ok)ans++;
    }
    cout<<ans<<endl;
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:39: error: no matching function for call to 'std::vector<int>::at()'
   23 |     for(int i= 0;i<M;i++)cin>>light.at();
      |                               ~~~~~~~~^~
In file included from /usr/include/c++/14/vector:66,
                 from a.cc:3:
/usr/include/c++/14/bits/stl_vector.h:1180:7: note: candidate: 'std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::at(size_type) [with _Tp = int; _Alloc = std::allocator<int>; reference = int&; size_type = long unsigned int]'
 1180 |       at(size_type __n)
      |       ^~
/usr/include/c++/14/bits/stl_vector.h:1180:7: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/stl_vector.h:1199:7: note: candidate: 'std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::at(size_type) const [with _Tp = int; _Alloc = std::allocator<int>; const_reference = const int&; size_type = long unsigned int]'
 1199 |       at(size_type __n) const
      |       ^~
/usr/include/c++/14/bits/stl_vector.h:1199:7: note:   candidate expects 1 argument, 0 provided
a.cc:29:24: error: 'vec' was not declared in this scope
   29 |             for(int id;vec[j]){
      |                        ^~~
a.cc:29:30: error: expected ';' before ')' token
   29 |             for(int id;vec[j]){
      |                              ^
      |                              ;
a.cc:35:21: error: 'p' was not declared in this scope
   35 |             if(c != p[j])ok =0;
      |                     ^
Language: C++

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

int main() {
  int N,M;
  cin>>N>>M;
  vector<bitset>p(M);
  for(int i=0;i<M;i++){
    int k;
    cin>>k;
    bitset<N> a;
    for(int j=0;j<k;j++){
      int b;
      cin>>b;
      a.set(b-1);
    }
    p.at(i)=a;
  }
      vector<int> q.(M);
      for(int i=0;i<M;i++){
        cin>>q.at(i);
      }
      int Z=0;
      for (int i = 0; i < (1 << N); i++) {
    bitset<N> s(i);
        int e=0;
      for(int j=1; j<M;j++){
        bitset d=(p.at(j)&s);
        if(d.count()%2==q.at(j)){
          e++;
        }
        if(e==M){
          Z++;
        }
      }
        cout<<Z<<endl;
      
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:16: error: type/value mismatch at argument 1 in template parameter list for 'template<class _Tp, class _Alloc> class std::vector'
    7 |   vector<bitset>p(M);
      |                ^
a.cc:7:16: note:   expected a type, got 'bitset'
a.cc:7:16: error: template argument 2 is invalid
a.cc:11:13: error: the value of 'N' is not usable in a constant expression
   11 |     bitset<N> a;
      |             ^
a.cc:5:7: note: 'int N' is not const
    5 |   int N,M;
      |       ^
a.cc:11:13: note: in template argument for type 'long unsigned int'
   11 |     bitset<N> a;
      |             ^
a.cc:15:9: error: request for member 'set' in 'a', which is of non-class type 'int'
   15 |       a.set(b-1);
      |         ^~~
a.cc:17:7: error: request for member 'at' in 'p', which is of non-class type 'int'
   17 |     p.at(i)=a;
      |       ^~
a.cc:19:20: error: expected initializer before '.' token
   19 |       vector<int> q.(M);
      |                    ^
a.cc:21:14: error: 'q' was not declared in this scope
   21 |         cin>>q.at(i);
      |              ^
a.cc:25:13: error: the value of 'N' is not usable in a constant expression
   25 |     bitset<N> s(i);
      |             ^
a.cc:5:7: note: 'int N' is not const
    5 |   int N,M;
      |       ^
a.cc:25:13: note: in template argument for type 'long unsigned int'
   25 |     bitset<N> s(i);
      |             ^
a.cc:28:21: error: request for member 'at' in 'p', which is of non-class type 'int'
   28 |         bitset d=(p.at(j)&s);
      |                     ^~
a.cc:29:25: error: 'q' was not declared in this scope
   29 |         if(d.count()%2==q.at(j)){
      |                         ^
a.cc:38:2: error: expected '}' at end of input
   38 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

import java.util.*;
 
public class Main {
    public static void main(String[] args) throws Exception {
        Scanner in = new Scanner(System.in);
        long n = in.nextInt();
        long m = in.nextInt();
        long k[] = new long[11];
        long p[] = new long[11];
        int s[][] = new int[11][11];
        for (int i = 0; i < m; i++) {
            k[i] = in.nextInt();
            for (int j = 0; j < k[i]; j++) {
                s[i][j] = in.nextInt() - 1;
            }
        }
        for (int i = 0; i < m; i++) {
            p[i] = in.nextInt();
        }

        long res = 0;
        for (int b = 0; b < (1 << n); b++) {
            boolean ok = true;
            for (int i = 0; i < m; i++) {
                int cnt = 0;
                for (int j = 0; j < k[i]; j++) {
                    if (((b >> s[i][j]) & 1) == 0) {
                        continue;
                    }
                    cnt++;
                }
                if (cnt % 2 != p[i]) {
                    ok = false;
                    break;
                }
            }
            if (ok) {
                res++;
            }
        }
        System.out.println(res);
    }
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.*;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
    3 | public class Main {
      | ^~~~~~
Language: C++

#include<bits/stdc++.h>
#define rep(i,n)for(int i=0;i<n;++i)
#include<string>
#include<vector>
using namespace std;
typedef long long ll;
typedef pair<int, int>P;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
//max=({});
//条件式が真ならwhileの中身を回し続ける
//printf("%d\n", ans);

//pairの入力
//vector<pair<ll, ll>>work(n);
//rep(i, n) {
//	ll a, b;
//	cin >> a >> b;
//	work[i] = make_pair(a, b);
//for(auto p:mp)(mapの探索)
//printf("%.10f\n",なんちゃら)

int g[15][15];
const int INF = 1001001001;
const int dx[4] = { -1,0,1,0 };
const int dy[4] = { 0,-1,0,1 };

//最大公約数
ll gcd(ll x, ll y) {
	return y ? gcd(y, x % y) : x;
}

ll lcm(ll x, ll y) {
	if (x == 0 || y == 0)return 0;
	return (x / gcd(x, y) * y);
}

//素因数分解
vector<pair<ll, int>>factorize(ll n) {
	vector<pair<ll, int>>res;
	for (ll i = 2;i * i <= n;++i) {
		if (n % i)continue;
		res.emplace_back(i, 0);
		while (n % i == 0) {
			n /= i;
			res.back().second++;
		}
	}
	if (n != 1)res.emplace_back(n, 1);
	return res;
}

int bingo[3][3];
bool flag[3][3];
int cnt[2][105];
int h, w;
int choco[1010][1010];
int s[11][11];

int main() {
	int n, m;
	cin >> n >> m;
	vector<int>k(m), p(m);
	rep(i, m) {
		cin >> k[i];
		rep(j, k[i]) {
			cin >> s[i][j];
			s[i][j]--;
		}
	}
	rep(i, m) {
		cin >> p[i];
	}
	int ans = 0;
	for (int bit i = 0;bit < (1 << n);++bit) {
		bool flag = true;
		rep(i, m) {
			int res = 0;
			rep(j, k[i]) {
				if (bit & (1 << s[i][j]))res++;
			}
			if (res % 2 != p[i])flag = false;
		}
		if (flag)ans++;
	}
	cout << ans << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:75:21: error: expected ';' before 'i'
   75 |         for (int bit i = 0;bit < (1 << n);++bit) {
      |                     ^~
      |                     ;
a.cc:75:22: error: 'i' was not declared in this scope
   75 |         for (int bit i = 0;bit < (1 << n);++bit) {
      |                      ^
a.cc:75:42: error: expected ')' before ';' token
   75 |         for (int bit i = 0;bit < (1 << n);++bit) {
      |             ~                            ^
      |                                          )
a.cc:75:45: error: 'bit' was not declared in this scope
   75 |         for (int bit i = 0;bit < (1 << n);++bit) {
      |                                             ^~~
Language: C++

int main() {
 int a;
 int b;
  cin >> a >> b;
  int y = 0;
  vector<vector<int>> d(b);
  for(int i=0;i < b;i++){
    int z;
     cin >> z;
     int k = 0;
     for(int j=0;j<z;j++){
       int rrr;
       cin >> rrr;
          d.at(i).push_back(rrr-1);}
  }
  vector<int> p(b);
  for(int i=0;i < b;i++){
    cin >> p.at(i);}
  
 for(int bit = 0;bit <(1<<a);++bit){
   int t = 1;
   for(int i=0;i < b;i++){
     int k = 0;
     for(int j=0;j < d.at(i).size();j++){
       if(bit & (1<<d.at(i).at(j))){k++;}
     }
     if(k % 2 != p.at(i)){t = 0;}
   }
   if(t == 1){y++;}
 }
  cout << y << endl;
       

}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'cin' was not declared in this scope
    4 |   cin >> a >> b;
      |   ^~~
a.cc:6:3: error: 'vector' was not declared in this scope
    6 |   vector<vector<int>> d(b);
      |   ^~~~~~
a.cc:6:17: error: expected primary-expression before 'int'
    6 |   vector<vector<int>> d(b);
      |                 ^~~
a.cc:14:11: error: 'd' was not declared in this scope
   14 |           d.at(i).push_back(rrr-1);}
      |           ^
a.cc:16:10: error: expected primary-expression before 'int'
   16 |   vector<int> p(b);
      |          ^~~
a.cc:18:12: error: 'p' was not declared in this scope
   18 |     cin >> p.at(i);}
      |            ^
a.cc:24:22: error: 'd' was not declared in this scope
   24 |      for(int j=0;j < d.at(i).size();j++){
      |                      ^
a.cc:27:18: error: 'p' was not declared in this scope
   27 |      if(k % 2 != p.at(i)){t = 0;}
      |                  ^
a.cc:31:3: error: 'cout' was not declared in this scope
   31 |   cout << y << endl;
      |   ^~~~
a.cc:31:16: error: 'endl' was not declared in this scope
   31 |   cout << y << endl;
      |                ^~~~
Language: C++

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

using namespace std;

void C_128()
{
  int N, M;
  cin >> N >> M;

  vector< vector<int> > light(M);
  for (int i = 0; i < M; ++i)
  {
    int k;
    cin >> k;
    light[i].resize(k);

    for (int j = 0; j < k; ++j)
    {
      cin >> light[i][j];
      --light[i][j];
    }
  }

  vector<int> p(M);
  for (int i = 0; i < M; ++i) cin >> p[i];

  int ans = 0;
  for (int i = 0; i < (1 << N); ++i)
  {
    bool ok = true;
    for (int j = 0; j < M; ++j)
    {
      
      int c = 0;
      for (int id : light[j])
      {
        if ((i >> id) & 1) ++c;
      }
      c %= 2;
      if (c != p[j]) ok = false;
    }

    if (ok == true) ++ans;
  }
  cout << ans << endl;
}


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 main(){
        int n,m;
        cin >> n>> m;
        vector<vector<int>> vec(m);
        for(int i = 0; i< m; i++)
        {
               int k;
               cin >>k;
               vec[i].resize(k);
               for(int j =0;j< k;j++)
               {
                       cin >> vec[i][j];
                       vec[i][j]--;
               }
        }
        vector<int>p(m);
        for(int i=0; i< m;i++)
        {
                cin >> p[i];
        }
        int ans = 0;
        for(int i =0; i<(1<<n);i++)
        {
                bool ok = true;
                for(int j=0;j< m;j++)
                {
                        int c= 0;
                        for(int id:vec[j])
                        {
                                if((i>>id)&1){c++;}
                        }
                        c%=2;
                        if(c!=p[j])
                        {
                                ok=false;
                        }

                }

        if(ok){
        ans++;
        }
        cout<< ans<< endl;

}


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

#include<bits/stdc++.h>
using namespace std;
int main(){
        int n,m;
        cin >> n>> m;
        vector<vector<int>> vec(m);
        for(int i = 0; i< m; i++)
        {
               int k;
               cin >>k;
               vec[i].resize(k);
               for(int j =0;j< k;j++)
               {
                       cin >> vec[i][j];
                       vec[i][j]--;
               }
        }
        vector<int>p(m);
        for(int i=0; i< m;i++)
        {
                cin >> p[i];
        }
        for(int i =0; i<(1<<n);i++)
        {
                bool ok = true;
                for(int j=0;j< m;j++)
                {
                        int c= 0;
                        for(int id:vec[j])
                        {
                                if((i>>id)&1){c++;}
                        }
                        c%=2;
                        if(c!=p[j])
                        {
                                ok=false;
                        }

                }

        if(ok){
        ans++;
        }
        cout<< ans<< endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:42:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   42 |         ans++;
      |         ^~~
      |         abs
a.cc:44:16: error: 'ans' was not declared in this scope; did you mean 'abs'?
   44 |         cout<< ans<< endl;
      |                ^~~
      |                abs
a.cc:46:2: error: expected '}' at end of input
   46 | }
      |  ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
        int n,m;
        cin >> n>> m;
        vector<vector<int>> vec(m);
        for(int i = 0; i< m; i++)
        {
               int k;
               cin >>k;
               vec[i].resize(k);
               for(int j =0;j< k;j++)
               {
                       cin >> vec[i][j];
                       vec[i][j]--;
               }
        }
        vector<int>p(m);
        for(int i=0; i< m;i++)
        {
                cin >> p[i];
        }
        for(int i =0; i<(1<<n);i++)
        {
                bool ok = true;
                for(int j=0;j< m;j++)
                {
                        int c= 0;
                        for(int id:vec[j])
                        {
                                if((i>>id)&1){c++;}
                        }
                }
                c%=2;
                if(c!=p[j])
                {
                        ok=false;
                }
        if(ok)
        ans++;
        }
        cout<< ans<< endl;

}



Compiler output:
a.cc: In function 'int main()':
a.cc:34:17: error: 'c' was not declared in this scope
   34 |                 c%=2;
      |                 ^
a.cc:35:25: error: 'j' was not declared in this scope
   35 |                 if(c!=p[j])
      |                         ^
a.cc:40:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   40 |         ans++;
      |         ^~~
      |         abs
a.cc:42:16: error: 'ans' was not declared in this scope; did you mean 'abs'?
   42 |         cout<< ans<< endl;
      |                ^~~
      |                abs
Language: C++

y#include<bits/stdc++.h>

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

using namespace std;

using ll = long long;
using P = pair<int , int>;
  
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);

  int n, m; cin >> n >> m;
  int cnt[m][n]; rep(i, m) rep(j, n) cnt[i][j] = 0;
  
  rep(i, m) {
    int k; cin >> k;
    rep(j, k) {
      int x; cin >> x;
      ++cnt[i][x-1];
    }
  }
  int p[m]; rep(i, m) cin >> p[i];
  int ans = 0;

  rep(i, (1<<n)) {
    vector<int> v(n);
    rep(j, n) {
      v[j] = (i>>j & 1);
    }
    bool flag = 1;
    rep(j, m) {
      int sum = 0;
      rep(k, n) {
        sum += (cnt[j][k] * v[k]);
      }
      if(sum%2 != p[j]) flag = 0;
    }
    ans += flag;
  }
  cout << ans;
}
    


Compiler output:
a.cc:1:2: error: stray '#' in program
    1 | y#include<bits/stdc++.h>
      |  ^
a.cc:1:1: error: 'y' does not name a type
    1 | y#include<bits/stdc++.h>
      | ^
a.cc:8:11: error: 'pair' does not name a type
    8 | using P = pair<int , int>;
      |           ^~~~
a.cc: In function 'int main()':
a.cc:11:3: error: 'ios' has not been declared
   11 |   ios::sync_with_stdio(false);
      |   ^~~
a.cc:12:3: error: 'cin' was not declared in this scope
   12 |   cin.tie(0);
      |   ^~~
a.cc:28:5: error: 'vector' was not declared in this scope
   28 |     vector<int> v(n);
      |     ^~~~~~
a.cc:28:12: error: expected primary-expression before 'int'
   28 |     vector<int> v(n);
      |            ^~~
a.cc:30:7: error: 'v' was not declared in this scope
   30 |       v[j] = (i>>j & 1);
      |       ^
a.cc:36:29: error: 'v' was not declared in this scope
   36 |         sum += (cnt[j][k] * v[k]);
      |                             ^
a.cc:42:3: error: 'cout' was not declared in this scope
   42 |   cout << ans;
      |   ^~~~
Language: C++

//#define _GLIBCXX_DEBUG

#include<bits/stdc++.h>
#define PI 3.14159265359
using namespace std;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
const int INF= 1e9+5;
typedef long long ll;
typedef vector<ll> vl;
typedef vector<vector<ll> >vvl;
typedef pair<ll,ll> P;
typedef tuple<ll,ll,ll> T;
const ll MOD=1000000007LL;
string abc="abcdefghijklmnopqrstuvwxyz";
string ABC="ABCDEFGHIJKLMNOPQRSTUVWXYZ";

int main(){
  ll n,m;cin>>n>>m;
  vl k(m);
  vvl s(m,vl);
  rep(i,m){
    cin>>k[i];
    rep(j,k[i]){
      ll t;cin>>t;
      t--;
      s[i].push_back(t);
    }
  }
  vl p(m);
  rep(i,m)cin>>p[i];
  ll count=0;
  rep(bit,1<<n){
    ll part=0;
    rep(i,m){
      ll sum=0;
      rep(j,k[i]){
        if(1<<s[i][j]&bit)sum+=1;
      }
      if(sum%2==p[i])part++;
    }
    if(part==m)count++;
  }
  cout<<count<<endl;
}
      
  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:20:13: error: expected primary-expression before ')' token
   20 |   vvl s(m,vl);
      |             ^
Language: C++

N, M = map(int, input().split())
ks = [list(map(int, input().split())) for _ in range(M)]
p = list(map(int, input().split()))
blst = []
cnt = 0
for i in range(2 ** N):
    slst = []
    for j in range(N):
        if i >> j & 1:
            slst.append(j)
    blst.append(slst)

for i in blst:
    ansF = False
    for j in range(M):
        ctmp1 = 0
        for k in i:
            if ks[j][1:].count(k + 1) == 1:
                ctmp1 += 1
        if ctmp1 % 2 == p[j]:
            ansF = True
        else:
            ansF = False
            break
    if ansF:
        cnt += 1

print(cnt)

Compiler output:
a.cc:1:1: error: 'N' does not name a type
    1 | N, M = map(int, input().split())
      | ^
Language: C++

#include<iostream>
#include <bits/stdc++.h>
using namespace std;
int main()
{
   int n,m ;
   cin >> n >> m;
   int s[m][n] ;
  for(int i=1;i<=m;i++){
          cin >> s[i][0];
          for(int j=1;j<=s[i][0];j++) cin>>s[i][j],s[i][j]--;
    }
  }  
  int p[m];
  for(int i=1;i<=m;i++) cin>> p[i];
    int ans = 0;

  for(int bit=0;bit<=pow(2,n)-1;bit++){
    int sum=0;
    for(int j=1;j<=m;j++)
    {
      int tot=0;
      for(int k=1;k<=s[j][0];k++)
      {
        if(bit&1<<s[j][k]) tot++;
      }
      if(tot%2==p[j]) sum++;
    }
    if(sum==m) ans++;
  }
  
      cout << ans << endl;
    return 0;
}


Compiler output:
a.cc:14:9: error: 'm' was not declared in this scope; did you mean 'tm'?
   14 |   int p[m];
      |         ^
      |         tm
a.cc:15:3: error: expected unqualified-id before 'for'
   15 |   for(int i=1;i<=m;i++) cin>> p[i];
      |   ^~~
a.cc:15:15: error: 'i' does not name a type
   15 |   for(int i=1;i<=m;i++) cin>> p[i];
      |               ^
a.cc:15:20: error: 'i' does not name a type
   15 |   for(int i=1;i<=m;i++) cin>> p[i];
      |                    ^
a.cc:18:3: error: expected unqualified-id before 'for'
   18 |   for(int bit=0;bit<=pow(2,n)-1;bit++){
      |   ^~~
a.cc:18:17: error: 'bit' does not name a type
   18 |   for(int bit=0;bit<=pow(2,n)-1;bit++){
      |                 ^~~
a.cc:18:33: error: 'bit' does not name a type
   18 |   for(int bit=0;bit<=pow(2,n)-1;bit++){
      |                                 ^~~
a.cc:32:7: error: 'cout' does not name a type
   32 |       cout << ans << endl;
      |       ^~~~
a.cc:33:5: error: expected unqualified-id before 'return'
   33 |     return 0;
      |     ^~~~~~
a.cc:34:1: error: expected declaration before '}' token
   34 | }
      | ^
Language: C++

#include<iostream>
#include <bits/stdc++.h>
using namespace std;
int main()
{
   int n,m ;
   cin >> n >> m;
   int k[m];
  for(int i=0;i<m;i++) cin>> k[i];
   int s[m][n] ;
  for(int i=0;i<m;i++){
    for(int j=0;j<n;j++){
     s[i][j]=0;
    }
  }
  for(int i=0;i<m;i++){
    for(int j=0;j<k[m];j++){
      cin >> s[i][j];
    }
  }  
  int p[m];
  for(int i=0;i<m;i++) cin>> p[i];
  
  for(int bit=0;bit<(1<<n);bit++){
      bool ison[n]={false};
      for(int i = 0; i < n; i++) {
            if(bit & (1 << i)) {
                ison[i] = true;
            }
        }
    int allOn=1;
      for(int i = 0; i < m; i++) {
            int sum = 0;
            for(int j=0;j<k[i];j++) {
                int ind = s[i][j];
                sum += ison[ind] ? 1 : 0;
            }
            allOn *= (sum % 2 == p[i]) ? 1 : 0;
        }
     ans += allOn;
  }
  
      cout << ans << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:40:6: error: 'ans' was not declared in this scope; did you mean 'abs'?
   40 |      ans += allOn;
      |      ^~~
      |      abs
a.cc:43:15: error: 'ans' was not declared in this scope; did you mean 'abs'?
   43 |       cout << ans << endl;
      |               ^~~
      |               abs
Language: C++

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

bool are_switched(bitset<10> bit, 
		const vector<bitset<10>> &l_switch, int M, const vector<int> &p)
{
	int	mod;
	for (int j = 0; j < M; ++j) {
		mod = (bit & l_switch.at(j)).count() % 2; 
		if (mod != p.at(j))
			return false;
	}
	return true;
}

int	main()
{
	int	N, M;
	cin >> N >> M;
	vector<bitset<10>> light_switch(M);
	for (int i = 0; i < M; ++i) {
		int	k;
		cin >> k;;
		int	s;
		for (int j = 0; j < k; ++j) {
			cin >> s;
			light_switch.at(i).set(s - 1);
		}
	}
	vector<int> p(M);
	for (int i = 0; i < M; ++i)
		cin >> p.at(i);
	int	cnt = 0;
	for (int i = 0; i < (1 << N); ++i) {
		bitset<10> bit(i);
		if (are_switched(bit, light_switch, M, p))
			++cnt;
	}
	cout << cnt << endl;
}


Compiler output:
a.cc:1:10: fatal error: bits/stdc++.H: No such file or directory
    1 | #include <bits/stdc++.H>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

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

#define count_bits(n) (0x0000ffff&((0x00ff00ff&((0x0f0f0f0f&((0x33333333&((0x55555555&(n))+((0xaaaaaaaa&(n))>>1)))+((0xcccccccc&((0x55555555&(n))+((0xaaaaaaaa&(n))>>1)))>>2)))+((0xf0f0f0f0&((0x33333333&((0x55555555&(n))+((0xaaaaaaaa&(n))>>1)))+((0xcccccccc&((0x55555555&(n))+((0xaaaaaaaa&(n))>>1)))>>2)))>>4)))+((0xff00ff00&((0x0f0f0f0f&((0x33333333&((0x55555555&(n))+((0xaaaaaaaa&(n))>>1)))+((0xcccccccc&((0x55555555&(n))+((0xaaaaaaaa&(n))>>1)))>>2)))+((0xf0f0f0f0&((0x33333333&((0x55555555&(n))+((0xaaaaaaaa&(n))>>1)))+((0xcccccccc&((0x55555555&(n))+((0xaaaaaaaa&(n))>>1)))>>2)))>>4)))>>8)))+((0xffff0000&((0x00ff00ff&((0x0f0f0f0f&((0x33333333&((0x55555555&(n))+((0xaaaaaaaa&(n))>>1)))+((0xcccccccc&((0x55555555&(n))+((0xaaaaaaaa&(n))>>1)))>>2)))+((0xf0f0f0f0&((0x33333333&((0x55555555&(n))+((0xaaaaaaaa&(n))>>1)))+((0xcccccccc&((0x55555555&(n))+((0xaaaaaaaa&(n))>>1)))>>2)))>>4)))+((0xff00ff00&((0x0f0f0f0f&((0x33333333&((0x55555555&(n))+((0xaaaaaaaa&(n))>>1)))+((0xcccccccc&((0x55555555&(n))+((0xaaaaaaaa&(n))>>1)))>>2)))+((0xf0f0f0f0&((0x33333333&((0x55555555&(n))+((0xaaaaaaaa&(n))>>1)))+((0xcccccccc&((0x55555555&(n))+((0xaaaaaaaa&(n))>>1)))>>2)))>>4)))>>8)))>>16)

int main(){
    int n, m;
    cin >> n >> m;
    int s[m];
    int p[m];

    memset(s, 0, sizeof(int)*m);
    for(int i=0; i<m; i++){
        int k;
        cin >> k;
        for(int j=0; j<k; j++){
            int si;
            cin >> si;
            s[i] |= (1<<(si-1));
        }
    }

    for(int i=0; i<m; i++){
        cin >> p[i];
    }

    int res_cnt=0;
    for(int i=0; i<(1<<n); i++){
        int on_cnt=0;
        for(int j=0; j<m; j++){
            if((count_bits(i&s[j]) & 1) == p[j]){
                on_cnt ++;
            }
        }
        if(on_cnt == m){
            res_cnt++;
        }
    }
     
    cout << res_cnt << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:5: error: 'memset' was not declared in this scope
   13 |     memset(s, 0, sizeof(int)*m);
      |     ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 | #include <string>
Language: C++

#include <iostream>
using namespace std;

#define count_bits(n) (0x0000ffff&((0x00ff00ff&((0x0f0f0f0f&((0x33333333&((0x55555555&(n))+((0xaaaaaaaa&(n))>>1)))+((0xcccccccc&((0x55555555&(n))+((0xaaaaaaaa&(n))>>1)))>>2)))+((0xf0f0f0f0&((0x33333333&((0x55555555&(n))+((0xaaaaaaaa&(n))>>1)))+((0xcccccccc&((0x55555555&(n))+((0xaaaaaaaa&(n))>>1)))>>2)))>>4)))+((0xff00ff00&((0x0f0f0f0f&((0x33333333&((0x55555555&(n))+((0xaaaaaaaa&(n))>>1)))+((0xcccccccc&((0x55555555&(n))+((0xaaaaaaaa&(n))>>1)))>>2)))+((0xf0f0f0f0&((0x33333333&((0x55555555&(n))+((0xaaaaaaaa&(n))>>1)))+((0xcccccccc&((0x55555555&(n))+((0xaaaaaaaa&(n))>>1)))>>2)))>>4)))>>8)))+((0xffff0000&((0x00ff00ff&((0x0f0f0f0f&((0x33333333&((0x55555555&(n))+((0xaaaaaaaa&(n))>>1)))+((0xcccccccc&((0x55555555&(n))+((0xaaaaaaaa&(n))>>1)))>>2)))+((0xf0f0f0f0&((0x33333333&((0x55555555&(n))+((0xaaaaaaaa&(n))>>1)))+((0xcccccccc&((0x55555555&(n))+((0xaaaaaaaa&(n))>>1)))>>2)))>>4)))+((0xff00ff00&((0x0f0f0f0f&((0x33333333&((0x55555555&(n))+((0xaaaaaaaa&(n))>>1)))+((0xcccccccc&((0x55555555&(n))+((0xaaaaaaaa&(n))>>1)))>>2)))+((0xf0f0f0f0&((0x33333333&((0x55555555&(n))+((0xaaaaaaaa&(n))>>1)))+((0xcccccccc&((0x55555555&(n))+((0xaaaaaaaa&(n))>>1)))>>2)))>>4)))>>8)))>>16)

int main(){
    int n, m;
    cin >> n >> m;
    int s[m];
    int p[m];

    memset(s, 0, sizeof(int)*m);
    for(int i=0; i<m; i++){
        int k;
        cin >> k;
        for(int j=0; j<k; j++){
            int si;
            cin >> si;
            s[i] |= (1<<(si-1));
        }
    }

    for(int i=0; i<m; i++){
        cin >> p[i];
    }

    int res_cnt=0;
    for(int i=0; i<(1<<n); i++){
        int on_cnt=0;
        for(int j=0; j<m; j++){
            if((count_bits(i&s[j]) & 1) == p[j]){
                on_cnt ++;
            }
        }
        if(on_cnt == m){
            res_cnt++;
        }
    }
     
    cout << res_cnt << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:5: error: 'memset' was not declared in this scope
   12 |     memset(s, 0, sizeof(int)*m);
      |     ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 | using namespace std;
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rrep(i, n) for (int i = (n)-1; i >= 0; i--)
using llong = long long;
using P = pair<int, int>;
const int inf = 1 << 20;
const int mod = 1e9 + 7;

int main() {
   int n, m;
   cin >> n >> m;
   vector<int> a(n);
   rep(i, m) {
      int k;
      cin >> k;
      rep(j, k) {
         int s;
         cin >> s;
         s--;
         a[s] |= 1 << i;
      }
   }
   rep(i, m) {
      int x;
      cin >> x;
      p |= x << i;
   }
   int ans = 0;
   rep(s, 1 << n) {
      int t = 0;
      rep(i, n) {
         if (s >> i & 1) {
            t ^= a[i];
         }
      }
      if (t == p) {
         ans++;
      }
   }
   cout << ans << endl;
   return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:7: error: 'p' was not declared in this scope
   27 |       p |= x << i;
      |       ^
a.cc:37:16: error: 'p' was not declared in this scope
   37 |       if (t == p) {
      |                ^
Language: C++

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

  int N , M ;
  int ans = 0 ;
  cin >> N >> M ;
  vector<int> A(M) ;
  vector<int> p(M) ;
  vector<bool> sw(M) ;
  vector<bool> li(N) ;
  int k , s ;
  rep(i,M){
    cin >> k ;
    rep(j,k){
      cin >> s ;
      (A(i)).push_back(s) ;
    }
  }
  rep(i,M) cin >> p[i] ;
  for(int i = 0 ; i <(1<<N) ; i++ ){
	rep(j,M){
      if( i & (1<<j) ) sw[j] = true ;
      else sw[j] = false ;
    }
    rep(l,N){
      for(auto k : A[l]) if( sw[k] ) sum++ ;
      if( p[l] == sum%2 ) li[l] = true ;
    }
    int test = 1 ;
    rep(l,N) if(li[l] == false )test = 0 ;
    if(test)ans++ ;
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:9: error: no match for call to '(std::vector<int>) (int&)'
   19 |       (A(i)).push_back(s) ;
      |        ~^~~
a.cc:29:23: error: 'begin' was not declared in this scope
   29 |       for(auto k : A[l]) if( sw[k] ) sum++ ;
      |                       ^
a.cc:29:23: note: suggested alternatives:
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:166,
                 from a.cc:1:
/usr/include/c++/14/valarray:1238:5: note:   'std::begin'
 1238 |     begin(const valarray<_Tp>& __va) noexcept
      |     ^~~~~
In file included from /usr/include/c++/14/filesystem:53,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:200:
/usr/include/c++/14/bits/fs_dir.h:608:3: note:   'std::filesystem::__cxx11::begin'
  608 |   begin(recursive_directory_iterator __iter) noexcept
      |   ^~~~~
a.cc:29:23: error: 'end' was not declared in this scope
   29 |       for(auto k : A[l]) if( sw[k] ) sum++ ;
      |                       ^
a.cc:29:23: note: suggested alternatives:
/usr/include/c++/14/valarray:1265:5: note:   'std::end'
 1265 |     end(const valarray<_Tp>& __va) noexcept
      |     ^~~
/usr/include/c++/14/bits/fs_dir.h:613:3: note:   'std::filesystem::__cxx11::end'
  613 |   end(recursive_directory_iterator) noexcept
      |   ^~~
a.cc:29:38: error: 'sum' was not declared in this scope
   29 |       for(auto k : A[l]) if( sw[k] ) sum++ ;
      |                                      ^~~
a.cc:30:19: error: 'sum' was not declared in this scope
   30 |       if( p[l] == sum%2 ) li[l] = true ;
      |                   ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int N,M,A=0;
  cin>>N>>M;
  vector<int>k(M),p(M);
  vector<vector<int>>s(M,vector<int>(N));
  for(int i=0;i<M;i++){
    cin>>k.at(i);
    for(int j=0;j<k.at(i);j++)cin>>s.at(i).at(j);
  }
  for(int i=0;i<M;i++)cin>>p.at(i);
  for(int i=0;i<(1<<10);i++){
    bitset<10>x(i)
    if(x.test(N))break;
    int T=0;
    for(int j=0;j<M;j++){
      int S=0;
      for(int a=0;a<k.at(j);a++)if(x.test(s.at(j).at(a)-1))S++;
      if(S%2==p.at(j))T++;
    }
    if(T==M)A++;
  }
  cout<<A<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:5: error: expected ',' or ';' before 'if'
   15 |     if(x.test(N))break;
      |     ^~
Language: C++

// ------------------
// author: MatsuTaku
// date  : 22/02/2020
// ------------------

#include <bits/stdc++.h>
#include <x86intrin.h>

using namespace std;
using ll = long long;

int main() {
  cin.tie(nullptr); ios::sync_with_stdio(false);

  int N,M; cin>>N>>M;
  vector<unsigned int> l_mask(M, 0);
  for (int i = 0; i < M; i++) {
    int k; cin>>k;
    for (int j = 0; j < k; j++) {
      int s; cin>>s;
      l_mask[i] |= 1<<(s-1);
    }
  }
  vector<int> p(M);
  for (int i = 0; i < M; i++) {
    cin>>p[i];
  }

  int ans = 0;
  for (int s = 0; s < (1<<N); s++) {
    bool ok = true;
    for (int i = 0; i < M; i++) {
      if (_mm_popcnt_u32((unsigned int)s&l_mask[i])%2 != p[i]) {
        ok = false;
        break;
      }
    }
    if (ok)
      ans++;
  }
  cout << ans << endl;

  return 0;
}


Compiler output:
In file included from /usr/lib/gcc/x86_64-linux-gnu/14/include/x86gprintrin.h:73,
                 from /usr/lib/gcc/x86_64-linux-gnu/14/include/x86intrin.h:27,
                 from a.cc:7:
/usr/lib/gcc/x86_64-linux-gnu/14/include/popcntintrin.h: In function 'int main()':
/usr/lib/gcc/x86_64-linux-gnu/14/include/popcntintrin.h:35:1: error: inlining failed in call to 'always_inline' 'int _mm_popcnt_u32(unsigned int)': target specific option mismatch
   35 | _mm_popcnt_u32 (unsigned int __X)
      | ^~~~~~~~~~~~~~
a.cc:33:25: note: called from here
   33 |       if (_mm_popcnt_u32((unsigned int)s&l_mask[i])%2 != p[i]) {
      |           ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

// ------------------
// author: MatsuTaku
// date  : 22/02/2020
// ------------------

#include <bits/stdc++.h>
#include <x86intrin.h>

using namespace std;
using ll = long long;

int main() {
  cin.tie(nullptr); ios::sync_with_stdio(false);

  int N,M; cin>>N>>M;
  vector<unsigned int> l_mask(M);
  for (int i = 0; i < M; i++) {
    int k; cin>>k;
    unsigned int mask = 0;
    for (int j = 0; j < k; j++) {
      int s; cin>>s;
      mask |= 1<<(s-1);
    }
  }
  vector<int> p;
  for (int i = 0; i < M; i++) {
    cin>>p[i];
  }

  int ans = 0;
  for (int s = 0; s < (1<<N); s++) {
    bool ok = true;
    for (int i = 0; i < M; i++) {
      if (_mm_popcnt_u32((unsigned int)s&l_mask[i])%2 != p[i]) {
        ok = false;
        break;
      }
    }
    if (ok)
      ans++;
  }
  cout << ans << endl;

  return 0;
}


Compiler output:
In file included from /usr/lib/gcc/x86_64-linux-gnu/14/include/x86gprintrin.h:73,
                 from /usr/lib/gcc/x86_64-linux-gnu/14/include/x86intrin.h:27,
                 from a.cc:7:
/usr/lib/gcc/x86_64-linux-gnu/14/include/popcntintrin.h: In function 'int main()':
/usr/lib/gcc/x86_64-linux-gnu/14/include/popcntintrin.h:35:1: error: inlining failed in call to 'always_inline' 'int _mm_popcnt_u32(unsigned int)': target specific option mismatch
   35 | _mm_popcnt_u32 (unsigned int __X)
      | ^~~~~~~~~~~~~~
a.cc:34:25: note: called from here
   34 |       if (_mm_popcnt_u32((unsigned int)s&l_mask[i])%2 != p[i]) {
      |           ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i,n) for(int i=0;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define rep2(i,n) for(int i=0;i<=n;i++)
#define repr(i,a,n) for(int i=a;i<n;i++)
#define all(a) a.begin(),a.end()
#define P pair<long long,long long>
#define double long double
#define vector2(a,b,c) vector<vector<int>> a(b/*縦！w*/,vector<int>(c/*横！w*/))
#define INF 1e10
#define MOD 1e9+7
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
using Graph = vector<vector<int>>;
signed main(){
  int a,b;
  cin>>a>>b;
  vector<int> c(b),e(b);
  int d[20][20];
  rep(i,b){
  cin>>c[i];
    rep(j,c[i])
      cin>>d[i][j];
  }
  rep(i,b)
    cin>>e[i];
  int ans=0;
  rep(i,(1<<a)){
  bitset<10> bit(a);
  vector<bool> t(p,0);
    rep(j,b){
    int p=0;
      rep(k,c[j]){
      if(bit[d[j][k]-1])
        p++;
        }
      if(p%2==e[j])
        t[j]==1;
    }
    bool cnt=1;
    rep(j,b){
      if(!t[j])
        cnt=0;
        }
    if(cnt)
      ans++;
  }
  cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:18: error: 'p' was not declared in this scope
   32 |   vector<bool> t(p,0);
      |                  ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i,n) for(int i=0;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define rep2(i,n) for(int i=0;i<=n;i++)
#define repr(i,a,n) for(int i=a;i<n;i++)
#define all(a) a.begin(),a.end()
#define P pair<long long,long long>
#define double long double
#define vector2(a,b,c) vector<vector<int>> a(b/*縦！w*/,vector<int>(c/*横！w*/))
#define INF 1e10
#define MOD 1e9+7
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
using Graph = vector<vector<int>>;
signed main(){
  int a,b;
  cin>>a>>b;
  vector<int> c(b),e(b);
  int d[20][20];
  rep(i,b){
  cin>>c[i];
    rep(j,c[i])
      cin>>d[i][j];
  }
  rep(i,b)
    cin>>e[i];
  int ans=0;
  rep(i,(1<<a)){
  bitset<10> bit(a);
  bitset<b> t(0);
    rep(j,b){
    int p=0;
      rep(k,c[j]){
      if(bit[d[j][k]-1])
        p++;
        }
      if(p%2==e[j])
        t.set(j);
    }
    if(bit.all())
    ans++;
  }
  cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:11: error: the value of 'b' is not usable in a constant expression
   32 |   bitset<b> t(0);
      |           ^
a.cc:18:9: note: 'long long int b' is not const
   18 |   int a,b;
      |         ^
a.cc:32:11: note: in template argument for type 'long unsigned int'
   32 |   bitset<b> t(0);
      |           ^
a.cc:40:11: error: request for member 'set' in 't', which is of non-class type 'int'
   40 |         t.set(j);
      |           ^~~
a.cc:8:17: error: expected unqualified-id before '.' token
    8 | #define all(a) a.begin(),a.end()
      |                 ^
a.cc:42:12: note: in expansion of macro 'all'
   42 |     if(bit.all())
      |            ^~~
a.cc:8:27: error: expected primary-expression before '.' token
    8 | #define all(a) a.begin(),a.end()
      |                           ^
a.cc:42:12: note: in expansion of macro 'all'
   42 |     if(bit.all())
      |            ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i,n) for(int i=0;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define rep2(i,n) for(int i=0;i<=n;i++)
#define repr(i,a,n) for(int i=a;i<n;i++)
#define all(a) a.begin(),a.end()
#define P pair<long long,long long>
#define double long double
#define vector2(a,b,c) vector<vector<int>> a(b/*縦！w*/,vector<int>(c/*横！w*/))
#define INF 1e10
#define MOD 1e9+7
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
using Graph = vector<vector<int>>;
signed main(){
  int a,b;
  cin>>a>>b;
  vector<int> c(b),e(b);
  int d[20][20];
  rep(i,b){
  cin>>c[i];
    rep(j,c[i])
      cin>>d[i][j];
  }
  rep(i,b)
    cin>>e[i];
  rep(i,(1<<a)){
  bitset<10> bit(a);
  bitset<b> t(0);
    rep(j,b){
    rep(k,c[j])
      
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:31:11: error: the value of 'b' is not usable in a constant expression
   31 |   bitset<b> t(0);
      |           ^
a.cc:18:9: note: 'long long int b' is not const
   18 |   int a,b;
      |         ^
a.cc:31:11: note: in template argument for type 'long unsigned int'
   31 |   bitset<b> t(0);
      |           ^
a.cc:35:5: error: expected primary-expression before '}' token
   35 |     }
      |     ^
Language: C

/*
	submission # - User: herp_sy
	https://atcoder.jp/contests/

	coding: utf-8
	lang: C (GCC 5.4.1)
*/

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <stdbool.h>

#define _CRT_SECURE_NO_WARNINGS
#define TLong long long
#define TBMod 1000000007

int main(int argc, char const *argv[])
{
	int n, m;
	int num[10][10];
	int k;
	int p[10];

	scanf("%d %d", &n, &m);
	
	// input & setup
	for (int i = 0; i < 10; ++i){
		for (int j = 0; j < 10; ++j)	num[i][j] = 0;
	}
	for (int i = 0; i < m; ++i){
		scanf("%d", &k);
		for (int j = 0; j < k; ++j){
			int c;
			scanf("%d", &c);
			num[i][c - 1] = 1;
		}
	}
	for (int i = 0; i < m; ++i) scanf("%d", &p[i]);
	
	// countup
	int ans = 0;
	for (int i = 0; i < (1 << n); ++i) {
		int chkflag = 1;
		for (int j = 0; j < m; ++j) {
			int bitbitcnt = 0;
			for (int l = 0; l < n; ++l) {
				if(num[j][l] & i >> l) bitcnt += 1;
			}
			if(bitcnt % 2 != p[j]) chkflag = 0;
		}
		if(chkflag) ans += 1;
	}
	printf("%d\n", ans);
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:49:56: error: 'bitcnt' undeclared (first use in this function); did you mean 'bitbitcnt'?
   49 |                                 if(num[j][l] & i >> l) bitcnt += 1;
      |                                                        ^~~~~~
      |                                                        bitbitcnt
main.c:49:56: note: each undeclared identifier is reported only once for each function it appears in