Language: C++

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


#define rep(i,n) for(ll i=0; i<(ll)(n); i++)
#define ALL(x) (x).begin(),(x).end()
#define SIZE(x) ((ll)(x).size()) //sizeをsize_tからllに直しておく
#define MAX(x) *max_element(ALL(x))
#define PB push_back

int main(){
    ll n, m, tmp; cin >> n >> m;
    vector<ll> sw(n);
		rep(i,m) {
			ll k;
			cin >> k;
			rep(j,k) {
				int s;
				cin >> s;
				s--;
				sw[s] |= 1<<i;
			}
		}
    
    ll p = 0;
    rep(i, m) {
		int x;
		cin >> x;
		p |= x<<i;
	}
 
	ll ans = 0;
    for (int s = 0; s < (1<<n); s++) {
		int t = 0;
		for (int i = 0; i < n; i++) {
				if (s>>i & 1) t ^= sw[i];
		}
		if (t == p) ans++;
	}
 
	cout << ans << endl;
} namespace std;
using ll = long long;
using P = pair<ll, ll>;


#define rep(i,n) for(ll i=0; i<(ll)(n); i++)
#define ALL(x) (x).begin(),(x).end()
#define SIZE(x) ((ll)(x).size()) //sizeをsize_tからllに直しておく
#define MAX(x) *max_element(ALL(x))
#define PB push_back

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

Compiler output:
a.cc:2:6: error: stray '#' in program
    2 | using#include <bits/stdc++.h>
      |      ^
a.cc:2:7: error: expected nested-name-specifier before 'include'
    2 | using#include <bits/stdc++.h>
      |       ^~~~~~~
a.cc:5:11: error: 'pair' does not name a type
    5 | using P = pair<ll, ll>;
      |           ^~~~
a.cc: In function 'int main()':
a.cc:15:19: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   15 |     ll n, m, tmp; 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:16:5: error: 'vector' was not declared in this scope
   16 |     vector<ll> sw(n);
      |     ^~~~~~
a.cc:16:5: note: suggested alternatives:
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53:
/usr/include/c++/14/bits/stl_vector.h:428:11: note:   'std::vector'
  428 |     class vector : protected _Vector_base<_Tp, _Alloc>
      |           ^~~~~~
/usr/include/c++/14/vector:93:13: note:   'std::pmr::vector'
   93 |       using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
      |             ^~~~~~
a.cc:16:14: error: expected primary-expression before '>' token
   16 |     vector<ll> sw(n);
      |              ^
a.cc:16:16: error: 'sw' was not declared in this scope
   16 |     vector<ll> sw(n);
      |                ^~
a.cc:44:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   44 |         cout << ans << 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:44:24: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   44 |         cout << ans << 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)
      |     ^~~~
a.cc: At global scope:
a.cc:45:16: error: expected '{' before ';' token
   45 | } namespace std;
      |                ^
a.cc:47:11: error: 'pair' does not name a type
   47 | using P = pair<ll, ll>;
      |           ^~~~
a.cc:56:5: error: redefinition of 'int main()'
   56 | int main(){
      |     ^~~~
a.cc:14:5: note: 'int main()' previously defined here
   14 | int main(){
      |     ^~~~
a.cc: In function 'int main()':
a.cc:57:19: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   57 |     ll n, m, tmp; cin >> n >> m;
      |                   ^~~
      |                   std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:58:5: error: 'vector' was not declared in this scope
   58 |     vector<ll> sw(n);
      |     ^~~~~~
a.cc:58:5: note: suggested alternatives:
/usr/include/c++/14/bits/stl_vector.h:428:11: note:   'std::vector'
  428 |     class vector : protected _Vector_base<_Tp, _Alloc>
      |           ^~~~~~
/usr/include/c++/14/vector:93:13: note:   'std::pmr::vector'
   93 |       using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
      |             ^~~~~~
a.cc:58:14: error: expected primary-expression before '>' token
   58 |     vector<ll> sw(n);
      |              ^
a.cc:58:16: error: 'sw' was not declared in this scope
   58 |     vector<ll> sw(n);
      |                ^~
a.cc:86:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   86 |         cout << ans << 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:86:24: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   86 |         cout << ans << endl;
      |                        ^~~~
      |                        std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~