Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

bool check(int a,vec<int> vec) {
  bool ok = false;
  for (int i = 0;i<vec.size();i++) {
    if (a==vec.at(i)) ok = true;
  }
  return ok;
}

int main() {
  int aa,ab,ac,ba,bb,bc,ca,cb,cc;
  cin >> aa >> ab >> ac >> ba >> bb >> bc >> ca >> cb >> cc;
  int N;
  cin >> N;
  vector<int> vec;
  for (int i = 0;i<N;i++) {
    cin >> vec.at(i);
  }
  
  bool ans = false;
  bool AA = check(aa,vec);
  bool AB = check(ab,vec);
  bool AA = check(ac,vec);
  bool BA = check(ba,vec);
  bool BB = check(bb,vec);
  bool BC = check(bc,vec);
  bool CA = check(ca,vec);
  bool CB = check(cb,vec);
  bool CC = check(cc,vec);
  
  if (AA & AB & AC) ans = true;
  if (BA & BB & BC) ans = true;
  if (CA & CB & CC) ans = true;
  if (AA & BA & CA) ans = true;
  if (BA & BB & BC) ans = true;
  if (CA & CB & CC) ans = true;
  if (AA & BB & CC) ans = true;
  if (AC & BB & CA) ans = true;
  if (ans) cout << "Yes" << endl;
  else cout << "No" << endl;
  

}



Compiler output:
a.cc:5:18: error: 'vec' has not been declared
    5 | bool check(int a,vec<int> vec) {
      |                  ^~~
a.cc:5:21: error: expected ',' or '...' before '<' token
    5 | bool check(int a,vec<int> vec) {
      |                     ^
a.cc: In function 'bool check(int, int)':
a.cc:7:20: error: 'vec' was not declared in this scope
    7 |   for (int i = 0;i<vec.size();i++) {
      |                    ^~~
a.cc: In function 'int main()':
a.cc:24:22: error: cannot convert 'std::vector<int>' to 'int'
   24 |   bool AA = check(aa,vec);
      |                      ^~~
      |                      |
      |                      std::vector<int>
a.cc:5:18: note:   initializing argument 2 of 'bool check(int, int)'
    5 | bool check(int a,vec<int> vec) {
      |                  ^~~
a.cc:25:22: error: cannot convert 'std::vector<int>' to 'int'
   25 |   bool AB = check(ab,vec);
      |                      ^~~
      |                      |
      |                      std::vector<int>
a.cc:5:18: note:   initializing argument 2 of 'bool check(int, int)'
    5 | bool check(int a,vec<int> vec) {
      |                  ^~~
a.cc:26:8: error: redeclaration of 'bool AA'
   26 |   bool AA = check(ac,vec);
      |        ^~
a.cc:24:8: note: 'bool AA' previously declared here
   24 |   bool AA = check(aa,vec);
      |        ^~
a.cc:26:22: error: cannot convert 'std::vector<int>' to 'int'
   26 |   bool AA = check(ac,vec);
      |                      ^~~
      |                      |
      |                      std::vector<int>
a.cc:5:18: note:   initializing argument 2 of 'bool check(int, int)'
    5 | bool check(int a,vec<int> vec) {
      |                  ^~~
a.cc:27:22: error: cannot convert 'std::vector<int>' to 'int'
   27 |   bool BA = check(ba,vec);
      |                      ^~~
      |                      |
      |                      std::vector<int>
a.cc:5:18: note:   initializing argument 2 of 'bool check(int, int)'
    5 | bool check(int a,vec<int> vec) {
      |                  ^~~
a.cc:28:22: error: cannot convert 'std::vector<int>' to 'int'
   28 |   bool BB = check(bb,vec);
      |                      ^~~
      |                      |
      |                      std::vector<int>
a.cc:5:18: note:   initializing argument 2 of 'bool check(int, int)'
    5 | bool check(int a,vec<int> vec) {
      |                  ^~~
a.cc:29:22: error: cannot convert 'std::vector<int>' to 'int'
   29 |   bool BC = check(bc,vec);
      |                      ^~~
      |                      |
      |                      std::vector<int>
a.cc:5:18: note:   initializing argument 2 of 'bool check(int, int)'
    5 | bool check(int a,vec<int> vec) {
      |                  ^~~
a.cc:30:22: error: cannot convert 'std::vector<int>' to 'int'
   30 |   bool CA = check(ca,vec);
      |                      ^~~
      |                      |
      |                      std::vector<int>
a.cc:5:18: note:   initializing argument 2 of 'bool check(int, int)'
    5 | bool check(int a,vec<int> vec) {
      |                  ^~~
a.cc:31:22: error: cannot convert 'std::vector<int>' to 'int'
   31 |   bool CB = check(cb,vec);
      |                      ^~~
      |                      |
      |                      std::vector<int>
a.cc:5:18: note:   initializing argument 2 of 'bool check(int, int)'
    5 | bool check(int a,vec<int> vec) {
      |                  ^~~
a.cc:32:22: error: cannot convert 'std::vector<int>' to 'int'
   32 |   bool CC = check(cc,vec);
      |                      ^~~
      |                      |
      |                      std::vector<int>
a.cc:5:18: note:   initializing argument 2 of 'bool check(int, int)'
    5 | bool check(int a,vec<int> vec) {
      |                  ^~~
a.cc:34:17: error: 'AC' was not declared in this scope; did you mean 'CC'?
   34 |   if (AA & AB & AC) ans = true;
      |                 ^~
      |                 CC
a.cc:41:7: error: 'AC' was not declared in this scope; did you mean 'CC'?
   41 |   if (AC & BB & CA) ans = true;
      |       ^~
      |       CC