Language: C++

#include <iostream>
#include <cstdlib>
#include <string>
#include <vector>
#include <array>
#include <algorithm>

using namespace std;

int main() {
  array<array<int, 3>, 3> row;
  for (int i = 0; i < 3; i++) {
    array<int, 3> column;
    int a1, a2, a3;
    scanf("%d %d %d", &a1, &a2, &a3);
    column[0] = a1;
    column[1] = a2;
    column[2] = a3;
    row[i] = column;
  }
  int n;
  scanf("%d", &n);
  vector<int> v(n);
  for (int i = 0; i < n; i++) {
    int b;
    scanf("%d", &b);
    v[i] = b;
  }
  
  bool bingo = false;
  if ((find(v.begin, v.end(), row[0][0]) != v.end() &&
       find(v.begin, v.end(), row[0][1]) != v.end() &&
       find(v.begin, v.end(), row[0][2]) != v.end()) ||
      (find(v.begin, v.end(), row[0][0]) != v.end() &&
       find(v.begin, v.end(), row[1][0]) != v.end() &&
       find(v.begin, v.end(), row[2][0]) != v.end()) ||
      (find(v.begin, v.end(), row[2][0]) != v.end() &&
       find(v.begin, v.end(), row[2][1]) != v.end() &&
       find(v.begin, v.end(), row[2][2]) != v.end()) ||
      (find(v.begin, v.end(), row[0][2]) != v.end() &&
       find(v.begin, v.end(), row[1][2]) != v.end() &&
       find(v.begin, v.end(), row[2][2]) != v.end()) ||
      (find(v.begin, v.end(), row[0][0]) != v.end() &&
       find(v.begin, v.end(), row[1][1]) != v.end() &&
       find(v.begin, v.end(), row[2][2]) != v.end()) ||
      (find(v.begin, v.end(), row[0][2]) != v.end() &&
       find(v.begin, v.end(), row[1][1]) != v.end() &&
       find(v.begin, v.end(), row[2][0]) != v.end())) {
    bingo = true;
  }
  
  cout << (bing ? "Yes": "No") << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:31:12: error: no matching function for call to 'find(<unresolved overloaded function type>, std::vector<int>::iterator, std::array<int, 3>::value_type&)'
   31 |   if ((find(v.begin, v.end(), row[0][0]) != v.end() &&
      |        ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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:31:12: note:   mismatched types 'std::istreambuf_iterator<_CharT>' and 'std::vector<int>::const_iterator (std::vector<int>::*)() const noexcept'
   31 |   if ((find(v.begin, v.end(), row[0][0]) != v.end() &&
      |        ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:31:12: note:   mismatched types 'std::istreambuf_iterator<_CharT>' and 'std::vector<int>::iterator (std::vector<int>::*)() noexcept'
a.cc:31:12: note:   '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' is not derived from 'std::istreambuf_iterator<_CharT>'
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:6:
/usr/include/c++/14/bits/stl_algo.h:3842:5: note: candidate: '_IIter std::find(_IIter, _IIter, const _Tp&) [with _IIter = __gnu_cxx::__normal_iterator<int*, vector<int> >; _Tp = int]'
 3842 |     find(_InputIterator __first, _InputIterator __last,
      |     ^~~~
/usr/include/c++/14/bits/stl_algo.h:3842:25: note:   no known conversion for argument 1 from '<unresolved overloaded function type>' to '__gnu_cxx::__normal_iterator<int*, std::vector<int> >'
 3842 |     find(_InputIterator __first, _InputIterator __last,
      |          ~~~~~~~~~~~~~~~^~~~~~~
In file included from /usr/include/c++/14/algorithm:86:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:60:1: note: candidate: 'template<class _ExecutionPolicy, class _ForwardIterator, class _Tp> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> std::find(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, const _Tp&)'
   60 | find(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value);
      | ^~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:60:1: note:   candidate expects 4 arguments, 3 provided
a.cc:32:12: error: no matching function for call to 'find(<unresolved overloaded function type>, std::vector<int>::iterator, std::array<int, 3>::value_type&)'
   32 |        find(v.begin, v.end(), row[0][1]) != v.end() &&
      |        ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/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:32:12: note:   mismatched types 'std::istreambuf_iterator<_CharT>' and 'std::vector<int>::const_iterator (std::vector<int>::*)() const noexcept'
   32 |        find(v.begin, v.end(), row[0][1]) != v.end() &&
      |        ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:32:12: note:   mismatched types 'std::istreambuf_iterator<_CharT>' and 'std::vector<int>::iterator (std::vector<int>::*)() noexcept'
a.cc:32:12: note:   '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' is not derived from 'std::istreambuf_iterator<_CharT>'
/usr/include/c++/14/bits/stl_algo.h:3842:5: note: candidate: '_IIter std::find(_IIter, _IIter, const _Tp&) [with _IIter = __gnu_cxx::__normal_iterator<int*, vector<int> >; _Tp = int]'
 3842 |     find(_InputIterator __first, _InputIterator __last,
      |     ^~~~
/usr/include/c++/14/bits/stl_algo.h:3842:25: note:   no known conversion for argument 1 from '<unresolved overloaded function type>' to '__gnu_cxx::__normal_iterator<int*, std::vector<int> >'
 3842 |     find(_InputIterator __first, _InputIterator __last,
      |          ~~~~~~~~~~~~~~~^~~~~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:60:1: note: candidate: 'template<class _ExecutionPolicy, class _ForwardIterator, class _Tp> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> std::find(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, const _Tp&)'
   60 | find(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value);
      | ^~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:60:1: note:   candidate expects 4 arguments, 3 provided
a.cc:33:12: error: no matching function for call to 'find(<unresolved overloaded function type>, std::vector<int>::iterator, std::array<int, 3>::value_type&)'
   33 |        find(v.begin, v.end(), row[0][2]) != v.end()) ||
      |        ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/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:33:12: note:   mismatched types 'std::istreambuf_iterator<_CharT>' and 'std::vector<int>::const_iterator (std::vector<int>::*)() const noexcept'
   33 |        find(v.begin, v.end(), row[0][2]) != v.end()) ||
      |        ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:33:12: note:   mismatched types 'std::istreambuf_iterator<_CharT>' and 'std::vector<int>::iterator (std::vector<int>::*)() noexcept'
a.cc:33:12: note:   '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' is not derived from 'std::istreambuf_iterator<_CharT>'
/usr/include/c++/14/bits/stl_algo.h:3842:5: note: candidate: '_IIter std::find(_IIter, _IIter, const _Tp&) [with _IIter = __gnu_cxx::__normal_iterator<int*, vector<int> >; _Tp = int]'
 3842 |     find(_InputIterator __first, _InputIterator __last,
      |     ^~~~
/usr/include/c++/14/bits/stl_algo.h:3842:25: note:   no known conversion for argument 1 from '<unresolved overloaded function type>' to '__gnu_cxx::__normal_iterator<int*, std::vector<int> >'
 3842 |     find(_InputIterator __first, _InputIterator __last,
      |          ~~~~~~~~~~~~~~~^~~~~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:60:1: note: candidate: 'template<class _ExecutionPolicy, class _ForwardIterator, class _Tp> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> std::find(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, const _Tp&)'
   60 | find(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value);
      | ^~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:60:1: note:   candidate expects 4 arguments, 3 provided
a.cc:34:12: error: no matching function for call to 'find(<unresolved overloaded function type>, std::vector<int>::iterator, std::array<int, 3>::value_type&)'
   34 |       (find(v.begin, v.end(), row[0][0]) != v.end() &&
      |        ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/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:34:12: note:   mismatched types 'std::istreambuf_iterator<_CharT>' and 'std::vector<int>::const_iterator (std::vector<int>::*)() const noexcept'
   34 |       (find(v.begin, v.end(), row[0][0]) != v.end() &&
      |        ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:34:12: note:   mismatched types 'std::istreambuf_iterator<_CharT>' and 'std::vector<int>::iterator (std::vector<int>::*)() noexcept'
a.cc:34:12: note:   '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' is not derived from 'std::istreambuf_iterator<_CharT>'
/usr/include/c++/14/bits/stl_algo.h:3842:5: note: candidate: '_IIter std::find(_IIter, _IIter, const _Tp&) [with _IIter = __gnu_cxx::__normal_iterator<int*, vector<int> >; _Tp = int]'
 3842 |     find(_InputIterator __first, _InputIterator __last,
      |     ^~~~
/usr/include/c++/14/bits/stl_algo.h:3842:25: note:   no known conversion for argument 1 from '<unresolved overloaded function type>' to '__gnu_cxx::__normal_iterator<int*, std::vector<int> >'
 3842 |     find(_InputIterator __first, _InputIterator __last,
      |          ~~~~~~~~~~~~~~~^~~~~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:60:1: note: candidate: 'template<class _ExecutionPolicy, class _ForwardIterator, class _Tp> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> std::find(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, const _Tp&)'
   60 | find(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value);
      | ^~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:60:1: note:   candidate expects 4 arguments, 3 provided
a.cc:35:12: error: no matching function for call to 'find(<unresolved overloaded function type>, std::vector<int>::iterator, std::array<int, 3>::value_type&)'
   35 |        find(v.begin, v.end(), row[1][0]) != v.end() &&
      |        ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14