Language: C++

#include<iostream>
#include<algorithm>
#include<string>
#include<vector>
#include<queue>
#include<map>
#include<cstdio>
#include<cstdlib>
#include<cstring>
using namespace std;

int n,m;
int d[222222];
int t[222222];

int judge(int dd);

int main(){
  ios_base::sync_with_stdio(false);

  int f = 1;

  cin >> n;
  for(int i=0;i<n;i++){
    cin >> d[i];  
  }   

  cin >> m;
  for(int i=0;i<m;i++){
    cin >> t[i];
  }

  sort(d, d+n); 
  sort(t, t+m);
  
  int cnt = 0;
  for(int i=0;i<m;i++){
    while(true){
      if(cnt == n)break;
      if(d[cnt] == t[i]){
        if(cnt != n-1)cnt++;
        break;
      }
      cnt++;
    }
    if(cnt>=n){
      cout << "NO" << endl;
      return 0;
    }
  }
  
  cout << "YES" << endl; 

  return 0;
}

int judge(int dd){
  int ok = 0;
  int ng = n;
  int mid;

  while(ng - ok > 1){
    mid = (ok + ng) / 2;
    if(d[mid] > dd){
      ng = mid;
    } else {
      ok = mid;
    }
  }
  
  if(d[ok] == dd){
    d[ok] = 0;
    sort(d, d+n); 
    return 1;
  }
  return 0;
}#include<iostream>
#include<algorithm>
#include<string>
#include<vector>
#include<queue>
#include<map>
#include<cstdio>
#include<cstdlib>
#include<cstring>
using namespace std;

int n,m;
int d[222222];
int t[222222];

int judge(int dd);

int main(){
  ios_base::sync_with_stdio(false);

  int f = 1;

  cin >> n;
  for(int i=0;i<n;i++){
    cin >> d[i];  
  }   

  cin >> m;
  for(int i=0;i<m;i++){
    cin >> t[i];
  }

  sort(d, d+n); 
  sort(t, t+m);
  
  int cnt = 0;
  for(int i=0;i<m;i++){
    while(true){
      if(cnt == n)break;
      if(d[cnt] == t[i]){
        if(cnt != n-1)cnt++;
        break;
      }
      cnt++;
    }
    if(cnt>=n){
      cout << "NO" << endl;
      return 0;
    }
  }
  
  cout << "YES" << endl; 

  return 0;
}

int judge(int dd){
  int ok = 0;
  int ng = n;
  int mid;

  while(ng - ok > 1){
    mid = (ok + ng) / 2;
    if(d[mid] > dd){
      ng = mid;
    } else {
      ok = mid;
    }
  }
  
  if(d[ok] == dd){
    d[ok] = 0;
    sort(d, d+n); 
    return 1;
  }
  return 0;
}

Compiler output:
a.cc:77:2: error: stray '#' in program
   77 | }#include<iostream>
      |  ^
a.cc:77:3: error: 'include' does not name a type
   77 | }#include<iostream>
      |   ^~~~~~~
a.cc:88:5: error: redefinition of 'int n'
   88 | int n,m;
      |     ^
a.cc:12:5: note: 'int n' previously declared here
   12 | int n,m;
      |     ^
a.cc:88:7: error: redefinition of 'int m'
   88 | int n,m;
      |       ^
a.cc:12:7: note: 'int m' previously declared here
   12 | int n,m;
      |       ^
a.cc:89:5: error: redefinition of 'int d [222222]'
   89 | int d[222222];
      |     ^
a.cc:13:5: note: 'int d [222222]' previously declared here
   13 | int d[222222];
      |     ^
a.cc:90:5: error: redefinition of 'int t [222222]'
   90 | int t[222222];
      |     ^
a.cc:14:5: note: 'int t [222222]' previously declared here
   14 | int t[222222];
      |     ^
a.cc:94:5: error: redefinition of 'int main()'
   94 | int main(){
      |     ^~~~
a.cc:18:5: note: 'int main()' previously defined here
   18 | int main(){
      |     ^~~~
a.cc:133:5: error: redefinition of 'int judge(int)'
  133 | int judge(int dd){
      |     ^~~~~
a.cc:57:5: note: 'int judge(int)' previously defined here
   57 | int judge(int dd){
      |     ^~~~~