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 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) {
        x ^= a[i];
      }
    }
    int p =0;
    for (int i=0;i<M;i++) {
      int x;
      cin >> x;
      a[s] |= x << i;
    }
    int ans = 0;
    if ( t==p) {
      ans++;
    }
  }
  cout << ans << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:14: error: no match for 'operator|=' (operand types are 'std::vector<int>' and 'int')
   11 |         a[s] |= 1 << i;
      |         ~~~~~^~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41,
                 from a.cc:1:
/usr/include/c++/14/cstddef:168:3: note: candidate: 'constexpr std::byte& std::operator|=(byte&, byte)'
  168 |   operator|=(byte& __l, byte __r) noexcept
      |   ^~~~~~~~
/usr/include/c++/14/cstddef:168:20: note:   no known conversion for argument 1 from 'std::vector<int>' to 'std::byte&'
  168 |   operator|=(byte& __l, byte __r) noexcept
      |              ~~~~~~^~~
In file included from /usr/include/c++/14/streambuf:43,
                 from /usr/include/c++/14/bits/streambuf_iterator.h:35,
                 from /usr/include/c++/14/iterator:66,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:54:
/usr/include/c++/14/bits/ios_base.h:104:3: note: candidate: 'constexpr const std::_Ios_Fmtflags& std::operator|=(_Ios_Fmtflags&, _Ios_Fmtflags)'
  104 |   operator|=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) _GLIBCXX_NOTHROW
      |   ^~~~~~~~
/usr/include/c++/14/bits/ios_base.h:104:29: note:   no known conversion for argument 1 from 'std::vector<int>' to 'std::_Ios_Fmtflags&'
  104 |   operator|=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) _GLIBCXX_NOTHROW
      |              ~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/ios_base.h:154:3: note: candidate: 'constexpr const std::_Ios_Openmode& std::operator|=(_Ios_Openmode&, _Ios_Openmode)'
  154 |   operator|=(_Ios_Openmode& __a, _Ios_Openmode __b) _GLIBCXX_NOTHROW
      |   ^~~~~~~~
/usr/include/c++/14/bits/ios_base.h:154:29: note:   no known conversion for argument 1 from 'std::vector<int>' to 'std::_Ios_Openmode&'
  154 |   operator|=(_Ios_Openmode& __a, _Ios_Openmode __b) _GLIBCXX_NOTHROW
      |              ~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/ios_base.h:201:3: note: candidate: 'constexpr const std::_Ios_Iostate& std::operator|=(_Ios_Iostate&, _Ios_Iostate)'
  201 |   operator|=(_Ios_Iostate& __a, _Ios_Iostate __b) _GLIBCXX_NOTHROW
      |   ^~~~~~~~
/usr/include/c++/14/bits/ios_base.h:201:28: note:   no known conversion for argument 1 from 'std::vector<int>' to 'std::_Ios_Iostate&'
  201 |   operator|=(_Ios_Iostate& __a, _Ios_Iostate __b) _GLIBCXX_NOTHROW
      |              ~~~~~~~~~~~~~~^~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:176:
/usr/include/c++/14/future:185:18: note: candidate: 'constexpr std::launch& std::operator|=(launch&, launch)'
  185 |   inline launch& operator|=(launch& __x, launch __y) noexcept
      |                  ^~~~~~~~
/usr/include/c++/14/future:185:37: note:   no known conversion for argument 1 from 'std::vector<int>' to 'std::launch&'
  185 |   inline launch& operator|=(launch& __x, launch __y) noexcept
      |                             ~~~~~~~~^~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:198:
/usr/include/c++/14/charconv:646:3: note: candidate: 'constexpr std::chars_format& std::operator|=(chars_format&, chars_format)'
  646 |   operator|=(chars_format& __lhs, chars_format __rhs) noexcept
      |   ^~~~~~~~
