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

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0;i < (int)(n);i++)
#define rep2(i, s, n) for (int i = s; i < (int)(n);i++)
#define ALL(vec)  (vec).begin(),(vec).end()
#define lli long long int
#define pi 3.1415926535897932384626433832795
#define MAX_INF 9223372036854775807
#define MIN_INF 9223372036854775807+1

int main() 
{
  int N,M;
  cin >> N >> M;
  int m[M][11];
  rep(i,m){
    rep(j,11)
    m[i][j]=2;
  }
  rep(i, M){
    int k;
    cin >>k;
    rep(j, k){
    cin >> m[i][j];
    }
    rep(i, m)
      cin >> m[i][10];
  }
  int ans=0;
  int jud=0;
  int light[10];
  rep(a,2){
    light[0]=a;
    rep(b,2){
    light[1]=b;
    rep(c,2){
    light[2]=c;
    rep(d,2){
    light[3]=d;
    rep(e,2){
    light[4]=e;
    rep(f,2){
    light[5]=f;
    rep(g,2){
    light[6]=g;
    rep(h,2){
    light[7]=h;
    rep(i,2){
    light[8]=i;
    rep(j,2){
    light[9]=j;
      rep(p, M){
        jud=0;
        rep(q, 10){
        jud+=m[p][q];
         if(jud%2==m[p][10])
           ans++;
        }
      }
  }}}}}}}}}}
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:38: error: cast from 'int (*)[11]' to 'int' loses precision [-fpermissive]
    3 | #define rep(i, n) for (int i = 0;i < (int)(n);i++)
      |                                      ^~~~~~~~
a.cc:16:3: note: in expansion of macro 'rep'
   16 |   rep(i,m){
      |   ^~~
a.cc:3:38: error: cast from 'int (*)[11]' to 'int' loses precision [-fpermissive]
    3 | #define rep(i, n) for (int i = 0;i < (int)(n);i++)
      |                                      ^~~~~~~~
a.cc:26:5: note: in expansion of macro 'rep'
   26 |     rep(i, m)
      |     ^~~
Language: C++

#include<bits/stdc++.h>
#define rep(i,n)for(int i=0;i<n;++i)
#include<string>
using namespace std;
typedef long long ll;
typedef pair<int, int>P;
//max=({});
//条件式が真ならwhileの中身を回し続ける

int g[15][15];
bool flag[1050000];
const int INF = 1001001001;
const int di[] = { -1,0,1,0 };
const int dj[] = { 0,-1,0,1 };

int main() {
	int n, m;
	cin >> n >> m;
	vector<int>a(n);
	int ans = 0;
	rep(i, m) {
		int k;
		cin >> k;
		rep(j, k) {
			int s;
			cin >> s;
			s--;
			a[s] |= 1 << i;
		}
		for (int s = 0;s < (1 << n);s++) {
			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:37:34: error: 'p' was not declared in this scope
   37 |                         if (t == p)ans++;
      |                                  ^
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <cstdio>
#include<string.h>
const int N=110;
using namespace std;
int n,m,ans;
vector<int>a[N];
int p[N]vis[N];

void dfs(int x){
	int q[N];
    if(x==n+1){
        memset(q,0,sizeof(q));
        for(int i=1;i<=n;i++){
            if(vis[i]==0) continue;
            for(int j=1;j<a[i].size();j++){
                int k=a[i][j];
                q[k]++;
            }
        }
        for(int i=1;i<=m;i++) if(q[i]%2!=p[i]) return;
        ans++;
        return;
    }
    dfs(x+1);vis[x]=1;
    dfs(x+1);vis[x]=0;
}
int main(){
    int n,m;cin>>n>>m;
    for(int i=1;i<=m;i++){
        int k;cin>>k;
        for(int j=1;j<=k;j++){
            int k;cin>>k;
            a[k].push_back(i);
        }
    }
    for(int i=1;i<=m;i++) cin>>p[i];
    dfs(1);
    cout<<ans;
    return 0;
}


Compiler output:
a.cc:10:9: error: expected initializer before 'vis'
   10 | int p[N]vis[N];
      |         ^~~
a.cc: In function 'void dfs(int)':
a.cc:17:16: error: 'vis' was not declared in this scope
   17 |             if(vis[i]==0) continue;
      |                ^~~
a.cc:23:42: error: 'p' was not declared in this scope
   23 |         for(int i=1;i<=m;i++) if(q[i]%2!=p[i]) return;
      |                                          ^
a.cc:27:14: error: 'vis' was not declared in this scope
   27 |     dfs(x+1);vis[x]=1;
      |              ^~~
a.cc: In function 'int main()':
a.cc:39:32: error: 'p' was not declared in this scope
   39 |     for(int i=1;i<=m;i++) cin>>p[i];
      |                                ^
Language: C++

#include<iostream>
#include<cstdio>
#include<string.h>
#include<algorithm>
#include<vector>
#define N 55
using namespace std;

int n,m;
int ans;
vector<int> s[N];
int p[N],temp[N];
bool vis[N];

void dfs(int x)
{
    if(x==n+1)
    {
        memset(temp,0,sizeof(temp));
        for(int i=1;i<=n;i++)
        {
            if(!vis[i]) continue;
            for(int j=0;j<s[i].size();j++)
            {
                int b=s[i][j];
                temp[b]++;
            }
        }
        for(int i=1;i<=m;i++) if(temp[i]%2!=p[i]) return ;
        ans++;
        return ;
    }
    dfs(x+1);
    vis[x]=true;
    dfs(x+1);
    vis[x]=false;
}

int main(){
	scanf("%d%d",&n,&m);
    for(int i=1;i<=m;i++)
    {
        int k;
        scanf("%d",&k);
        for(int j=0;j<k;j++)
        {
            int t;
            scanf("%d",&t);
            sw[t].push_back(i);
        }
    }
    for(int i=1;i<=m;i++) scanf("%d",&p[i]);
    dfs(1);
    printf("%d\n",ans);
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:49:13: error: 'sw' was not declared in this scope; did you mean 's'?
   49 |             sw[t].push_back(i);
      |             ^~
      |             s
Language: Java

import java.util.*; 

class Main{
public static void main(String[] args){
	Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int m=sc.nextInt();
  		int[][] s=new int[m][n];
  		int k=0;
  		for(int c=0;c<m;c++){
          k=sc.nextInt();
          for(int d=0;d<k;d++){
    		s[c][d]=sc.nextInt();
          }
    	}

  		int[] p=new int[m];
		for(int c=0;c<m;c++){
    		p[c]=sc.nextInt();
    	}
  		int ans=0;
    	for(int i=0;i<(1<<n);i++){
        	for(){
            }
        }
 	

    	System.out.println(ans);
    }
}

Compiler output:
Main.java:23: error: illegal start of expression
        	for(){
        	    ^
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define repr(i, n) for (int i = (int)(n); i >= 0; i--)
#define REP(i, m, n) for (int i = (int)(m); i < (int)(n); i++)
#define INF 1e9
#define all(v) v.begin(), v.end()
typedef long long ll;

int main(){
  int n, m;
  cin >> n >> m;
  vector<vector<int> > s(m, vector<int>());
  rep(i, m){
    int k;
    cin >> k;
    rep(j, k) cin >> s.at(i).at(j);
  }
  vector<int> p(m);
  rep(i, m) cin >> p.at(i);

  int ans = 0;
  rep(tmp, 1<<n){
    bitset<n> bs(tmp);
    rep(i, m){
      int cnt = 0;
      for(int x : s.at(i)){
        if(bs.test(x-1)) cnt++;
      }
      if(cnt%2 != p.at(i)) break;
      if(i == m-1) ans++;
    }
  }

  cout << ans << endl;

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:13: error: the value of 'n' is not usable in a constant expression
   24 |     bitset<n> bs(tmp);
      |             ^
a.cc:11:7: note: 'int n' is not const
   11 |   int n, m;
      |       ^
a.cc:24:13: note: in template argument for type 'long unsigned int'
   24 |     bitset<n> bs(tmp);
      |             ^
a.cc:28:15: error: request for member 'test' in 'bs', which is of non-class type 'int'
   28 |         if(bs.test(x-1)) cnt++;
      |               ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define repr(i, n) for (int i = (int)(n); i >= 0; i--)
#define REP(i, m, n) for (int i = (int)(m); i < (int)(n); i++)
#define INF 1e9
#define all(v) v.begin(), v.end()
typedef long long ll;

int main(){
  int n, m;
  vector<vector<int> > s(m, vector<int>());
  rep(i, m){
    int k;
    cin >> k;
    rep(j, k) cin >> s.at(i).at(j);
  }
  vector<int> p(m);
  rep(i, m) cin >> p.at(i);

  int ans = 0;
  rep(tmp, 1<<n){
    bitset<n> bs(tmp);
    rep(i, m){
      int cnt = 0;
      for(int x : s.at(i)){
        if(bs.test(x-1)) cnt++;
      }
      if(cnt%2 != p.at(i)) break;
      if(i == m-1) ans++;
    }
  }

  cout << ans << endl;

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:13: error: the value of 'n' is not usable in a constant expression
   23 |     bitset<n> bs(tmp);
      |             ^
a.cc:11:7: note: 'int n' is not const
   11 |   int n, m;
      |       ^
a.cc:23:13: note: in template argument for type 'long unsigned int'
   23 |     bitset<n> bs(tmp);
      |             ^
a.cc:27:15: error: request for member 'test' in 'bs', which is of non-class type 'int'
   27 |         if(bs.test(x-1)) cnt++;
      |               ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define repr(i, n) for (int i = (int)(n); i >= 0; i--)
#define REP(i, m, n) for (int i = (int)(m); i < (int)(n); i++)
#define INF 1e9
#define all(v) v.begin(), v.end()
typedef long long ll;

int main(){
  int n, m;
  vector<vector<int> > s(m, vector<int>);
  rep(i, m){
    int k;
    cin >> k;
    rep(j, k) cin >> s.at(i).at(j);
  }
  vector<int> p(m);
  rep(i, m) cin >> p.at(i);

  int ans = 0;
  rep(tmp, 1<<10){
    bitset<10> s(tmp);
    rep(i, m){
      int cnt = 0;
      for(int x : s.at(i)){
        if(s.test(x-1)) cnt++;
      }
      if(cnt%2 != p.at(i)) break;
      if(i == m-1) ans++;
    }
  }

  cout << ans << endl;

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:40: error: expected primary-expression before ')' token
   12 |   vector<vector<int> > s(m, vector<int>);
      |                                        ^
a.cc:26:21: error: 'class std::bitset<10>' has no member named 'at'
   26 |       for(int x : s.at(i)){
      |                     ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define _GLIBCXX_DEBUG
#define all(v) v.begin(), v.end()
using in = int64_t;
#define rep(i, n) for (in i = 0; i < (in)(n); i++)
const double PI=3.14159265358979323846;
const int64_t waru = 1000000007;
const in INF=1<<30;
#define vec2(a,y,x) vector<vector<int>> a(y,vector<int>(x))
#define vec(a,n) vector<int> a(n);rep(i,n)cin>>a[i]

int main(){
  int n,m;
  cin>>n>>m;
  int x;
  vector<int> k(m);
  vec2(s,m,0);
  rep(i,m){
    cin>>k[i];
    rep(j,k[i]){
      cin>>x;
       s[i].push_back(x-1);
    }
  }
  vec(p,m);
  const int num=n;
  int cnt=0;
  int ans=0;
  bool flag=false;
  
  for (int tmp = 0; tmp < (1 << 3); tmp++) {
     bitset<num> a(11);
    rep(i,m){
       rep(j,k[i]){
          if(a.test(s[i][j])) cnt ++;
       }
      if(cnt%2!=p[i]){flag=true;break;}
    }
    if(flag) continue;
    ans ++;
  }
  rep(i,11-m) ans/=2;
  cout<<ans;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:33:16: error: the value of 'num' is not usable in a constant expression
   33 |      bitset<num> a(11);
      |                ^
a.cc:27:13: note: 'num' was not initialized with a constant expression
   27 |   const int num=n;
      |             ^~~
a.cc:33:16: note: in template argument for type 'long unsigned int'
   33 |      bitset<num> a(11);
      |                ^
a.cc:36:16: error: request for member 'test' in 'a', which is of non-class type 'int'
   36 |           if(a.test(s[i][j])) cnt ++;
      |                ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define _GLIBCXX_DEBUG
#define all(v) v.begin(), v.end()
using in = int64_t;
#define rep(i, n) for (in i = 0; i < (in)(n); i++)
const double PI=3.14159265358979323846;
const int64_t waru = 1000000007;
const in INF=1<<30;
#define vec2(a,y,x) vector<vector<int>> a(y,vector<int>(x))
#define vec(a,n) vector<int> a(n);rep(i,n)cin>>a[i]

int main(){
  int n,m;
  cin>>n>>m;
  int x;
  vector<int> k(m);
  vec2(s,m,0);
  rep(i,m){
    cin>>k[i];
    rep(j,k[i]){
      cin>>x;
       s[i].push_back(x-1);
    }
  }
  vec(p,m);
  const int num=n;
  int cnt=0;
  int ans=0;
  bool flag=false;
  
  for (int tmp = 0; tmp < (1 << 3); tmp++) {
     bitset<num> a(tmp);
    rep(i,m){
       rep(j,k[i]){
          if(a.test(s[i][j])) cnt ++;
       }
      if(cnt%2!=p[i]){flag=true;break;}
    }
    if(flag) continue;
    ans ++;
  }
  cout<<ans;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:33:16: error: the value of 'num' is not usable in a constant expression
   33 |      bitset<num> a(tmp);
      |                ^
a.cc:27:13: note: 'num' was not initialized with a constant expression
   27 |   const int num=n;
      |             ^~~
a.cc:33:16: note: in template argument for type 'long unsigned int'
   33 |      bitset<num> a(tmp);
      |                ^
a.cc:36:16: error: request for member 'test' in 'a', which is of non-class type 'int'
   36 |           if(a.test(s[i][j])) cnt ++;
      |                ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define _GLIBCXX_DEBUG
#define all(v) v.begin(), v.end()
using in = int64_t;
#define rep(i, n) for (in i = 0; i < (in)(n); i++)
const double PI=3.14159265358979323846;
const int64_t waru = 1000000007;
const in INF=1<<30;
#define vec2(a,y,x) vector<vector<int>> a(y,vector<int>(x))
#define vec(a,n) vector<int> a(n);rep(i,n)cin>>a[i]

int main(){
  int n,m;
  cin>>n>>m;
  int x;
  vector<int> k(m);
  vec2(s,m,0);
  rep(i,m){
    cin>>k[i];
    rep(j,k[i]){
      cin>>x;
       s[i].push_back(x-1);
    }
  }
  vec(p,m);
  const num=n;
  int cnt=0;
  int ans=0;
  bool flag=false;
  
  for (int tmp = 0; tmp < (1 << 3); tmp++) {
     bitset<n> a(tmp);
    rep(i,m){
       rep(j,k[i]){
          if(a.test(s[i][j])) cnt ++;
       }
      if(cnt%2!=p[i]){flag=true;break;}
    }
    if(flag) continue;
    ans ++;
  }
  cout<<ans;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:9: error: 'num' does not name a type; did you mean 'enum'?
   27 |   const num=n;
      |         ^~~
      |         enum
a.cc:33:14: error: the value of 'n' is not usable in a constant expression
   33 |      bitset<n> a(tmp);
      |              ^
a.cc:14:7: note: 'int n' is not const
   14 |   int n,m;
      |       ^
a.cc:33:14: note: in template argument for type 'long unsigned int'
   33 |      bitset<n> a(tmp);
      |              ^
a.cc:36:16: error: request for member 'test' in 'a', which is of non-class type 'int'
   36 |           if(a.test(s[i][j])) cnt ++;
      |                ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int n,m,cnt = 0, k[11],p[11],s[11][11],sw[11];
int target;
void dfs(int num, int now){
    if(num > n){
        if(now == target) cnt++;
        return ;
    }
    for(int i = 0; i <= 1; i++) {
        dfs(num + 1, now ^ (i * sw[num]));
    }
}
int main(){
    cin >> n >> m;
    for(int i = 1; i <= m; i++){
        cin >> k[i];
        for(int j = 0; j < k[i]; j++){
            cin >> s[i][j];
            sw[s[i][j]] |= 1 << i;
        }
    }
    for(int i = 1; i <= m; i++) {
        cin >> p[i];
        target |= p[i] << i;
    } 
    dfs(1);
    cout << cnt << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:8: error: too few arguments to function 'void dfs(int, int)'
   27 |     dfs(1);
      |     ~~~^~~
a.cc:5:6: note: declared here
    5 | void dfs(int num, int now){
      |      ^~~
Language: C++

#include<bits/stdc++.h>
#include <iostream>
#include <string>
#include <cmath>
using namespace std;
#define ll long long
#define rep(i, n) for (ll i = 0; i < (n); i++)
#define FOR(i,a,b) for(ll i=(a);i<(b);i++)
#define FORR(i,a,b)for(ll i=(a);i<=(b);i++)
#define repR(i,n) for(ll i=n;i>=0;i--)
#define all(v)(v).begin(),(v).end()
#define rall(v)(v).rbegin(),(v).rend()
#define F first
#define S second
#define pb push_back
#define pu push
#define COUT(x) cout<<(x)<<endl
#define PQ priority_queue<ll>
#define PQR priority_queue<ll,vector<ll>,greater<ll>>
#define YES(n) cout << ((n) ? "YES" : "NO"  ) << endl
#define Yes(n) cout << ((n) ? "Yes" : "No"  ) << endl
#define mp make_pair
#define maxs(x,y) (x = max(x,y))
#define mins(x,y) (x = min(x,y))
#define sz(x) (int)(x).size()
#define disup(A,key) distance(A.begin(),upper_bound(ALL(A),(int)(key)))
#define dislow(A,key) distance(A.begin(),lower_bound(ALL(A),(int)(key)))
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
const ll MOD = 1000000007LL;
const ll INF = 1LL << 60;
using vll = vector<ll>;
using vb = vector<bool>;
using vvb = vector<vb>;
using vvll = vector<vll>;
using vstr = vector<string>;
using pll = pair<ll, ll>;
int main(){
  ll n,m;
  cin>>n>>m;
  vvll s(m,vll(0));
  rep(i,m){
    int k;
    cin>>k;
    for(int g=0;g<k;g++){
      ll j;
      cin>>j;
      s[i].pb(j);
    }
  }
  ll ans=0;
  vll p(m);
  rep(i,m) cin>>p[i];
  for(int bit=0;bit<(1<<n);bit++){
    for(int i=0;i<m;i++){
      ll h=0;
      ll cu=0;
      for(int j=0;j<s[i].size();j++){
        if(bit&(1<<s[i][k]))cu++;
      }
      if(cu%2==p[i]) h++;
      else break;
      if(h==m)ans++;
    }
  }
  COUT(ans);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:59:25: error: 'k' was not declared in this scope
   59 |         if(bit&(1<<s[i][k]))cu++;
      |                         ^
Language: C++

https://www.cnblogs.com/Repulser/p/11532242.html
学习下该博主点击显示随机标签颜色的前端方法


Compiler output:
a.cc:1:6: error: found ':' in nested-name-specifier, expected '::'
    1 | https://www.cnblogs.com/Repulser/p/11532242.html
      |      ^
      |      ::
a.cc:1:1: error: 'https' does not name a type
    1 | https://www.cnblogs.com/Repulser/p/11532242.html
      | ^~~~~
Language: C++

#include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include<tuple>
#include <numeric>
#include<map>
#include<queue>
#include<math.h>
#include<iomanip>
#define rep(i, n) rep2(i,0,n)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
#define PI acos(-1);
typedef long long ll;
using namespace std;
const int MOD=1000000007;
//scanf("%d", &a); '\n';

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

Compiler output:
a.cc: In function 'int main()':
a.cc:44:2: error: expected '}' at end of input
   44 | }
      |  ^
a.cc:19:12: note: to match this '{'
   19 | int main() {
      |            ^
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[] ak = new int[m];//電球に繋がっているスイッチの個数
    int[][] sw = new int[m][n];//電球mに接続しているスイッチの情報
    int[] ju = new int[m]; //電球に繋がっているスイッチ%2が配列内の値の時点灯
    int ans = 0;//条件合致数

    for(int i=0; i<m; i++){
      ak[i] = sc.nextInt();//電球i+1に繋がっているスイッチ個数
      for(int j=0; j<ak[i]; j++){
        sw[i][j] = sc.nextInt(); //繋がるスイッチ番号入力
      }
    }

    for(int k=0; k<m;k++){
      ju[k] = sc.nextInt();//1or0を入力
    }

    for(int i=0; i< (1<<n); i++){//スイッチの全ビット探索
      int[] swon = new int[m];//電球に繋がっているonの数
      for(int j=0; j<n;j++){//jビット左論理シフト

        if((1&i>>j)==1){//スイッチj+1がonかoffか
          for(int k=0; k<m;k++){//k+1=電球番号
            for(int l=0; l<ak[k];l++){
              if(sw[k][l]==j+1){
                swon[k] = swon[k] + 1;
              }
            }
          }

        }

      }
      // for(int p=0; p<m;p++){
      //   System.out.println("*"+swon[p]);
      // }
      //全ての電球が点灯したかの判定
      boolean judge = false;
      int count=0;
      for(int p=0;p<m;p++){
        if(swon[p]%2 == ju[p]){
          count +=1;
        }
      }
      if(count==m){
        ans += 1;
      }


    }


Compiler output:
Main.java:57: error: reached end of file while parsing
    }
     ^
1 error
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define mx 100000
#define md 1000000007ll

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

    vector<int>ar[m+2];
    for(int i=1;i<=m;i++){
        int x;
        cin>>x;
        for(int j=0;j<x;j++){
            int y;
            cin>>y;
            ar[i].push_back(y);
        }
    }
    int p[m+2];
    for(int i=1;i<=m;i++)cin>>p[i];
    int res=0;
    for(int i=0;i<(1<<n);++){
        bool fl =0;
        for(int j=1;j<=m;j++){
            int cnt = 0;
            for(int k=0;k<ar[j].size();k++){
                int f =ar[j][k]-1;

                if((i&(1<<f)))cnt++;
            }
            if(cnt%2!=p[j])fl=1;

        }
        if(!fl)res++;
    }
    cout<<res<<endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:28: error: expected primary-expression before ')' token
   23 |     for(int i=0;i<(1<<n);++){
      |                            ^
Language: C++

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

void switches(int n,int swi,vector<bool> &onoff){
  // スイッチの情報(swiをnビットで表す)をonoffに入れる
  for (int i=0; i<n; i++){
    onoff.at(i) = swi % 2;
    swi /= 2;
  }
  return;
}

bool lights(int n,vector<vector<int>> &s,vector<int> &p,vector<bool> &onoff){
  bool ok = true;
  for (int i=0; i<n; i++){
    int cnt = 0;
    for (int j=0; j<s.at(i).size(); j++){
      if (onoff(s.at(i).at(j)-1)==true) cnt++;
    }
    if (cnt%2 != p.at(i)) ok = false;
  }
  return ok;
}

int solve(int n,int m,vector<vector<int>> &s,vector<int> &p){
  /* スイッチが8個あるとして00000000~11111111は0~2^8-1で表せる
   2で割ったあまり、2で割って2で割ったあまり、…が0ならoff、1なら
   onに対応させる。
  */
  int ans = 0, counts = 1;
  for (int i=0; i<n; i++){
    counts *= 2;
  }
  vector<bool> onoff(n); // n子のスイッチのonoff情報がbool
  for (int i=0; i<counts; i++){
    switches(n,i,onoff);
    if (lights(n,s,p,onoff)) ans++;
  }
  
  return ans;
}

int main() {
  int n,m; cin >>n >>m;
  vector<vector<int>> s(m);
  int k;
  for (int i=0; i<m; i++){
    int buf;
    cin >>k;
    for (int j=0; j<k; j++){
      cin >>buf;
      s.at(j).push_back(buf);
    }
  }
  vector<int> p(m);
  for (int i=0; i<m; i++) cin >>p.at(i);
  int ans = solve(n,m,s,p);
  
  cout <<ans <<endl;
}


Compiler output:
a.cc: In function 'bool lights(int, std::vector<std::vector<int> >&, std::vector<int>&, std::vector<bool>&)':
a.cc:19:16: error: no match for call to '(std::vector<bool>) (__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type)'
   19 |       if (onoff(s.at(i).at(j)-1)==true) cnt++;
      |           ~~~~~^~~~~~~~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
const long long INF = 9999999999999999;
using ll = long long;

int binary(int bina){
    int ans = 0;
    for (int i = 0; bina>0 ; i++)
    {
        ans = ans+(bina%2)*pow(10,i);
        bina = bina/2;
    }
    return ans;
}



int main(){
  int N,M;
  cin>>N>>M;
  int a[N+1][N+1];
  for(int i = 0;i<M;i++){
    int p;
    cin>>p;
    for(int i = 0;i<p;i++){
      cin>>a[i][p];
    }
  }
  int tn[M];
  for(int i = 0;i<M;i++){
    cin>>tn[i];
  }
  int ans = 0;
  for(int i = 1;i<pow(2,N+1);i++){
    string s = to_string(binary(i));
    

Compiler output:
a.cc: In function 'int main()':
a.cc:36:37: error: expected '}' at end of input
   36 |     string s = to_string(binary(i));
      |                                     ^
a.cc:35:34: note: to match this '{'
   35 |   for(int i = 1;i<pow(2,N+1);i++){
      |                                  ^
a.cc:36:37: error: expected '}' at end of input
   36 |     string s = to_string(binary(i));
      |                                     ^
a.cc:19:11: note: to match this '{'
   19 | int main(){
      |           ^
Language: C++

#include<bits/stdc++.h>

using namespace std;
 

/****************************************\
| Thank you for viewing my code:)        |
| Written by RedSpica a.k.a. RanseMirage |
| Twitter:@asakaakasaka                  | 
\****************************************/
 

signed main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout<<setprecision(20)<<fixed;
  Solve();
}

void Solve(){
  int n,m;
    scanf("%d%d",&n,&m);
  vector<vector<int>> A(m,vector<int>(10));

  for(int i=0;i<m;++i){
    int k;
      scanf("%d",&k);
    for(int j=0;j<k;++j){
      int a;
        scanf("%d",&a);
      A[i][a-1]++;
    }
  }
  vector<int> p(m);
  for(int i=0;i<m;++i){
    scanf("%d",&p[i]);
  }

  int ans=0;
  for(int bit=0;bit<(1<<n);++bit){
    bool b=true;
    for(int i=0;i<m;++i){
      int s=0;
      for(int j=0;j<10;++j){
        if(bit &(1<<j)){
          s+=A[i][j];
        }
      }
      if(s%2!=p[i]){
        b=false;
      }
    }
    if(b){
      ++ans;
    }
  }
  printf("%d\n",ans);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:3: error: 'Solve' was not declared in this scope
   17 |   Solve();
      |   ^~~~~
Language: C++

#include<bits/stdc++.h>

using namespace std;
 

/****************************************\
| Thank you for viewing my code:)        |
| Written by RedSpica a.k.a. RanseMirage |
| Twitter:@asakaakasaka                  | 
\****************************************/
 

signed main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout<<setprecision(20)<<fixed;
  Solve;
}

void Solve(){
  int n,m;
    scanf("%d%d",&n,&m);
  vector<vector<int>> A(m,vector<int>(10));

  for(int i=0;i<m;++i){
    int k;
      scanf("%d",&k);
    for(int j=0;j<k;++j){
      int a;
        scanf("%d",&a);
      A[i][a-1]++;
    }
  }
  vector<int> p(m);
  for(int i=0;i<m;++i){
    scanf("%d",&p[i]);
  }

  int ans=0;
  for(int bit=0;bit<(1<<n);++bit){
    bool b=true;
    for(int i=0;i<m;++i){
      int s=0;
      for(int j=0;j<10;++j){
        if(bit &(1<<j)){
          s+=A[i][j];
        }
      }
      if(s%2!=p[i]){
        b=false;
      }
    }
    if(b){
      ++ans;
    }
  }
  printf("%d\n",ans);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:3: error: 'Solve' was not declared in this scope
   17 |   Solve;
      |   ^~~~~
Language: C++

#include<bits/stdc++.h>

int n, m, cnt=0;
int k[12], p[12], s[12][12], ison[12];


void solve(int num){
  if(num <= n){
    ison[num] = 1;
    solve(num+1);
    ison[num] = 0;
    solve(num+1);
  }else{
    for(int i=0;i<m;++i){
      int oncnt = 0;
      for(int j=0;j<k[i];++j){
        if(ison[s[i][j]]) ++oncnt;
      }
      if(oncnt%2!=p[i]) return;
    }
  }
  ++cnt;
}

int main(void){
  cin >> n >> m;
  for(int i=0;i<m;++i){
    cin >> k[i];
    for(int j=0;j<k[i];++j){
      cin >> s[i][j];
    }
  }
  for(int i=0;i<m;++i){
    cin >> p[i];
  }
  for(int i=0;i<=n;++i) ison[i] = 0;
  solve(1);
  cout << cnt << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   26 |   cin >> n >> m;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:38:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   38 |   cout << cnt << endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:38:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   38 |   cout << cnt << endl;
      |                  ^~~~
      |                  std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include<bits/stdc++.h>

int n, m, cnt=0;
int k[12], p[12], s[12][12], ison[12];


void solve(int num){
  if(num <= n){
    ison[num] = 1;
    solve(num+1);
    ison[num] = 0;
    solve(num+1);
  }else{
    for(int i=0;i<m;++i){
      int oncnt = 0;
      for(int j=0;j<k[i];++j){
        if(ison[s[i][j]]) ++oncnt;
      }
      if(oncnt%2!=p[i]) return;
  }
  ++cnt;
}

int main(void){
  cin >> n >> m;
  for(int i=0;i<m;++i){
    cin >> k[i];
    for(int j=0;j<k[i];++j){
      cin >> s[i][j];
    }
  }
  for(int i=0;i<m;++i){
    cin >> p[i];
  }
  for(int i=0;i<=n;++i) ison[i] = 0;
  solve(1);
  cout << cnt << endl;
}

Compiler output:
a.cc: In function 'void solve(int)':
a.cc:24:15: error: a function-definition is not allowed here before '{' token
   24 | int main(void){
      |               ^
a.cc:38:2: error: expected '}' at end of input
   38 | }
      |  ^
a.cc:7:20: note: to match this '{'
    7 | void solve(int num){
      |                    ^
Language: C++

#include<bits/stdc++.h>
#include <iostream>
#include <string.h>
#include <vector>
#include <algorithm>
using namespace std;

int main(){
  int a,b,s;
  cin >>a >>b;
  s =0;
  int c[15],d[15][15],t,p[15];
  for(int i=0;i<b;i++){
    for(int j=0;j<a;j++) d[i][j]==0;
  }
  for(int i=0;i<b;i++){
    cin >>c[i];
    for(int j=0;j<c[i];j++){
      cin >>t;
      d[i][t-1]=1;
    }
  }
  for(int i=0;i<b;i++)
    cin >>p[i];
 
  for (int bit = 0; bit < (1<<a); bit++){
     
     int sum=0;
     for(int j=0;j<b;j++){
         int ans=0;
         for (int i = 0; i < a; ++i) {
             if (bit & (1<<i)) {
                 if(d[j][i]==1)ans++;
             }
         }
         if(ans%2==p[j])sum++;
      }
    if (sum==m)s++;
   }
  
   cout << s << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:38:14: error: 'm' was not declared in this scope
   38 |     if (sum==m)s++;
      |              ^
Language: Java

import java.util.Scanner;

public class ABC128C {

	public static void main(String[] args) {
		Scanner sc =new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();
		int[] k = new int[M];
		int[][] s = new int[M][N];
		int[] p = new int[M];
		for(int i = 0;i < M;i++) {
			k[i] = sc.nextInt();
			for(int j = 0;j < k[i];j++) {
				s[i][j] = sc.nextInt();
			}
		}
		for(int i = 0;i < M;i++) {
			p[i] = sc.nextInt();
		}
		sc.close();

		int ans = 0;
		for(int i = 0;i < 1 << N;i++) {
			int[] swi = new int[N];
			boolean bool = true;
			for(int j = 0;j < N;j++) {
				if((1 & i >> j)==1) {
					swi[j] = 1;
				}
			}
			for(int x = 0;x < M;x++) {
				int row = 0;
				for(int y = 0;y < k[x];y++) {
					row += swi[s[x][y]-1];
				}
				if(row%2 != p[x]) {
					bool = false;
				}
			}
			if(bool) {
				ans++;
			}
		}
		System.out.println(ans);
	}
}

Compiler output:
Main.java:3: error: class ABC128C is public, should be declared in a file named ABC128C.java
public class ABC128C {
       ^
1 error
Language: Java


import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Scanner;

public class Switches {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner scn=new Scanner(System.in);
		int n=scn.nextInt();
		int m=scn.nextInt();
		int []bulbs=new int[m+1];
		int []p=new int[m+1];
		//switches[1,n] -> bulbs[1,m]
		HashMap<Integer,HashSet<Integer>> hmap=new HashMap<>();
		for(int i=1;i<=m;i++) {
			int s=scn.nextInt();
			for(int j=0;j<s;j++) {
				int a=scn.nextInt();
				if(hmap.containsKey(a)) {
					HashSet<Integer> set=hmap.get(a);
					set.add(i);
					hmap.put(a, set);
				}else {
					HashSet<Integer> set=new HashSet<Integer>();
					set.add(i);
					hmap.put(a, set);
				}
			}
		}
		for(int i=1;i<=m;i++) {
			p[i]=scn.nextInt();
		}
		int x=0,y=0;
		int []b1=bulbs.clone();
		int []b2=bulbs.clone();
		x=solve(1,n,1,b1,p,hmap);
		//System.out.println("start");

		y=solve(0,n,1,b2,p,hmap);
		System.out.println(x+y);
	}
	public static int solve(int on,int n, int switch_idx, int []bulbs,int []p,HashMap<Integer,HashSet<Integer>> hmap) {
		
		int []b1=bulbs.clone();
		int []b2=bulbs.clone();
		
		// processing
		HashSet<Integer> set=hmap.get(switch_idx);
		if(set!=null) {
			Iterator<Integer> itr=set.iterator();
			while(itr.hasNext()) {
				int x=itr.next();
				bulbs[x]=(bulbs[x]+on)%2;
				b1[x]=bulbs[x];
				b2[x]=bulbs[x];
			}
		}
		if(switch_idx==n) {
			for(int i=1;i<bulbs.length;i++) {
				//System.out.println(bulbs[i]+" "+p[i]);
				if(bulbs[i]!=p[i]) {
					return 0;
				}
			}
			//System.out.println("end");
			return 1;
		}
//		System.out.println("Before"+" "+on+" "+switch_idx);
//		for(int i=0;i<b1.length;i++) {
//			System.out.print(b1[i]+" ");
//		}
//		System.out.println("b2222");
//		for(int i=0;i<b1.length;i++) {
//			System.out.print(b2[i]+" ");
//		}
//		System.out.println();
		// calling
		int x=0,y=0;
		x=solve(1,n,switch_idx+1,b1,p,hmap);
//		System.out.println("After"+" "+on+" "+switch_idx);
//		for(int i=0;i<b1.length;i++) {
//			System.out.print(b2[i]+" ");
//		}
//		System.out.println();
		y=solve(0,n,switch_idx+1,b2,p,hmap);
		return x+y;
	}
}


Compiler output:
Main.java:7: error: class Switches is public, should be declared in a file named Switches.java
public class Switches {
       ^
1 error
Language: C++

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

int main(){
  int n,m;
  cin >> n>> m;
  vector<vector<int>> s(m);
  vector<int> k(m);
  vector<int> p(m);
  
  for(int i=0;i<m;i++){
    cin >> k[i];
    s[i].resized(k[i]);
    for(int j =0;j<k[i];j++){
      cin>>s[i][j];
    }
  }
  
  for (int i=0;i<m;i++) cin >> p[i];
  int ans =0;
  for (int bit =0;bit <(1<<n);bit++){
    for(int i=0;i<m;i++){
      int c=0;
      for (int id : s[i]){
        if (1& (id<<bit)){
          c++;
        }
      }
      c%=2;
      if (c==p[i]) ans++;
    }
  }
  
  cout << ans << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:10: error: '__gnu_cxx::__alloc_traits<std::allocator<std::vector<int> >, std::vector<int> >::value_type' {aka 'class std::vector<int>'} has no member named 'resized'; did you mean 'resize'?
   13 |     s[i].resized(k[i]);
      |          ^~~~~~~
      |          resize
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (long long i = 0; i < (long long)(n); i++)
typedef long long ll;
typedef pair<int,int> P;
using vi=vector<long long>;
using vvi=vector<vector<long long>>;
using vc=vector<char>;
using vvc=vector<vector<char>>;
const int inf=1000000009;
void chmin(auto &a,auto b){if(b<a)a=b;}
void chmax(auto &a,auto b){if(a<b)a=b;}

int ans=0;
int on[11];
int n,m;
void dfs(int i,vvi v,int c){
  if(c==2){
    bool b=true;
    rep(j,m){
      if(on[j]%2==1){
        b=false;
        break;
      }
    }
    if(b)ans++;
  }
  if(c==1){
    rep(j,v[i].size()){
      on[v[i][j]]++;
    }
  }
  if(i==n-1)dfs(i+1,v,2);
  if(i<n-1){
    dfs(i+1,v,1);
    dfs(i+1,v,0);
  }
}
int main(){
  cin>>n>>m;
  vector<int> v;
  rep(i,m){
    int k;
    cin>>k;
    rep(j,k){
      int a;cin>>a;
      v[a-1].push_back(i);
    }
  }
  rep(i,m){
    cin>>on[i];
  }
  dfs(-1,v,0);
  cout<<ans<<endl;
}

Compiler output:
a.cc:11:12: warning: use of 'auto' in parameter declaration only available with '-std=c++20' or '-fconcepts'
   11 | void chmin(auto &a,auto b){if(b<a)a=b;}
      |            ^~~~
a.cc:11:20: warning: use of 'auto' in parameter declaration only available with '-std=c++20' or '-fconcepts'
   11 | void chmin(auto &a,auto b){if(b<a)a=b;}
      |                    ^~~~
a.cc:12:12: warning: use of 'auto' in parameter declaration only available with '-std=c++20' or '-fconcepts'
   12 | void chmax(auto &a,auto b){if(a<b)a=b;}
      |            ^~~~
a.cc:12:20: warning: use of 'auto' in parameter declaration only available with '-std=c++20' or '-fconcepts'
   12 | void chmax(auto &a,auto b){if(a<b)a=b;}
      |                    ^~~~
a.cc: In function 'int main()':
a.cc:47:14: error: request for member 'push_back' in 'v.std::vector<int>::operator[](((std::vector<int>::size_type)(a - 1)))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
   47 |       v[a-1].push_back(i);
      |              ^~~~~~~~~
a.cc:53:10: error: could not convert 'v' from 'vector<int>' to 'vector<std::vector<long long int>>'
   53 |   dfs(-1,v,0);
      |          ^
      |          |
      |          vector<int>
Language: C++

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

int main() {
  int N,M;cin>>N>>M;
  vector<vector<int> >s(M);
  for (int i=0;i<M;++i){
    int k;cin>>k;
    for (int j=0;j<k;++j){
      int a;cin>>a; --a;
      s[i].push_back(a);
    }
  }
  vector<int>p(M);
  for (int i=0;i<M;++i)cin>>p[i];
  
  long long res=0;
  for (int b<(1<<N);++b){
    bool ok=true;
    for(int i=0;i<M;++i){
      int con=0;
      for (auto v:s[i]){
        if (b&(1<<v)) ++con;
      }
      if (con%2!=p[i])ok=false;
    }
    if (ok) ++res;
  }
  cout<<res<<endl;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:19:13: error: expected ';' before '<' token
   19 |   for (int b<(1<<N);++b){
      |             ^
      |             ;
a.cc:19:13: error: expected primary-expression before '<' token
Language: C++

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

int main() {
  int N,M;cin>>N>>M;
  vector<vector<int> >s(M);
  for (int i=0;i<M;++i){
    int k;cin>>k;
    for (int j=0;j<k;++j){
      int a;cin>>a; --a;
      s[i].push_back(a);
    }
  }
  

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

#include <iostream>
#include <vector>
#include <algorithm>

bool check(
    int M, std::vector<char>& sw,
     std::vector<std::vector<int>>& s,
      std::vector<char>& p)
{
    int i;
    for (i = 0; i < M; i++) {
        auto & ks = s[i];
        for (auto & sno : ks) {
            c += sw[sno-1];
        }
        if (c % 2 != p[i]) break;
    }

    return (i == M);
}

std::vector<char> cre(int N, int n)
{
    std::vector<char> res(N, 0);
    for (int i = 0; i < N; i++) {
        res[i] = n % 2;
        n /= 2;
    }

    return res;
}

int main()
{
    int N, M;
    std::cin >> N >> M;
    std::vector<std::vector<int>> s(M);

    // for lights
    for (int i = 0; i < M; i++) {
        int k;
        std::cin >> k;
        s[i].resize(k);
        for (int j = 0; j < k; j++) {
            std::cin >> s[i][j];
        }
    }

    // for switch
    std::vector<char> p(M);
    for (int i = 0; i < M; i++) {
        std::cin >> p[i];
    }

    int x = 1;
    for (int i = 0; i < N; i++) {
        x *= 2;
    }

    long long ans = 0;
    for (int i = 0; i < x; i++) {
        std::vector<char> chk = cre(N, i);
        if (check(M, chk, s, p)) {
            ans++;
        }
    }
    
    std::cout << ans << std::endl;

    return 0;
}

Compiler output:
a.cc: In function 'bool check(int, std::vector<char>&, std::vector<std::vector<int> >&, std::vector<char>&)':
a.cc:14:13: error: 'c' was not declared in this scope
   14 |             c += sw[sno-1];
      |             ^
a.cc:16:13: error: 'c' was not declared in this scope
   16 |         if (c % 2 != p[i]) break;
      |             ^
Language: C++

#include <iostream>
#include <vector>

bool check(
    int M, std::vector<char>& sw,
     std::vector<std::vector<int>>& s,
      std::vector<int>& p)
{
    int on = 0;
    for (int i = 0; i < M; i++) {
        int c = 0;
        auto & ks = s[i];
        for (auto & sno : ks) {
            c += sw[sno];
        }
        if (c % 2 == p[i]) on++;
    }

    return (on == M);
}

std::vector<char> cre(int N, int n)
{
    std::vector<char> res(N, 0);
    for (int i = N-1; i >= 0; i--) {
        res[i] = n % 2;
        n /= 2;
    }
}

int main()
{
    int N, M;
    std::cin >> N >> M;
    std::vector<std::vector<int>> s(N);

    // for lights
    for (int i = 0; i < M; i++) {
        int k;
        std::cin >> k;
        s[i].reserve(k);
        for (int j = 0; j < k; j++) {
            int sj;
            std::cin >> sj;
            s[i].push_back(sj);
        }
    }

    // for switch
    std::vector<int> p(M);
    for (int i = 0; i < M; i++) {
        std::cin >> p[i];
    }

    int x = 1;
    for (int i = 0; i < N; i++) {
        x *= 2;
    }

    int ans = 0;
    for (int i = 0; i < x; i++) {
        std::vector<char> chk = cre(N, i);
        if (check(M, chk, s, p)) {
            ans+++
        }
    }
    
    std::cout << ans << std::endl;

    return 0;
}

Compiler output:
a.cc: In function 'std::vector<char> cre(int, int)':
a.cc:29:1: warning: no return statement in function returning non-void [-Wreturn-type]
   29 | }
      | ^
a.cc: In function 'int main()':
a.cc:65:9: error: expected primary-expression before '}' token
   65 |         }
      |         ^
Language: C++

#include <iostream>
#include <vector>

bool check(
    int M, std::vector<char>& sw,
     std::vector<std::vector<int>>& s,
      std::vector<int>& p)
{
    int on = 0;
    for (int i = 0; i < M; i++) {
        int c = 0;
        auto & ks = s[i];
        for (auto & sno : ks) {
            c += sw(sno);
        }
        if (c % 2 == p[i]) on++;
    }

    return (on == M);
}

std::vector<char> cre(int N, int n)
{
    std::vector<char> res(N, 0);
    for (int i = N-1; i >= 0; i--) {
        res[i] = n % 2;
        n /= 2;
    }
}

int main()
{
    int N, M;
    std::cin >> N >> M;
    std::vector<std::vector<int>> s(N);

    // for lights
    for (int i = 0; i < M; i++) {
        int k;
        std::cin >> k;
        s[i].reserve(k);
        for (int j = 0; j < k; j++) {
            int sj;
            std::cin >> sj;
            s[i].push_back(sj);
        }
    }

    // for switch
    std::vector<int> p(M);
    for (int i = 0; i < M; i++) {
        std::cin >> p[i];
    }

    int x = 1;
    for (int i = 0; i < N; i++) {
        x *= 2;
    }

    int ans = 0;
    for (int i = 0; i < x; i++) {
        std::vector<char> chk = cre(N, i);
        if (check(M, chk, s, p)) {
            ans+++
        }
    }
    
    std::cout << ans << std::endl;

    return 0;
}

Compiler output:
a.cc: In function 'bool check(int, std::vector<char>&, std::vector<std::vector<int> >&, std::vector<int>&)':
a.cc:14:20: error: no match for call to '(std::vector<char>) (int&)'
   14 |             c += sw(sno);
      |                  ~~^~~~~
a.cc: In function 'std::vector<char> cre(int, int)':
a.cc:29:1: warning: no return statement in function returning non-void [-Wreturn-type]
   29 | }
      | ^
a.cc: In function 'int main()':
a.cc:65:9: error: expected primary-expression before '}' token
   65 |         }
      |         ^
Language: C++

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

int main (){
  int n,m;
  cin >> n >> m;
  vector<int>s[m];
  rep(i,m){
    int k;
    cin >> k;
    rep(j,k){
      int t;
      cin >> t;
      t--;
      s[i].push_back(t);
    }
  }
  int p[m];
  rep(i,m)cin >> p[i];
  int ans=0;
  for(int i=0;i<pow(2,n);;i++){
    bool ok = 1;
    rep(mm,m){
      int a = 0;
      for(int l:s[mm]){
        if(i & (1<<l))a += 1;
      }
      if(a%2!=p[mm])ok = 0;
    }
    if(ok==1)ans += 1;
  }
  cout << ans << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:26: error: expected primary-expression before ';' token
   23 |   for(int i=0;i<pow(2,n);;i++){
      |                          ^
a.cc:23:26: error: expected ')' before ';' token
   23 |   for(int i=0;i<pow(2,n);;i++){
      |      ~                   ^
      |                          )
a.cc:23:27: error: 'i' was not declared in this scope
   23 |   for(int i=0;i<pow(2,n);;i++){
      |                           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define INF (1LL<<50)
#define MOD 1000000007

int k[11];
int p[11];
int s[11][11];
int N[11];

// 数字をスイッチに変換(Nbit) N[0]は使わない
void num2switch(int i){
    int j=1;
    while(i){
        if(i%2==1){
            N[j]=1;
        }else{
            N[j]=0;
        }
        j++;
        i/=2;
    }
}

int main(){
    int n,M,cnt=0;
    cin >> n >> M;
    // 入力
    rep(i,M){
        cin >> k[i];
        rep(j,k[i]){
            cin >> s[i][j];
        }
    }
    rep(i,M){
        cin >> p[i];
    }

    //全てのスイッチの組み合わせを総当たりする(2^N)
    for(int num=1;num<pow(2,n);num++){
        num2switch(num);
        bool flag = false;
        rep(i,M){
            if(flag){
                break;
            }
            int tmp = 0;
            rep(j,k[i]){
                tmp+=N[s[i][j]];　//S(i,j)のスイッチが押されていたら+1
                tmp%=2;
            }
            if(tmp!=p[i]){ // 1つでも電球がつかなかったらフラグをたててbreak
                flag = true;
            }
        }
        if(!flag)cnt++; // すべての電球がついたらcnt++
    }
    cout << cnt << endl;
    return 0;
}

Compiler output:
a.cc:51:33: error: extended character 　 is not valid in an identifier
   51 |                 tmp+=N[s[i][j]];　//S(i,j)のスイッチが押されていたら+1
      |                                 ^
a.cc: In function 'int main()':
a.cc:51:33: error: '\U00003000' was not declared in this scope
   51 |                 tmp+=N[s[i][j]];　//S(i,j)のスイッチが押されていたら+1
      |                                 ^~
Language: C++

#include<iostream>
#include<vector>
#include<cmath>

using namespace std;

int main(){
    int N,M;
    cin >> N >> M;
    vector< vector<int> > sw(M, vector<int>(0) );

    int k[M];
    int temp;
    for(int i=0;i<M;i++){
        cin >>k[i];
        for(int j=0;j<k[i];j++){
            cin >> temp;
            sw[i].emplace_back(temp);
        }
    }
    int p[M];
    for(int i=0;i<M;i++) cin >> p[i];
    int c=0;
    int ok =1;
    vector<int> on(N);
    int dec;
    int ans =0;
    for(int i=0;i<pow(2,N);i++){
        ok = 1;
        dec = i;
        for(int j=0;j<N;j++){
            if(dec%2==1) on[j] = j + 1;
            else on[j] = -1;
            dec/=2;
        }
        for(int j=0;j<M;j++){
            c = 0;
            for(auto itr = sw[j].begin(); itr != sw[j].end(); ++itr){  // j番目のライトに必要なスイッチを探索
                if(find(on.begin(), on.end(), *itr) != on.end()) c++;  // 見つかったら　cをインクリメント
            }
            if(c%2 != p[j]){ //一個でもつかなかったらアウト
                ok = 0;
                break;
            }
        }
        if(ok == 1) ans ++; 

    }
    cout << ans << endl;
    
    return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:39:24: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, int&)'
   39 |                 if(find(on.begin(), on.end(), *itr) != on.end()) c++;  // 見つかったら　cをインクリメント
      |                    ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/bits/locale_facets.h:48,
                 from /usr/include/c++/14/bits/basic_ios.h:37,
                 from /usr/include/c++/14/ios:46,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note: candidate: 'template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT> >::__type std::find(istreambuf_iterator<_CharT>, istreambuf_iterator<_CharT>, const _CharT2&)'
  435 |     find(istreambuf_iterator<_CharT> __first,
      |     ^~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note:   template argument deduction/substitution failed:
a.cc:39:24: note:   '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' is not derived from 'std::istreambuf_iterator<_CharT>'
   39 |                 if(find(on.begin(), on.end(), *itr) != on.end()) c++;  // 見つかったら　cをインクリメント
      |                    ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n,m;
  cin>>n>>m;
  vector<int>a(n);
  for(int i=0;i<m;i++){
    int k;
    cin>>k;
    for(int j=0;j<k;j++){
      int s;
      cin>>s;
      s--;
      a[s]|=1<<i;
    }
  }
  for(int s=0;s<(1<<n);s++){
    int t=0;
    for(int i=0;i<n;i++) if(s>>i&1)t^=a[i];
  }
  int p=0; 
  int ans=0;
  for(int i=0;i<m;m++){
    int x;
    cin>>x;
    p|=x<<i;
  if(t==p)ans++;
  }
  cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:6: error: 't' was not declared in this scope
   27 |   if(t==p)ans++;
      |      ^