Language: C++

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

using namespace std;

int main(void){
    int n, k;
    cin >> n >> k;
    
    vector<int> a(n);
    for (int i = 0; i < n; i++) cin >> a[i];
    
    // game[K]がtrueならばTaro win
    // game[K]がfalseならばJiro win
    vector<bool> game(k+2, false);
    
    for (int i = 1; i <= k; i++){
        
        for (int j = 0; j < n; j++){
            
            if (i - a[j] >= 0) game[i] |= !game[i-a[j]]; 
        }
    }
    
    if (game[k]) cout << "First" << endl;
    else cout << "Second" << endl;
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:40: error: no match for 'operator|=' (operand types are 'std::vector<bool>::reference' and 'bool')
   21 |             if (i - a[j] >= 0) game[i] |= !game[i-a[j]];
      |                                ~~~~~~~~^~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/bits/memory_resource.h:38,
                 from /usr/include/c++/14/string:68,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream: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<bool>::reference' 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<bool>::reference' 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<bool>::reference' 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<bool>::reference' 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,
                 from a.cc:2:
/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<bool>::reference' 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<bool>::reference' to 'std::chars_format&'
  646 |   operator|=(chars_format& __lhs, chars_format __rhs) noexcept
      |              ~~~~~~~~~~~~~~^~~~~