Language: C++

#include<string>
using namespace std;
int main(){
  int n = 9, c, p = 0;
  int b[c];
  int a[n];
  for(int i = 0; i < 9; i++){
      cin >> a[i];
  }
  cin >> c;
  for(int i = 0; i < c; i++){
    cin >> b[i];
  }
  for(int i = 0; i < 9; i++){
    for(int j = 0; j < c; j++){
      if(a[i] == b[j]){
        a[i] = 1;
        break;
      }
      if(i == c - 1){
      a[i] = 0;
      }
    }
  }
  if(a[4] == 1){
    if(a[0] == 1 && a[8] == 1){
      cout << "Yes\n";
      p = 1;
    }
    if(a[1] == 1 && a[7] == 1){
      cout << "Yes\n";
      p = 1;
    }
    else if(a[2] == 1 && a[6] == 1){
      cout << "Yes\n";
      p = 1;
    }
    else if(a[3] == 1 && a[5] == 1){
      cout << "Yes\n";
      p = 1;
    }
  }
  if(p == 0){
  if(a[0] == 1 && a[1] == 1 && a[2] == 1){
    cout << "Yes\n";
      p = 1;
  }
  else if(a[6] == 1 && a[7] == 1 && a[8] == 1){
    cout << "Yes\n";
      p = 1;
  }
  else if(a[0] == 1 && a[3] == 1 && a[6] == 1){
    cout << "Yes\n";
      p = 1;
  }
  else if(a[2] == 1 && a[5] == 1 && a[8] == 1){
    cout << "Yes\n";
      p = 1;
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:8:7: error: 'cin' was not declared in this scope
    8 |       cin >> a[i];
      |       ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include<string>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:10:3: error: 'cin' was not declared in this scope
   10 |   cin >> c;
      |   ^~~
a.cc:10:3: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:27:7: error: 'cout' was not declared in this scope
   27 |       cout << "Yes\n";
      |       ^~~~
a.cc:27:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:31:7: error: 'cout' was not declared in this scope
   31 |       cout << "Yes\n";
      |       ^~~~
a.cc:31:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:35:7: error: 'cout' was not declared in this scope
   35 |       cout << "Yes\n";
      |       ^~~~
a.cc:35:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:39:7: error: 'cout' was not declared in this scope
   39 |       cout << "Yes\n";
      |       ^~~~
a.cc:39:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:45:5: error: 'cout' was not declared in this scope
   45 |     cout << "Yes\n";
      |     ^~~~
a.cc:45:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:49:5: error: 'cout' was not declared in this scope
   49 |     cout << "Yes\n";
      |     ^~~~
a.cc:49:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:53:5: error: 'cout' was not declared in this scope
   53 |     cout << "Yes\n";
      |     ^~~~
a.cc:53:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:57:5: error: 'cout' was not declared in this scope
   57 |     cout << "Yes\n";
      |     ^~~~
a.cc:57:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:59:4: error: expected '}' at end of input
   59 |   }
      |    ^
a.cc:43:13: note: to match this '{'
   43 |   if(p == 0){
      |             ^
a.cc:59:4: error: expected '}' at end of input
   59 |   }
      |    ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^