/usr/include/c++/14/charconv:646:28: note:   no known conversion for argument 1 from 'std::vector<int>' to 'std::chars_format&'
  646 |   operator|=(chars_format& __lhs, chars_format __rhs) noexcept
      |              ~~~~~~~~~~~~~~^~~~~
a.cc:17:9: error: 'x' was not declared in this scope
   17 |         x ^= a[i];
      |         ^
a.cc:24:12: error: no match for 'operator|=' (operand types are 'std::vector<int>' and 'int')
   24 |       a[s] |= x << i;
      |       ~~~~~^~~~~~~~~
/usr/include/c++/14/cstddef:168:3: note: candidate: 'constexpr std::byte& std::operator|=(byte&, byte)'
  168 |   operator|=(byte& __l, byte __r) noexcept
      |   ^~~~~~~~
/usr/include/c++/14/cstddef:168:20: note:   no known conversion for argument 1 from 'std::vector<int>' to 'std::byte&'
  168 |   operator|=(byte& __l, byte __r) noexcept
      |              ~~~~~~^~~
/usr/include/c++/14/bits/ios_base.h:104:3: note: candidate: 'constexpr const std::_Ios_Fmtflags& std::operator|=(_Ios_Fmtflags&, _Ios_Fmtflags)'
  104 |   operator|=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) _GLIBCXX_NOTHROW
      |   ^~~~~~~~
/usr/include/c++/14/bits/ios_base.h:104:29: note:   no known conversion for argument 1 from 'std::vector<int>' to 'std::_Ios_Fmtflags&'
  104 |   operator|=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) _GLIBCXX_NOTHROW
      |              ~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/ios_base.h:154:3: note: candidate: 'constexpr const std::_Ios_Openmode& std::operator|=(_Ios_Openmode&, _Ios_Openmode)'
  154 |   operator|=(_Ios_Openmode& __a, _Ios_Openmode __b) _GLIBCXX_NOTHROW
      |   ^~~~~~~~
/usr/include/c++/14/bits/ios_base.h:154:29: note:   no known conversion for argument 1 from 'std::vector<int>' to 'std::_Ios_Openmode&'
  154 |   operator|=(_Ios_Openmode& __a, _Ios_Openmode __b) _GLIBCXX_NOTHROW
      |              ~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/ios_base.h:201:3: note: candidate: 'constexpr const std::_Ios_Iostate& std::operator|=(_Ios_Iostate&, _Ios_Iostate)'
  201 |   operator|=(_Ios_Iostate& __a, _Ios_Iostate __b) _GLIBCXX_NOTHROW
      |   ^~~~~~~~
/usr/include/c++/14/bits/ios_base.h:201:28: note:   no known conversion for argument 1 from 'std::vector<int>' to 'std::_Ios_Iostate&'
  201 |   operator|=(_Ios_Iostate& __a, _Ios_Iostate __b) _GLIBCXX_NOTHROW
      |              ~~~~~~~~~~~~~~^~~
/usr/include/c++/14/future:185:18: note: candidate: 'constexpr std::launch& std::operator|=(launch&, launch)'
  185 |   inline launch& operator|=(launch& __x, launch __y) noexcept
      |                  ^~~~~~~~
/usr/include/c++/14/future:185:37: note:   no known conversion for argument 1 from 'std::vector<int>' to 'std::launch&'
  185 |   inline launch& operator|=(launch& __x, launch __y) noexcept
      |                             ~~~~~~~~^~~
/usr/include/c++/14/charconv:646:3: note: candidate: 'constexpr std::chars_format& std::operator|=(chars_format&, chars_format)'
  646 |   operator|=(chars_format& __lhs, chars_format __rhs) noexcept
      |   ^~~~~~~~
/usr/include/c++/14/charconv:646:28: note:   no known conversion for argument 1 from 'std::vector<int>' to 'std::chars_format&'
  646 |   operator|=(chars_format& __lhs, chars_format __rhs) noexcept
      |              ~~~~~~~~~~~~~~^~~~~
a.cc:31:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   31 |   cout << ans << endl;
      |           ^~~
      |           abs