Language: C++

#include <bits/stdc++.h>
#include <math.h>
using namespace std;
#define rep(i,n) for(int i = 0; i < (int) (n); i++)
#define ll long long
ll INF=9e17;

bool is_palindrome(string s){
    string t(s.rbegin(),s.rend());
    return s == t;
}
 
int main(){
    int a[3][3];
    rep(i,3) rep(j,3) cin >> a[i][j];
    int n; cin >> n;
    int b[n];
    rep(i,n) cin >> b[i];
    vector<vector<bool>> aa(3,vector<bool> 3,false);
    rep(i,3){
    	rep(j,3) rep(k,n) {
    	if(a[i][j]==b[k]) aa[i][j] = true; goto H;
    	}
    	H:
    }
    book ok = false;
    if(aa[0][0]&&aa[0][1]&&aa[0][2]) ok = true;
    else if(aa[1][0]&&aa[1][1]&&aa[1][2]) ok = true;
    else if(aa[2][0]&&aa[2][1]&&aa[2][2]) ok = true;
    else if(aa[0][0]&&aa[1][0]&&aa[2][0]) ok = true;
    else if(aa[0][0]&&aa[1][0]&&aa[2][0]) ok = true;
    else if(aa[0][1]&&aa[1][1]&&aa[2][1]) ok = true;
    else if(aa[0][2]&&aa[1][2]&&aa[2][2]) ok = true;
    else if(aa[0][0]&&aa[1][1]&&aa[2][2]) ok = true;
    else if(aa[0][2]&&aa[1][1]&&aa[2][0]) ok = true;
    if(ok) cout << "Yes" << endl;
    else cout << "No" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:44: error: expected primary-expression before numeric constant
   19 |     vector<vector<bool>> aa(3,vector<bool> 3,false);
      |                                            ^
a.cc:25:5: warning: label at end of compound statement only available with '-std=c++2b' or '-std=gnu++2b' [-Wc++23-extensions]
   25 |     }
      |     ^
a.cc:26:5: error: 'book' was not declared in this scope; did you mean 'bool'?
   26 |     book ok = false;
      |     ^~~~
      |     bool
a.cc:27:38: error: 'ok' was not declared in this scope
   27 |     if(aa[0][0]&&aa[0][1]&&aa[0][2]) ok = true;
      |                                      ^~
a.cc:28:43: error: 'ok' was not declared in this scope
   28 |     else if(aa[1][0]&&aa[1][1]&&aa[1][2]) ok = true;
      |                                           ^~
a.cc:29:43: error: 'ok' was not declared in this scope
   29 |     else if(aa[2][0]&&aa[2][1]&&aa[2][2]) ok = true;
      |                                           ^~
a.cc:30:43: error: 'ok' was not declared in this scope
   30 |     else if(aa[0][0]&&aa[1][0]&&aa[2][0]) ok = true;
      |                                           ^~
a.cc:31:43: error: 'ok' was not declared in this scope
   31 |     else if(aa[0][0]&&aa[1][0]&&aa[2][0]) ok = true;
      |                                           ^~
a.cc:32:43: error: 'ok' was not declared in this scope
   32 |     else if(aa[0][1]&&aa[1][1]&&aa[2][1]) ok = true;
      |                                           ^~
a.cc:33:43: error: 'ok' was not declared in this scope
   33 |     else if(aa[0][2]&&aa[1][2]&&aa[2][2]) ok = true;
      |                                           ^~
a.cc:34:43: error: 'ok' was not declared in this scope
   34 |     else if(aa[0][0]&&aa[1][1]&&aa[2][2]) ok = true;
      |                                           ^~
a.cc:35:43: error: 'ok' was not declared in this scope
   35 |     else if(aa[0][2]&&aa[1][1]&&aa[2][0]) ok = true;
      |                                           ^~
a.cc:36:8: error: 'ok' was not declared in this scope
   36 |     if(ok) cout << "Yes" << endl;
      |        ^~