Language: C++

#include <bits/stdc++.h>
using nemespace std;
int main() {
    int N,M;
    int answer=0;
    
    cin >> N >> M;
    
    vector<vector<int>> map(M,vector<int>);
    vector<int> crit(M);
    vector<int> amount(M);
    
    for(int i=0;i<M;i++){
        cin >> amount.at(i);
        
        map.at(i).size()=amount.at(i);
        
        for(int j=0;j<k;j++){
        
            cin >> map.at(i).at(j);
            
        }
        
    }
   
    for(int i=0;i<M;i++){
    
        cin >> crit.at(i);
        
    }
    
    for(int bit=0;bit<((int)1<<N);bit++){
    
        int point1=0;
        
        for(int i=0;i<M;i++){
            
            vector<int> bin(map.at(i).size());
            int point2=0;
            
            for(int j=0;j<map.at(i).size();j++){
                if(bit>>map.at(i).at(j)==1) point2++;
            }
            
            if(point2%2==crit.at(i)) point1++;
            
        }
        
        if(point1==M) answer++;
        
    }
    
    cout << answer << endl;
    
}


















Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'nemespace'
    2 | using nemespace std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:7:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |     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:9:5: error: 'vector' was not declared in this scope
    9 |     vector<vector<int>> map(M,vector<int>);
      |     ^~~~~~
a.cc:9: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:9:19: error: expected primary-expression before 'int'
    9 |     vector<vector<int>> map(M,vector<int>);
      |                   ^~~
a.cc:10:12: error: expected primary-expression before 'int'
   10 |     vector<int> crit(M);
      |            ^~~
a.cc:11:12: error: expected primary-expression before 'int'
   11 |     vector<int> amount(M);
      |            ^~~
a.cc:14:16: error: 'amount' was not declared in this scope
   14 |         cin >> amount.at(i);
      |                ^~~~~~
a.cc:16:9: error: 'map' was not declared in this scope
   16 |         map.at(i).size()=amount.at(i);
      |         ^~~
a.cc:16:9: note: suggested alternatives:
In file included from /usr/include/c++/14/map:63,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:152:
/usr/include/c++/14/bits/stl_map.h:102:11: note:   'std::map'
  102 |     class map
      |           ^~~
/usr/include/c++/14/map:89:13: note:   'std::pmr::map'
   89 |       using map
      |             ^~~
a.cc:18:23: error: 'k' was not declared in this scope
   18 |         for(int j=0;j<k;j++){
      |                       ^
a.cc:28:16: error: 'crit' was not declared in this scope
   28 |         cin >> crit.at(i);
      |                ^~~~
a.cc:38:20: error: expected primary-expression before 'int'
   38 |             vector<int> bin(map.at(i).size());
      |                    ^~~
a.cc:41:27: error: 'map' was not declared in this scope
   41 |             for(int j=0;j<map.at(i).size();j++){
      |                           ^~~
a.cc:41:27: note: suggested alternatives:
/usr/include/c++/14/bits/stl_map.h:102:11: note:   'std::map'
  102 |     class map
      |           ^~~
/usr/include/c++/14/map:89:13: note:   'std::pmr::map'
   89 |       using map
      |             ^~~
a.cc:45:26: error: 'crit' was not declared in this scope
   45 |             if(point2%2==crit.at(i)) point1++;
      |                          ^~~~
a.cc:53:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   53 |     cout << answer << 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:53:23: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   53 |     cout << answer << 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)
      |     ^~~~