criyle/codenet-compile-errors huggingface dataset:
Language: C++

#define _GLIBCXX_DEBUG
#include<algorithm>
#include<cmath>
#include<cstring>
#include<cstdio>
#include<iostream>
#include<vector>
#include<queue>
#include<deque>
#include<stack>
#include<set>
#include<map>
#include<string>
#include <bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < (int)n; i++)
#define rep2(i,s,n) for(int i=s;i< (int)n; i++)
#define ll long long 
#define all(v) v.begin(),v.end()
using namespace std;
int main(){
  int n,m; 
  cin>>n;
  vector<int> d(n);
  rep(i,n)cin >>d[i];
  cin >>m;
  vector<int> t(m);
  rep(i,m)cin >>t[i];
  sort(all(d));
  sort(all(t));
  map<ll> mpd;
  map<ll> mpt;
  rep(i,n) mpd[d[i]]++;
  rep(i,m) mpt[t[i]]++;
  rep(i,m){
    if(mpt[t[i]]>mp[d[i]]){
      cout <<"NO"<<endl;
      return;
    }
  }
  cout <<"YES"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:9: error: wrong number of template arguments (1, should be at least 2)
   30 |   map<ll> mpd;
      |         ^
In file included from /usr/include/c++/14/map:69,
                 from a.cc:12:
/usr/include/c++/14/debug/map:37:11: note: provided for 'template<class _Key, class _Tp, class _Cmp, class _Allocator> class std::__debug::map'
   37 |     class map;
      |           ^~~
a.cc:31:9: error: wrong number of template arguments (1, should be at least 2)
   31 |   map<ll> mpt;
      |         ^
/usr/include/c++/14/debug/map:37:11: note: provided for 'template<class _Key, class _Tp, class _Cmp, class _Allocator> class std::__debug::map'
   37 |     class map;
      |           ^~~
a.cc:32:15: error: invalid types 'int[__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type {aka int}]' for array subscript
   32 |   rep(i,n) mpd[d[i]]++;
      |               ^
a.cc:33:15: error: invalid types 'int[__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type {aka int}]' for array subscript
   33 |   rep(i,m) mpt[t[i]]++;
      |               ^
a.cc:35:11: error: invalid types 'int[__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type {aka int}]' for array subscript
   35 |     if(mpt[t[i]]>mp[d[i]]){
      |           ^
a.cc:35:18: error: 'mp' was not declared in this scope; did you mean 'mpt'?
   35 |     if(mpt[t[i]]>mp[d[i]]){
      |                  ^~
      |                  mpt
a.cc:37:7: error: return-statement with no value, in function returning 'int' [-fpermissive]
   37 |       return;
      |       ^~~~~~
Language: C++

#define _GLIBCXX_DEBUG
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define repn(i,x) for(int i = 1; i <= x; i++)
#define SORT(x) sort(x.begin(),x.end())
#define dupl(s) s.erase(unique(s.begin(), s.end()), s.end());//重複取り除き
#include <bits/stdc++.h>
using namespace std;
int sum(vector<int> s){return accumulate(s.begin(),s.end(),0);}
void p(vector<int> A){rep(i,A.size()){cout << A[i] << " ";}cout << "\n";}

int main(){
    int n,m;
    cin >> n;
    map<int,int> ld;
    rep(i,n){
        int d;
        cin >> d;
        ld[d]++;
    }
    cin >> m;
    rep(i,m){
        int t;
        cin >> t;
        if(ld[t] > 0)l[t]--;
        else{cout << "NO";return 0;}
    }
    cout << "YES";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:22: error: 'l' was not declared in this scope
   24 |         if(ld[t] > 0)l[t]--;
      |                      ^
Language: C++

#include <iostream>
#include <cmath>
#include <climits>
#include <string>
#include <numeric>
#include <vector>
#include <queue>
#include <map>
#include <algorithm>
#include <functional>
#include <iomanip>
#include <set>

using namespace std;
using ll = long long;

template<typename T> void print(T t) { cout << t << endl; }

int main() {
	int N, M, D, T;
	cin >> N;
	multiset<int> dset;
	for (int i = 0; i < N; i++) {
		cin >> D;
		dset.insert(D);
	}
	
	cin >> M;
	for (int i = 0; i < M; i++) {
		cin >> T;
		auto itr = dset.find(T);
		if (itr == dset.end()) 

Compiler output:
a.cc: In function 'int main()':
a.cc:32:39: error: expected statement at end of input
   32 |                 if (itr == dset.end())
      |                                       ^
a.cc:32:39: error: expected '}' at end of input
a.cc:29:37: note: to match this '{'
   29 |         for (int i = 0; i < M; i++) {
      |                                     ^
a.cc:32:39: error: expected '}' at end of input
   32 |                 if (itr == dset.end())
      |                                       ^
a.cc:19:12: note: to match this '{'
   19 | int main() {
      |            ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
map<int, int> mp;
int main() {
  int n; cin >> n;
  for(int i = 0; i < n; i++) {
    int d; cin >> d;
    mp[d]++;
  }
  int m; cin >> m;
  bool ok = true;
  for(int i = 0; i < m; i++) {
    int t; cin >> t;
    mp[t]--;
    if(mp[t] < 0) ok = false;
  }
  if(ok) cout << "Yes" << endl;
  else cout << "No" << endl;
}
#include<bits/stdc++.h>
using namespace std;
map<int, int> mp;
int main() {
  int n; cin >> n;
  for(int i = 0; i < n; i++) {
    int d; cin >> d;
    mp[d]++;
  }
  int m; cin >> m;
  bool ok = true;
  for(int i = 0; i < m; i++) {
    int t; cin >> t;
    mp[t]--;
    if(mp[t] < 0) ok = false;
  }
  if(ok) cout << "YES" << endl;
  else cout << "NO" << endl;
}


Compiler output:
a.cc:22:15: error: redefinition of 'std::map<int, int> mp'
   22 | map<int, int> mp;
      |               ^~
a.cc:3:15: note: 'std::map<int, int> mp' previously declared here
    3 | map<int, int> mp;
      |               ^~
a.cc:23:5: error: redefinition of 'int main()'
   23 | int main() {
      |     ^~~~
a.cc:4:5: note: 'int main()' previously defined here
    4 | int main() {
      |     ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
using ll = long long;
using Graph = vector<vector<int>>;
const ll mod=1000000007;
const int MAX_N = 1000;         // n の最大値
 
// nCk を取得
double nCk(int n, int k) {
double res=1.0;
for(int i=0; i<n; i++){
res*=0.5;}
for(int i=0; i<k; i++){
res*=(double)(n-i);
res/=(double)(k-i);
}
return res;}
 
int main() {
ll n;
cin>>n;
map<ll> a;
ll r;
for(ll i=0; i<n; i++){
cin>>r;
a[r]++;}
ll m;
cin>>m;
map<ll> b;
for(ll i=0; i<m; i++){
cin>>r;
b[r]++;}
ll k=0;
for(auto p:b){
if(b[p.first]<a[p.first]){
k++;
break;}}
if(k==1){
cout << "YES" << endl;}
else{
cout << "NO" << endl;}}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:7: error: wrong number of template arguments (1, should be at least 2)
   22 | map<ll> a;
      |       ^
In file included from /usr/include/c++/14/map:63,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:152,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_map.h:102:11: note: provided for 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map'
  102 |     class map
      |           ^~~
a.cc:26:2: error: invalid types 'int[ll {aka long long int}]' for array subscript
   26 | a[r]++;}
      |  ^
a.cc:29:7: error: wrong number of template arguments (1, should be at least 2)
   29 | map<ll> b;
      |       ^
/usr/include/c++/14/bits/stl_map.h:102:11: note: provided for 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map'
  102 |     class map
      |           ^~~
a.cc:32:2: error: invalid types 'int[ll {aka long long int}]' for array subscript
   32 | b[r]++;}
      |  ^
a.cc:34:12: error: 'begin' was not declared in this scope
   34 | for(auto p:b){
      |            ^
a.cc:34:12: note: suggested alternatives:
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:166:
/usr/include/c++/14/valarray:1238:5: note:   'std::begin'
 1238 |     begin(const valarray<_Tp>& __va) noexcept
      |     ^~~~~
In file included from /usr/include/c++/14/filesystem:53,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:200:
/usr/include/c++/14/bits/fs_dir.h:608:3: note:   'std::filesystem::__cxx11::begin'
  608 |   begin(recursive_directory_iterator __iter) noexcept
      |   ^~~~~
a.cc:34:12: error: 'end' was not declared in this scope
   34 | for(auto p:b){
      |            ^
a.cc:34:12: note: suggested alternatives:
/usr/include/c++/14/valarray:1265:5: note:   'std::end'
 1265 |     end(const valarray<_Tp>& __va) noexcept
      |     ^~~
/usr/include/c++/14/bits/fs_dir.h:613:3: note:   'std::filesystem::__cxx11::end'
  613 |   end(recursive_directory_iterator) noexcept
      |   ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(ll i=0;i<n;i++)
#define repl(i,l,r) for(ll i=(l);i<(r);i++)
#define per(i,n) for(ll i=n-1;i>=0;i--)
#define perl(i,r,l) for(ll i=r-1;i>=l;i--)
#define fi first
#define se second
#define pb push_back
#define ins insert
#define pqueue(x) priority_queue<x,vector<x>,greater<x>>
#define all(x) (x).begin(),(x).end()
#define CST(x) cout<<fixed<<setprecision(x)
#define vtpl(x,y,z) vector<tuple<x,y,z>>
#define rev(x) reverse(x);
using ll=long long;
using vl=vector<ll>;
using vvl=vector<vector<ll>>;
using pl=pair<ll,ll>;
using vpl=vector<pl>;
using vvpl=vector<vpl>;
const ll MOD=1000000007;
const ll MOD9=998244353;
const int inf=1e9+10;
const ll INF=4e18;
const ll dy[8]={1,0,-1,0,1,1,-1,-1};
const ll dx[8]={0,-1,0,1,1,-1,1,-1};
template<class T> inline bool chmin(T& a, T b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;
}
template<class T> inline bool chmax(T& a, T b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}
int main(){
    ll n;cin >> n;
    map<ll,ll> mp;
    rep(i,n){
        ll a;cin >> a;mp[a]++;
    }
    ll m;cin >> m;
    bool check=true;
    rep(i,m){
        ll b;cin >> b;
        if(mp[b]<=0)check=false;
        mp[b]--;
    }
    cout << (check? "Yes":"No") <<endl;
}
\

Compiler output:
a.cc:57:1: error: stray '\' in program
   57 | \
      | ^
Language: C++

#include <iostream>
#include <map>
#include <vector>
using namespace std;

int main(){
  int n, m;
  map<int, int> problems;
  vector<int> yosen(m);
  vector<bool> 
  cin >> n;
  for(int i=0; i<n; i++){
    int num;
    cin >> num;
    problems[num]++;
  }
  cin >> m;
  for(int i=0; i<m; i++){
    int num;
    cin >> num;
    if(problems[num] == 0){
      cout << "NO" << endl;
      return 0;
    }else{
      problems[num]--;
    }
  }
  cout << "YES" << endl;
  return 0;
}
  
  


Compiler output:
a.cc: In function 'int main()':
a.cc:11:7: error: expected initializer before '>>' token
   11 |   cin >> n;
      |       ^~
Language: C++

#include <iostream>
#include <map>
#include <vector>
using namespace std;

int main(){
  int n, m;
  map<int, int> problems;
  vector<int> yosen(m);
  vector<bool> 
  cin >> n;
  rep(i, n){
    int num;
    cin >> num;
    problems[num]++;
  }
  cin >> m;
  rep(i, m){
    int num;
    cin >> num;
    if(problems[num] == 0){
      cout << "NO" << endl;
      return 0;
    }else{
      problems[num]--;
    }
  }
  cout << "YES" << endl;
  return 0;
}
  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:11:7: error: expected initializer before '>>' token
   11 |   cin >> n;
      |       ^~
a.cc:12:7: error: 'i' was not declared in this scope
   12 |   rep(i, n){
      |       ^
a.cc:12:3: error: 'rep' was not declared in this scope
   12 |   rep(i, n){
      |   ^~~
Language: C++

#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
using namespace std;
int main() {

	
	int N, D[1000], M, T[1000];

	cin >> N;
	for (int i = 0; i < N; i++) {
		cin >> D[i];
	}
	cin >> M;
	for (int j = 0; j < M; j++) {
		cin >> T[j];
	}
	int cnt = 0;
	for (int i = 0; i < N; i++) {
		for (int j = 0; i < M + i++) {
			if (D[i] == T[i]) {
				cnt++;
			}
		}
	}
	if (cnt == M) {
		cout << "YES" << endl;

	}
	else {
		cout << "NO" << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:44: error: expected ';' before ')' token
   21 |                 for (int j = 0; i < M + i++) {
      |                                            ^
      |                                            ;
Language: C++

#include<iostream>
#include <map>

using namespace std;

int main(){
  int n;
  map<int,int>mp;
  cin >> n;
  while(n--){
    int i;
    cin >> i;
    mp[i]++;
  }
  cin >> n;
  while(n--){
    int i;
    cin >> i;
    if(mp[i]==0){
      cout << "NO" << endl;
      return 0;
    }
    mp[i]--;
  }
  cout << "YES" << endl;
}
}

Compiler output:
a.cc:27:1: error: expected declaration before '}' token
   27 | }
      | ^
Language: C++

#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <iomanip>
using namespace std;
typedef __int64 LL;
//typedef long long int LL;
typedef pair<int,int> P;
//typedef pair<LL,LL> PL;

const int MOD=1000000007;
int d[200010],t[200010];
map<int,int>mpd,mpt;
int main()
{
	string ans="YES";
	int n,m;
	cin>>n;
	for(int i=0;i<n;i++)
	{
		cin>>d[i];
		mpd[d[i]]++;
	}
	cin>>m;
	for(int i=0;i<m;i++)
	{
		cin>>t[i];
		mpt[t[i]]++;
	}
	
	for(int i=0;i<m;i++)
	{
		int x=t[i];
		if(mpd[x]<mpt[x]){ans="NO";break;}
	}
	cout<<ans<<"\n";
	return 0;
}

Compiler output:
a.cc:14:9: error: '__int64' does not name a type; did you mean '__int64_t'?
   14 | typedef __int64 LL;
      |         ^~~~~~~
      |         __int64_t
Language: C++

#include <iostream>
#include <map>

using namespace std;

int A;
int a[100010];
int B;
int b[100010];
map <int, int> mpa, mpb;

int main() {
    int i;

    cin >> A;
    for (i=0;i<A;i++) scanf("%d", &a[i]);
    cin >> B;
    for (i=0;i<B;i++) scanf("%d", &b[i]);

    for (i=0;i<A;i++) mpa[a[i]]++;
    for (i=0;i<B;i++) mpb[b[i]]++;

    for (i=0;i<B;i++) {
        int x = b[i];
        if (mpb[x] > mpa[x]) {
            cout << "NO";
            return 0;
        }
    }
    cout << "YES" << endl;

    return 0
}


Compiler output:
a.cc: In function 'int main()':
a.cc:32:13: error: expected ';' before '}' token
   32 |     return 0
      |             ^
      |             ;
   33 | }
      | ~
Language: C++

#include <bits/stdc++.h>
#include <algorithm>
#define rep(i, n) for (long long i = 0; i < (long long)(n); i++)
#define UNIQUE(v) v.erase( unique(v.begin(), v.end()), v.end() );

using namespace std;

// long long gcd(long long a, long long b){
//     if (a < b){
//         a ^= b;
//         b ^= a;
//         a ^= b;
//     }
//     return b ? gcd(b, a % b) : a;
// }

// long long lcm(long long a, long long b){
//     return a * b / gcd(a, b);
// }

int main(){
    long long n,d[200001],m,t[200001];
    map<long long, long long> mpd,mpt;
    cin >> n;
    rep(i,n){
        cin >> d[i];
        mpd[d[i]]++;
    }
    cin >> m;
    rep(i,m){
        cin >> t[i];
        mpt[t[i]]++;
    }
    
    rep(i,m){
        if(mpb[t[i]] > mpd[t[i]]){
            cout << "NO" << endl;
            return 0;
        }
    }
    cout << "YES" << endl;
    
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:36:12: error: 'mpb' was not declared in this scope; did you mean 'mpt'?
   36 |         if(mpb[t[i]] > mpd[t[i]]){
      |            ^~~
      |            mpt
Language: C++

#include <bits/stdc++.h>
#include <algorithm>
#define rep(i, n) for (long long i = 0; i < (long long)(n); i++)
#define UNIQUE(v) v.erase( unique(v.begin(), v.end()), v.end() );

using namespace std;

// long long gcd(long long a, long long b){
//     if (a < b){
//         a ^= b;
//         b ^= a;
//         a ^= b;
//     }
//     return b ? gcd(b, a % b) : a;
// }

// long long lcm(long long a, long long b){
//     return a * b / gcd(a, b);
// }

int main(){
    long long n,d[200001],m,t[200001];
    map<long long> mpd,mpt;
    cin >> n;
    rep(i,n){
        cin >> d[i];
        mpd[d[i]]++;
    }
    cin >> m;
    rep(i,m){
        cin >> t[i];
        mpt[t[i]]++;
    }
    
    rep(i,m){
        if(mpb[t[i]] > mpd[t[i]]){
            cout << "NO" << endl;
            return 0;
        }
    }
    cout << "YES" << endl;
    
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:18: error: wrong number of template arguments (1, should be at least 2)
   23 |     map<long long> mpd,mpt;
      |                  ^
In file included from /usr/include/c++/14/map:63,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:152,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_map.h:102:11: note: provided for 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map'
  102 |     class map
      |           ^~~
a.cc:27:12: error: invalid types 'int[long long int]' for array subscript
   27 |         mpd[d[i]]++;
      |            ^
a.cc:32:12: error: invalid types 'int[long long int]' for array subscript
   32 |         mpt[t[i]]++;
      |            ^
a.cc:36:12: error: 'mpb' was not declared in this scope; did you mean 'mpt'?
   36 |         if(mpb[t[i]] > mpd[t[i]]){
      |            ^~~
      |            mpt
a.cc:36:27: error: invalid types 'int[long long int]' for array subscript
   36 |         if(mpb[t[i]] > mpd[t[i]]){
      |                           ^
Language: C++

#include <bits/stdc++.h>
#include <algorithm>
#define rep(i, n) for (long long i = 0; i < (long long)(n); i++)
#define UNIQUE(v) v.erase( unique(v.begin(), v.end()), v.end() );

using namespace std;

// long long gcd(long long a, long long b){
//     if (a < b){
//         a ^= b;
//         b ^= a;
//         a ^= b;
//     }
//     return b ? gcd(b, a % b) : a;
// }

// long long lcm(long long a, long long b){
//     return a * b / gcd(a, b);
// }

int main(){
    long long n,d[200001],m,t[200001];
    map<long long> mpd,mpt;
    cin >> n;
    rep(i,n){
        cin >> d[i];
        mpd[d[i]]++;
    }
    cin >> m;
    rep(i,m){
        cin >> t[i];
        mpt[t[i]]++
    }
    
    rep(i,m){
        if(mpb[t[i]] > mpd[t[i]]){
            cout << "NO" << endl;
            return 0;
        }
    }
    cout << "YES" << endl;
    
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:18: error: wrong number of template arguments (1, should be at least 2)
   23 |     map<long long> mpd,mpt;
      |                  ^
In file included from /usr/include/c++/14/map:63,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:152,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_map.h:102:11: note: provided for 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map'
  102 |     class map
      |           ^~~
a.cc:27:12: error: invalid types 'int[long long int]' for array subscript
   27 |         mpd[d[i]]++;
      |            ^
a.cc:32:12: error: invalid types 'int[long long int]' for array subscript
   32 |         mpt[t[i]]++
      |            ^
a.cc:36:12: error: 'mpb' was not declared in this scope; did you mean 'mpt'?
   36 |         if(mpb[t[i]] > mpd[t[i]]){
      |            ^~~
      |            mpt
a.cc:36:27: error: invalid types 'int[long long int]' for array subscript
   36 |         if(mpb[t[i]] > mpd[t[i]]){
      |                           ^
Language: C++

n=int(input())
d=list(map(int,input().split()))
d=sorted(d)
m=int(input())
t=list(map(int,input().split()))
t=sorted(t)
flag=True 
if n<m:
    flag=False
else:
    t_num=[] #tの数字の内訳
    bef=t[0]
    ren=1
    for i in range(1,m):
        if bef!=t[i]:
            t_num.append([bef,ren])
            bef=t[i]
            ren=1
        else:
            ren+=1
    t_num.append([bef,ren])
    kind=len(t_num)
    
    
    now=0
    ren=0
    for i in range(n):
        if t_num[now][0]==d[i]:
            ren+=1
        else: 
            if ren!=0: #カウントしてる途中で切り替わる
                if t_num[now][1]<=ren:
                    now+=1
                    ren=0
                    if kind==now: #ok
                        break
                    if t_num[now][0]==d[i]:
                        ren+=1
                else:
                    flag=False
                    break
        #print(ren)
        #print(t_num[now][0])
    if ren!=0: #カウントしてる途中で終わる
        if t_num[now][1]<=ren:
            now+=1
    if now<kind: #ng
        flag=False
print("YES" if flag else "NO")

Compiler output:
a.cc:11:14: error: stray '#' in program
   11 |     t_num=[] #tの数字の内訳
      |              ^
a.cc:31:24: error: stray '#' in program
   31 |             if ren!=0: #カウントしてる途中で切り替わる
      |                        ^
a.cc:35:35: error: stray '#' in program
   35 |                     if kind==now: #ok
      |                                   ^
a.cc:42:10: error: invalid preprocessing directive #print
   42 |         #print(ren)
      |          ^~~~~
a.cc:43:10: error: invalid preprocessing directive #print
   43 |         #print(t_num[now][0])
      |          ^~~~~
a.cc:44:16: error: stray '#' in program
   44 |     if ren!=0: #カウントしてる途中で終わる
      |                ^
a.cc:47:18: error: stray '#' in program
   47 |     if now<kind: #ng
      |                  ^
a.cc:1:1: error: 'n' does not name a type
    1 | n=int(input())
      | ^
Language: C++

#include <iostream>
#include <map>
using namespace std;
int A; int a [100010];
int B;
int b[100010];
map <int , int> mpa,mpb;
int main( void ){
  int i;
  cin >> A; for ( i =0;i<A; i++) scanf("%d" , &a [ i ])
cin >> B;
for ( i =0;i<B; i++) scanf("%d" , &b[ i ] );
for ( i =0;i<A; i++) mpa[ a [ i ]]++;
for ( i =0;i<B; i++) mpb[b[ i ]]++;
for ( i =0;i<B; i++){ 
  int x = b[ i ] ;
  if (mpb[x] > mpa[x]){ cout << "NO" << endl ; return 0; } }
cout << "YES" << endl ;
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:56: error: expected ';' before 'cin'
   10 |   cin >> A; for ( i =0;i<A; i++) scanf("%d" , &a [ i ])
      |                                                        ^
      |                                                        ;
   11 | cin >> B;
      | ~~~
Language: C++

#include "bits/stdc++.h"
#define ALL(x) x.begin(),x.end()
#define rep(i,n) for(int i=0;i<n;++i)

using namespace std;
typedef unsigned long long ll;


int main(void){
    int n,m;
    ll q,t;
    bool ok=true;
    vector<ll>d;
    cin>>n;
    rep(i,n){
        cin>>q;
        d.push_back(q);
    }
    cin>>m;
    rep(i,m){
        cin>>t;
        auto itr=find(ALL(d),t);
        if(itr==d.end()){
            cout<<"NO"
        }
        else{
            d.erase(itr);
        }
    }
    cout<<"YES";
}
/*
5
1  1 1 1 1 1
2  
*/

Compiler output:
a.cc: In function 'int main()':
a.cc:24:23: error: expected ';' before '}' token
   24 |             cout<<"NO"
      |                       ^
      |                       ;
   25 |         }
      |         ~
Language: C++

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

long long main()
{
  long long N;
  cin >> N;

  vector<long long> D(N);
  for (long long i = 0; i < N; i++)
    cin >> D.at(i);

  vector<long long> cnt(200000);
  for (long long i = 0; i < N; i++)
  {
    cnt.at(D.at(i))++;
  }

  long long M;
  cin >> M;

  vector<long long> T(M);
  for (long long i = 0; i < M; i++)
    cin >> T.at(i);

  vector<long long> cnt2(200000);
  for (long long i = 0; i < M; i++)
  {
    cnt2.at(T.at(i))++;
  }

  if (N < M)
  {
    cout << "NO" << endl;
    return 0;
  }

  sort(cnt.begin(), cnt.end());
  sort(cnt2.begin(), cnt2.end());

  bool flag = true;
  for (long long i = 0; i < 200000; i++)
  {
    if (cnt.at(i) < cnt2.at(i))
    {
      flag = false;
      break;
    }
  }

  if (flag)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
}

Compiler output:
cc1plus: error: '::main' must return 'int'
Language: C++

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

int n;
int a[2e6];
int m;
int b[2e6];
map<int,int> mpa,mpb;

int main() {
    cin >> n;
    for(int i=0;i<n;i++){
        cin >> a[i];
        mpa[a[i]]++;
    }
    cin >> m;
    for(int i=0;i<m;i++){
        cin >> b[i];
        mpb[b[i]];
    }
    for(int i=0;i<m;i++){
        int x=b[i];
        if(mpb[x]>mpa[x]){
            cout << "YES" << endl;
            return 0;
        }
    }
    cout << "YES" << endl;
    return 0;
}

Compiler output:
a.cc:5:7: error: conversion from 'double' to 'long unsigned int' in a converted constant expression
    5 | int a[2e6];
      |       ^~~
a.cc:5:7: error: could not convert '2.0e+6' from 'double' to 'long unsigned int'
    5 | int a[2e6];
      |       ^~~
      |       |
      |       double
a.cc:5:7: error: size of array 'a' has non-integral type 'double'
a.cc:7:7: error: conversion from 'double' to 'long unsigned int' in a converted constant expression
    7 | int b[2e6];
      |       ^~~
a.cc:7:7: error: could not convert '2.0e+6' from 'double' to 'long unsigned int'
    7 | int b[2e6];
      |       ^~~
      |       |
      |       double
a.cc:7:7: error: size of array 'b' has non-integral type 'double'
Language: C

#include<stdio.h>
#include<stdlib.h>
#include<math.h>
int main(void){
    int num_que;
    int *difficulty;
    int num_need;
    int *difficulty2;
    int i,j;

    //printf("input the number of question:");
    scanf("%d",&num_que);
    difficulty=(int *)malloc(sizeof(int)*num_que);
    for(i=0;i<num_que;i++){
        //printf("difficulty:");
        scanf("%d",&difficulty[i]);
    }
    //printf("input the number of needed question:");
    scanf("%d",&num_need);
  if(num_que<num_need){
        printf("NO");
        return 0;
    }
    difficulty2=(int *)malloc(sizeof(int)*num_need);
    for(i=0;i<num_need;i++){
        //printf("difficulty2:");
        scanf("%d",&difficulty2[i]);
      for(j=0;j<num_que;j++){
        if(difficulty2[i]==difficulty[j]){
                difficulty[j]=0;
                break;
            }
            if(j==num_que-1){
                printf("NO");
                return 0;
            }
    }
    
    
    printf("YES");
    return 0;

}


Compiler output:
main.c: In function 'main':
main.c:43:1: error: expected declaration or statement at end of input
   43 | }
      | ^
Language: C++

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

int main() {
  int n, m, tmp = 0;
  cin >> n;
  vector<int> d(n);
  rep(i, n) cin >> d[i];
  cin >> m;
  vector<int> t(m);
  rep(i, m) cin >> t[i];
  bool b = 0;
  sort(d.begin(), d.end());
  sort(t.begin(), t.end());
  rep(i, n){
    if(d[i] == t[tmp]){
      ++tmp;
      if(tmp == m){
        b = 1;
        break;
      }
    }
    else if(d[i] > t[tmp]) break;
    }
  }
  if(b) cout << "YES" << endl;
  else cout << "NO" << endl;
  return 0;
}

Compiler output:
a.cc:28:3: error: expected unqualified-id before 'if'
   28 |   if(b) cout << "YES" << endl;
      |   ^~
a.cc:29:3: error: expected unqualified-id before 'else'
   29 |   else cout << "NO" << endl;
      |   ^~~~
a.cc:30:3: error: expected unqualified-id before 'return'
   30 |   return 0;
      |   ^~~~~~
a.cc:31:1: error: expected declaration before '}' token
   31 | }
      | ^
Language: C++

#include<iostream>

using namespace std;

int main() {
    int N;
    cin >> N;

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

    int M;
    cin >> M;

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

    // ソート
    sort(D, D + N);
    sort(T, T + M);

    int dIndex = 0;

    for(int i = 0; i < M; i++) {
        while(D[dIndex] < T[i]) {
            if(dIndex < N - 1) {
                dIndex++;
            } else {
                cout << "NO" << endl;
                return 0;
            }
        }
        if(D[dIndex] != T[i]) {
            cout << "NO" << endl;
            return 0;
        }
        dIndex++;
    }

    cout << "YES" << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   23 |     sort(D, D + N);
      |     ^~~~
      |     short
Language: C++

#i n cl u d e <i o s t re am>
#i n cl u d e <map>
u si n g namespace s t d ;
i n t A;
i n t a [ 1 0 0 0 1 0 ] ;
i n t B;
i n t b [ 1 0 0 0 1 0 ] ;
map <i n t , i n t> mpa,mpb;
i n t main ( v oid ){
i n t i ;
ci n >> A;
f o r ( i =0; i<A; i++) s c a n f (”%d ” , &a [ i ] ) ;
ci n >> B;
f o r ( i =0; i<B; i++) s c a n f (”%d ” , &b [ i ] ) ;
f o r ( i =0; i<A; i++) mpa[ a [ i ]]++;
f o r ( i =0; i<B; i++) mpb[ b [ i ]]++;
f o r ( i =0; i<B; i ++){
i n t x = b [ i ] ;
i f (mpb[ x ] > mpa[ x ] ) {
c ou t << ”NO” << e n dl ;
r e t u r n 0 ;
}
}
2
c ou t << ”YES” << e n dl ;
r e t u r n 0 ;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #i; did you mean #if?
    1 | #i n cl u d e <i o s t re am>
      |  ^
      |  if
a.cc:2:2: error: invalid preprocessing directive #i; did you mean #if?
    2 | #i n cl u d e <map>
      |  ^
      |  if
a.cc:12:36: error: extended character ” is not valid in an identifier
   12 | f o r ( i =0; i<A; i++) s c a n f (”%d ” , &a [ i ] ) ;
      |                                    ^
a.cc:12:40: error: extended character ” is not valid in an identifier
   12 | f o r ( i =0; i<A; i++) s c a n f (”%d ” , &a [ i ] ) ;
      |                                        ^
a.cc:14:36: error: extended character ” is not valid in an identifier
   14 | f o r ( i =0; i<B; i++) s c a n f (”%d ” , &b [ i ] ) ;
      |                                    ^
a.cc:14:40: error: extended character ” is not valid in an identifier
   14 | f o r ( i =0; i<B; i++) s c a n f (”%d ” , &b [ i ] ) ;
      |                                        ^
a.cc:20:11: error: extended character ” is not valid in an identifier
   20 | c ou t << ”NO” << e n dl ;
      |           ^
a.cc:20:11: error: extended character ” is not valid in an identifier
a.cc:25:11: error: extended character ” is not valid in an identifier
   25 | c ou t << ”YES” << e n dl ;
      |           ^
a.cc:25:11: error: extended character ” is not valid in an identifier
a.cc:3:1: error: 'u' does not name a type
    3 | u si n g namespace s t d ;
      | ^
a.cc:4:1: error: 'i' does not name a type
    4 | i n t A;
      | ^
a.cc:5:1: error: 'i' does not name a type
    5 | i n t a [ 1 0 0 0 1 0 ] ;
      | ^
a.cc:6:1: error: 'i' does not name a type
    6 | i n t B;
      | ^
a.cc:7:1: error: 'i' does not name a type
    7 | i n t b [ 1 0 0 0 1 0 ] ;
      | ^
a.cc:8:1: error: 'map' does not name a type
    8 | map <i n t , i n t> mpa,mpb;
      | ^~~
a.cc:9:1: error: 'i' does not name a type
    9 | i n t main ( v oid ){
      | ^
Language: C++

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

int main() {
    int n, m;
    cin >> n;
    unordered_set<int> d;
    for (int i = 0; i < n; i++){
        int temp;
        cin >> temp;
        d.insert(temp);
    }

    bool ret = true;
    cin >> m;
    for (int i = 0; i < m; i++){
        int diff;
        cin >> diff;

        auto p = d.find(diff);
        if (p == d.end()){
            ret = false;
        }
        else{
            *p = -1;
        }
    }

    if (ret){
        cout << "YES" << endl;
    }
    else{
        cout << "NO" << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:16: error: assignment of read-only location 'p.std::__detail::_Node_iterator<int, true, false>::operator*()'
   25 |             *p = -1;
      |             ~~~^~~~
Language: C++

#include <iostream>
#include <map>
using namespace std;

int main()
{
    int n;
    cin >> n;
    map<int, int> mp;
    for(int i = 0; i < n; i++){
        int d;
        din >> d;
        mp[d]++;
    }
    int m;
    cin >> m;
    for(int i = 0; i < m; i++){
        int t;
        cin >> t;
        if(mp[t] <= 0){
            cout << "NO" << endl;
            return 0;
        }
        mp[t]--;
    }
    cout << "YES" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: 'din' was not declared in this scope; did you mean 'div'?
   12 |         din >> d;
      |         ^~~
      |         div
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,N) for(int i=0,i##_max=(N);i<i##_max;++i)
#define repp(i,l,r) for(int i=(l),i##_max=(r);i<i##_max;++i)
#define per(i,N) for(int i=(N)-1;i>=0;--i)
#define perr(i,l,r) for(int i=r-1,i##_min(l);i>=i##_min;--i)
#define all(arr) (arr).begin(), (arr).end()
#define SP << " " <<
#define SPF << " "
#define SPEEDUP cin.tie(0);ios::sync_with_stdio(false);
#define MAX_I INT_MAX //1e9
#define MIN_I INT_MIN //-1e9
#define MAX_UI UINT_MAX //1e9
#define MAX_LL LLONG_MAX //1e18
#define MIN_LL LLONG_MIN //-1e18
#define MAX_ULL ULLONG_MAX //1e19
  typedef long long ll;
  typedef pair<int,int> PII;
  typedef pair<char,char> PCC;
  typedef pair<ll,ll> PLL;
  typedef pair<char,int> PCI;
  typedef pair<int,char> PIC;
  typedef pair<ll,int> PLI;
  typedef pair<int,ll> PIL; 
  typedef pair<ll,char> PLC; 
  typedef pair<char,ll> PCL; 

inline void YesNo(bool b){ cout << (b?"Yes" : "No") << endl;}
inline void YESNO(bool b){ cout << (b?"YES" : "NO") << endl;}
inline void Yay(bool b){ cout << (b?"Yay!" : ":(") << endl;}

int main(void){
  SPEEDUP
  cout << setprecision(15);
  int N;cin >> N;
  map<int,int> setpaln;
  rep(i,N){
    int x;cin >> x; 
    ++setplan[x];
  }
  int M;cin >> M;
  map<int,int> setprob;
  rep(i,M){
    x;cin >> x;
    ++setprob[x];
  }
  bool sat = true;
  for(const PII& p : setprob){
    if(setplan[p.first] < p.second)sat = false;
  }
  YESNO(sat);
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:39:7: error: 'setplan' was not declared in this scope; did you mean 'setpaln'?
   39 |     ++setplan[x];
      |       ^~~~~~~
      |       setpaln
a.cc:44:5: error: 'x' was not declared in this scope
   44 |     x;cin >> x;
      |     ^
a.cc:49:8: error: 'setplan' was not declared in this scope; did you mean 'setpaln'?
   49 |     if(setplan[p.first] < p.second)sat = false;
      |        ^~~~~~~
      |        setpaln
Language: C++

nclude<bits/stdc++.h>
using namespace std;
using ll=long long;
 
int main(){
  int i,j,cnt=0;
  int n,m;
  cin>>n;
  int d[n];
  for(i=0;i<n;i++)cin>>d[i];
  cin>>m;
  int t[m];
  for(i=0;i<m;i++)cin>>t[i];
  sort(d,d+n);
  sort(t,t+m);
  for(i=0;i<n;i++){
    if(d[i]==t[cnt])cnt++;
  }
  if(cnt==m)cout<<"YES";
  else cout<<"NO";
}

Compiler output:
a.cc:1:1: error: 'nclude' does not name a type
    1 | nclude<bits/stdc++.h>
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:8:3: error: 'cin' was not declared in this scope
    8 |   cin>>n;
      |   ^~~
a.cc:14:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   14 |   sort(d,d+n);
      |   ^~~~
      |   short
a.cc:19:13: error: 'cout' was not declared in this scope
   19 |   if(cnt==m)cout<<"YES";
      |             ^~~~
a.cc:20:8: error: 'cout' was not declared in this scope
   20 |   else cout<<"NO";
      |        ^~~~
Language: C++

/*
貪欲
後ろから見る
DP
順位表をチェック
二分探索


*/
#include<cstdio>
#include<cstdlib>
#include<algorithm>
#include<iostream>
#include<queue>
#include<vector>
#include <bitset>
#include <cmath>
#include <limits>
#include <iostream>
#include <map>
#include<tuple>
#include<set>
using namespace std;
#define INF 1100000000000000000
#define MAX 100000
#define MOD 1000000007
typedef long long ll;
//typedef pair<int,int> P;
//typedef pair< pair<int,int>,pair<int,int> > p;
#define bit(n,k) ((n>>k)&1) /*nのk bit目*/
#define rad_to_deg(rad) (((rad)/2/M_PI)*360)
struct edge{ll to,cost,val;};
template<class T,class U>bool chmin(T&a,const U&b){if(a<=b)return false;a=b;return true;}
template<class T,class U>bool chmax(T&a,const U&b){if(a>=b)return false;a=b;return true;}
//__builtin_popcount(S);
//C.erase(unique(C.begin(),C.end()),C.end());

int main(){
    int N;
    cin>>N;
    map<ll,int> D;
    for(int i=0;i<N;i++){
        ll d;
        cin>>d;
        M[d]++;
    }
    int M; cin>>M;

    for(int i=0;i<M;i++){
        ll T;
        cin>>T;
        if(M.find(T)==M.end() || M[T]==0){
            cout<<"NO"<<endl;
            return 0;
        }
        M[T]--;
    }
    cout<<"YES"<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:45:9: error: 'M' was not declared in this scope
   45 |         M[d]++;
      |         ^
a.cc:52:14: error: request for member 'find' in 'M', which is of non-class type 'int'
   52 |         if(M.find(T)==M.end() || M[T]==0){
      |              ^~~~
a.cc:52:25: error: request for member 'end' in 'M', which is of non-class type 'int'
   52 |         if(M.find(T)==M.end() || M[T]==0){
      |                         ^~~
a.cc:52:35: error: invalid types 'int[ll {aka long long int}]' for array subscript
   52 |         if(M.find(T)==M.end() || M[T]==0){
      |                                   ^
a.cc:56:10: error: invalid types 'int[ll {aka long long int}]' for array subscript
   56 |         M[T]--;
      |          ^
Language: Java

import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    Map<Integer, Integer> map = new HashMap<>();
    int N = sc.nextInt();
    for (int i= 0; i < N; i++) {
      int D = sc.nextInt();
      map.put(D, map.getOtDefault(D, 0)+1);
    }
    
    boolean ans = true;
    int M = sc.nextInt();
    for (int i = 0; i < M; i++) {
      int T = sc.nextInt();
      if (map.getOrDefault(T, 0) == 0) {
        ans = false;
        break;
      }
      map.put(T, map.get(T)-1);
    }
    
    System.out.println(ans ? "YES" : "NO");
  }
}

Compiler output:
Main.java:10: error: cannot find symbol
      map.put(D, map.getOtDefault(D, 0)+1);
                    ^
  symbol:   method getOtDefault(int,int)
  location: variable map of type Map<Integer,Integer>
1 error
Language: C++

//#include <bits/stdc++.h>
#include <iostream>
#include <vector>
#include <cmath>
#define REP(i, n) for (int i = 0; i < (int)(n); ++i)
#define REP2(i, m, n) for (int i = (m); i < (int)(n); ++i)
#define REPR(i, n) for (int i = (n)-1; i >= 0; --i)
#define REPR2(i, m, n) for (int i = (n)-1; i >= (m); --i)
#define REPx(x, a) for(auto x : a)
#define ALL(a) a.begin(), a.end()
#define SORT(a) sort(ALL(a))
#define SORTR(a) sort(ALL(a), greater<int>())
#define REVERSE(a) reverse(ALL(a))
#define bit_search(bit, n) REP(bit, 1<<(n))
#define bit_check(bit, i) (bit>>(i)) & 1
#define setpre(n) fixed << setprecision((n))
#define UNIQUE(a) do {SORT(a); (a).erase(uniqu7e(ALL(a)), (a).end());} while(0)
#define MAX(a) *max_element(ALL(a))
#define MIN(a) *min_element(ALL(a))
#define bisect_left(a, x) lower_bound(ALL(a), (x)) - a.begin()
#define bisect_right(a, x) upper_bound(ALL(a), (x)) - a.begin()
#define INPUT(a) REP(i, a.size()) cin >> a[i];
#define INPUTP(a) REP(i, a.size()) cin >> a[i].first >> a[i].second;
#define ENDL cout << endl;
using namespace std;
using LL = long long;
using LD = long double;
using PII = pair<int, int>;
using VPII = vector<PII>;
using PLL = pair<LL, LL>;
using VPLL = vector<PLL>;
using VI = vector<int>;
using VVI = vector<VI>;
using VLL = vector<LL>;
using VVLL = vector<VLL>;
using VC = vector<char>;
using VS = vector<string>;
using VB = vector<bool>;
using VD = vector<double>;
const LL INF = 1e18;
const LL MOD = 1e9 + 7;

template<class T> inline bool chmin(T &a, T b){if (a > b) {a = b; return true;} return false;}
template<class T> inline bool chmax(T &a, T b){if (a < b) {a = b; return true;} return false;}

void END()
{
	cout << "NO" << endl;
	exit(0);
}

int main()
{
	cin.tie(0);
	ios::sync_with_stdio(false);
	int n, m;
	cin >> n;
	map<int, int> D;
	REP(i, n)
	{
		int d;
		cin >> d;
		D[d]++;
	}
	cin >> m;
	REP(i, m)
	{
		int t;
		cin >> t;
		if (!D.count(t) || D.at(t) == 0) END();
		D[t]--;
	}
	cout << "YES" << endl;
	
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:58:9: error: 'map' was not declared in this scope
   58 |         map<int, int> D;
      |         ^~~
a.cc:5:1: note: 'std::map' is defined in header '<map>'; this is probably fixable by adding '#include <map>'
    4 | #include <cmath>
  +++ |+#include <map>
    5 | #define REP(i, n) for (int i = 0; i < (int)(n); ++i)
a.cc:58:13: error: expected primary-expression before 'int'
   58 |         map<int, int> D;
      |             ^~~
a.cc:63:17: error: 'D' was not declared in this scope
   63 |                 D[d]++;
      |                 ^
a.cc:70:22: error: 'D' was not declared in this scope
   70 |                 if (!D.count(t) || D.at(t) == 0) END();
      |                      ^
a.cc:71:17: error: 'D' was not declared in this scope
   71 |                 D[t]--;
      |                 ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n,m,c=0;cin>>n;
  vector<int>d(n);for(inti=0;i<n;i++)cin>>d.at(i);
  cin>>m;vector<int>t(m);for(int i=0;i<m;i++)cin>>t.at(i);
  for(int i=0;i<m;i++){
    for(int j=0;j<n;j++){
      if(d.at(j)==t.at(i))d.at(j)=0;
      else if(j==n-1){
        c++;
        break;
      }
    }
  }
  if(c==0)cout<<"YES"<<endl;
  else cout<<"NO"<<endl;
}
        
        

Compiler output:
a.cc: In function 'int main()':
a.cc:5:23: error: 'inti' was not declared in this scope; did you mean 'int'?
    5 |   vector<int>d(n);for(inti=0;i<n;i++)cin>>d.at(i);
      |                       ^~~~
      |                       int
a.cc:5:30: error: 'i' was not declared in this scope
    5 |   vector<int>d(n);for(inti=0;i<n;i++)cin>>d.at(i);
      |                              ^
Language: C

#include<stdio.h>
int main(){
  int n1, n2, d[2][200000] = {0}, a, k = 0, j;
  scanf("%d", &n1);
  for(int i = 0; i < n1; ++i){
    scanf("%d", &d[1][i]);
    d[0][i] = 1;
  }
     for (int i = 1; i < n1; i++) {   // 先頭から順にソート
    j = i;
    while ((j > 0) && (d[1][j-1] > d[1][j])) {   //整列済みの場合は処理しない
         
      int tmp = d[1][j];
        d[1][j] = d[1][j-1];
        d[1][j-1] = tmp;// 整列されていない要素を交換
      j--;
    }
  }
  }
  scanf("%d", &n2);
  for(int i = 0; i < n2; ++i){
    int l = 0;
    scanf("%d", &a);
    if(k) continue;
    if(a > d[1][n1 - 1]){
      k++;
      continue;
    }
    for(j = 0; j < n1; ++j){
      while(1){
        if(j + 500 > n1) break;
        if(d[1][j + 500] < a){
          j += 501;
          continue;
        }
        break;
      }
      if(d[1][j] > a){
        k++;
        break;
      }
      if(d[0][j] == 0) continue;
      if(d[1][j] == a){
        d[0][j] = 0;
        l = 1;
        break;
      }
    }
    if(j == n1 - 1 && l == 0) k++;
  }
  if(k) puts("NO");
  else puts("YES");
  return 0;
}

Compiler output:
main.c:20:9: error: expected declaration specifiers or '...' before string constant
   20 |   scanf("%d", &n2);
      |         ^~~~
main.c:20:15: error: expected declaration specifiers or '...' before '&' token
   20 |   scanf("%d", &n2);
      |               ^
main.c:21:3: error: expected identifier or '(' before 'for'
   21 |   for(int i = 0; i < n2; ++i){
      |   ^~~
main.c:21:20: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
   21 |   for(int i = 0; i < n2; ++i){
      |                    ^
main.c:21:26: error: expected identifier or '(' before '++' token
   21 |   for(int i = 0; i < n2; ++i){
      |                          ^~
main.c:51:3: error: expected identifier or '(' before 'if'
   51 |   if(k) puts("NO");
      |   ^~
main.c:52:3: error: expected identifier or '(' before 'else'
   52 |   else puts("YES");
      |   ^~~~
main.c:53:3: error: expected identifier or '(' before 'return'
   53 |   return 0;
      |   ^~~~~~
main.c:54:1: error: expected identifier or '(' before '}' token
   54 | }
      | ^
Language: C++

v#include <bits/stdc++.h>

using namespace std;
using ll = long long;

//container util
#define SORT(c) sort((c).begin(),(c).end())

//repetition
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)


int main(void){

	
	int N; cin >> N;
	map<int, int> all;
	REP(i,N){
		int D; cin >> D;
		all[D]++;
	}

	int M;
	map<int, int> sub;
	REP(i,M){
		int T; cin >> T;
		sub[T]++;
	}

	bool ans = true;
	for(auto itr=sub.begin();itr!= sub.end();++itr){
		if(itr->second > all[itr->first]) ans = false;
	}

	if(ans) cout << "YES" << endl;
	else cout << "NO" << endl;

	return 0;

}


Compiler output:
a.cc:1:2: error: stray '#' in program
    1 | v#include <bits/stdc++.h>
      |  ^
a.cc:1:1: error: 'v' does not name a type
    1 | v#include <bits/stdc++.h>
      | ^
a.cc: In function 'int main()':
a.cc:17:16: error: 'cin' was not declared in this scope
   17 |         int N; cin >> N;
      |                ^~~
a.cc:18:9: error: 'map' was not declared in this scope
   18 |         map<int, int> all;
      |         ^~~
a.cc:18:13: error: expected primary-expression before 'int'
   18 |         map<int, int> all;
      |             ^~~
a.cc:21:17: error: 'all' was not declared in this scope; did you mean 'll'?
   21 |                 all[D]++;
      |                 ^~~
      |                 ll
a.cc:25:13: error: expected primary-expression before 'int'
   25 |         map<int, int> sub;
      |             ^~~
a.cc:28:17: error: 'sub' was not declared in this scope
   28 |                 sub[T]++;
      |                 ^~~
a.cc:32:22: error: 'sub' was not declared in this scope
   32 |         for(auto itr=sub.begin();itr!= sub.end();++itr){
      |                      ^~~
a.cc:33:34: error: 'all' was not declared in this scope; did you mean 'll'?
   33 |                 if(itr->second > all[itr->first]) ans = false;
      |                                  ^~~
      |                                  ll
a.cc:36:17: error: 'cout' was not declared in this scope
   36 |         if(ans) cout << "YES" << endl;
      |                 ^~~~
a.cc:36:34: error: 'endl' was not declared in this scope
   36 |         if(ans) cout << "YES" << endl;
      |                                  ^~~~
a.cc:37:14: error: 'cout' was not declared in this scope
   37 |         else cout << "NO" << endl;
      |              ^~~~
a.cc:37:30: error: 'endl' was not declared in this scope
   37 |         else cout << "NO" << endl;
      |                              ^~~~
Language: C++

#include<iostream>
#include<algorithm>
#include<map>
using namespace std;
int main() {
  int n,m,a[200000],b[200000];
  map<int,int> mpa,mab;
  for(int i=0; i<n; i++) {
    cin >> a[i];
    mpa[a[i]]++;
  }
  for(int i=0; i<m; i++) {
    cin >> b[i];
    mpb[b[i]]++;
  }
  for(int i=0; i<m; i++) {
    if(mpb[b[i]]>mpa[b[i]]) {
      cout << "NO" << endl;
      return 0;
    }
  }
  cout << "YES" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:5: error: 'mpb' was not declared in this scope; did you mean 'mab'?
   14 |     mpb[b[i]]++;
      |     ^~~
      |     mab
a.cc:17:8: error: 'mpb' was not declared in this scope; did you mean 'mab'?
   17 |     if(mpb[b[i]]>mpa[b[i]]) {
      |        ^~~
      |        mab
Language: C

#include<bits/stdc++.h>
using namespace std;
#define lint long long
#define ll long long
#define pq priority_queue
#define mp make_pair
#define vl vector<long long>
long long INF = 1e10;
#define pii pair<long long,long long>
#define all(x) (x).begin(),(x).end()
#define mod 1000000007
/******************************define**********************************/

/*****************************functions********************************/
int count_ar(vector<ll> a,long long key){
    if(!binary_search(all(a),key)) return 0;
    else{
        vector<ll>::iterator itr = lower_bound(all(a),key);
        vector<ll>::iterator itr2 = upper_bound(all(a),key);
        return itr2 - itr;
    }
}
/****************************main function*****************************/
int main(void){
    int N; cin >> N;
    vector<ll> pr(N);
    for(ll i = 0;i < N;i++){
        cin >> pr[i];   
    }
    int M; cin >> M;
    vector<ll> st(M);
    for(ll i = 0;i < M;i++){
        cin >> st[i];   
    }
    sort(pr.begin(),pr.end());
    sort(st.begin(),st.end());

    //st順番にチェック
    //二分探索であったら、st側の個数と、pr側の個数を調べて
    //前者が後者より多かったらアウト
    //配列のある値についてチェックが終わったら、双方とも、個数だけスキップして次の値に進む
    int i;
    i = 0;
    while(true){
        ll keyst = st[i];
        int countst = count_ar(st,keyst);
        int countpr = count_ar(pr,keyst);
        if(countst > countpr){
            cout << "NO" << endl;
            return 0;
        }else{
            i += countst;
            if(i == M){
                break;
            }else{
                continue;
            }
        }
        
    }
    cout << "YES" << endl;
    return 0;
}

Compiler output:
main.c:1:9: fatal error: bits/stdc++.h: No such file or directory
    1 | #include<bits/stdc++.h>
      |         ^~~~~~~~~~~~~~~
compilation terminated.