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

#include <iostream>
#include <string>
#include <cstring>
#include <vector>
#include <algorithm>
#include <set>
#include <stack>
#include <deque>
#include <cmath>
#include <map>
using namespace std;
using ll = long long;
#define rep(i, n) for (ll i = 0; i < n; i++)
template<typename T1,typename T2> inline void chmin(T1 &a,T2 b){if(a>b) a=b;}
template<typename T1,typename T2> inline void chmax(T1 &a,T2 b){if(a<b) a=b;}

int main() {
    ll n;
    cin >> n;
    map<ll, ll> mp;
    rep(i, n) {
        ll d;
        cin >> d;
        mp[d]++; 
    }
    cin >> m;
    bool ok = true;
    rep(i, m) {
        ll t;
        cin >> t;
        if (mp[t] <= 0) {
            ok = false;
            break;
        } else {
            mp[t]--;
        }
    }
    if (ok) cout << "YES\n";
    else cout <<"NO\n";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:12: error: 'm' was not declared in this scope; did you mean 'mp'?
   26 |     cin >> m;
      |            ^
      |            mp
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int n,m,b,i;
  int a[1000000001] = {0};
  cin>>n;
  for(i=0;i<n;i++){
    cin>>b;
    a[b]++;
  }
  cin>>m;
  for(i=0;i<m;i++){
    cin>>b;
    if(a[b]>0){
      a--;
    }else{
      cout<<"NO";
      return 0;
    }
  }
  cout<<"YES";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:7: error: lvalue required as decrement operand
   15 |       a--;
      |       ^
Language: C

//入出力等基本
#include <iostream>
#include <vector>
#include <map>
#include <string>

#define 中心() main()
#define 返 return
#define 入力(a) cin >> a
#define 出力(a) cout << a << endl
#define 再帰(s,t) for(整数 s = 0; s < 整数(t); s += 1)
#define 如果(a) if(a)
#define 場合(a) while(a)
#define 先(a) a.first
#define 後(a) a.second
#define 自動 auto
#define 定数 const
#define 部分文字列(m,s,t) m.substr(s,t)
#define 測長(a) a.length()

using namespace std;

typedef int 整;
typedef void 無;
typedef long long 整数;
typedef vector<整数> 整数配列;
typedef map<整数,整数> 整辞書;
typedef string 文字列;
整数 準備数;
整数配列 準備(100010);
整数 問題数;
整数配列 問題(100010);
整辞書 準備辞書,問題辞書;

整 中心(){
    入力(準備数);
    再帰(a,準備数) 入力(準備[a]);
    入力(問題数);
    再帰(a,問題数) 入力(問題[a]);
    
    再帰(a,準備数) 準備辞書[準備[a]]++;
    再帰(a,問題数) 問題辞書[問題[a]]++;
    
    再帰(a,問題数){
        整数 s=問題[a];
        如果(問題辞書[s] > 準備辞書[s]){
            出力("NO");
            返 0;
        }
    }
    出力("YES");
    返 0;
}

Compiler output:
main.c:2:10: fatal error: iostream: No such file or directory
    2 | #include <iostream>
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

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

int main()
{
	int N, M;
	cin >> N;
	vector<int> D(N);
	for (auto& e : D) scanf_s("%d", &e);
	cin >> M;
	vector<int> T(M);
	for (auto& e : T) scanf_s("%d", &e);

	bool ret = true;
	for (int i = 0; i < M; i++) {
		auto itr = find(D.begin(), D.end(), T[i]);
		if (itr == D.end()) {
			ret = false;
		}
		else {
			D.erase(itr, itr + 1);
		}
	}

	puts(ret ? "YES" : "NO");
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:27: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
    9 |         for (auto& e : D) scanf_s("%d", &e);
      |                           ^~~~~~~
      |                           scanf
a.cc:12:27: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   12 |         for (auto& e : T) scanf_s("%d", &e);
      |                           ^~~~~~~
      |                           scanf
Language: C++

#include <iostream>
#include <algorithm>
#include <cmath>
#include <limits>
#include <vector>
#include <cstdio>
#include <bits/stdc++.h>
#include <set>
#include <map>
#include <stdio.h>
using namespace std;
using ll =double;
map <int ,int> mpa,mpb;

int main (void) {
  int N;
  int a;
  cin >> N;
  for(int i=0;i<N;i++){
    cin >> a;
    mpa[a]++;
  }
  int M;
  int b;
  int B[100000007];
  cin >> M;
  for(int i=0;i<M;i++){
    cin >> b;
    B[i]=b
    mpb[b]++;
  }
  int x;
  for(int i=0;i<M;i++){
    x=B[i]
    if(map[x]<mpb[x]){
      cout <<"NO";
      return 0;
    }
  }
  cout  << "YES";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:11: error: expected ';' before 'mpb'
   29 |     B[i]=b
      |           ^
      |           ;
   30 |     mpb[b]++;
      |     ~~~    
a.cc:34:11: error: expected ';' before 'if'
   34 |     x=B[i]
      |           ^
      |           ;
   35 |     if(map[x]<mpb[x]){
      |     ~~
Language: C++

#include <iostream>
#include <algorithm>
#include <cmath>
#include <limits>
#include <vector>
#include <cstdio>
#include <bits/stdc++.h>
#include <set>
#include <stdio.h>
using namespace std;
using ll =long long;

int main (void) {
  int N;
  cin >> N;
  ll D[1e9+7];
  for(int i=0;i<N;i++){
    int d;
    cin >> d;
    D[d]++;
  }
  int M;
  cin >> M;
  ll T[1e9+7];
  int p[2000000];
  for(int i=0;i<M;i++){
    int t;
    cin >> t;
    p[i]=t;
    T[t]++;
  }
  for(int i=0;i<M;i++){
    if(T[p[i]]>D[p[i]]){
      cout <<"NO";
      return 0;
    }
  }
  cout  << "YES";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:11: error: conversion from 'double' to 'long unsigned int' in a converted constant expression
   16 |   ll D[1e9+7];
      |        ~~~^~
a.cc:16:11: error: could not convert '(1.0e+9 + (double)7)' from 'double' to 'long unsigned int'
   16 |   ll D[1e9+7];
      |        ~~~^~
      |           |
      |           double
a.cc:16:11: error: size of array 'D' has non-integral type 'double'
a.cc:24:11: error: conversion from 'double' to 'long unsigned int' in a converted constant expression
   24 |   ll T[1e9+7];
      |        ~~~^~
a.cc:24:11: error: could not convert '(1.0e+9 + (double)7)' from 'double' to 'long unsigned int'
   24 |   ll T[1e9+7];
      |        ~~~^~
      |           |
      |           double
a.cc:24:11: error: size of array 'T' has non-integral type 'double'
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
#include <set>
#include <map>
#include <vector>
#include <numeric>
#include <climits>
#include <math.h>
#include <memory.h>
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define rrep(i, k, n) for(int i = (k); i < (int)(n); i++)
using namespace std;
using ll = long long;
int N, M;
int cnt = 0;
ll ans = 0LL;
int i_index;
int tmp;
int dh[4] = {1, 0, -1, 0};
int dw[4] = {0, 1, 0, -1};
string board[64];
string a[64];

int main(){
    cin >> N;
    int D[N];
    rep(i, N) cin >> D[i];
    cin >> M;
    int T[M];
    rep(i, M) cin >> T[i];
    if(N >= M){
        sort(D, D + N, greater<int>());
        sort(T, T + M, greater<int>());
        rep(i, N){
            while(D[i + cnt] != T[i] && i + cnt < M)
                cnt++;
            
            if(D[i + cnt] == T[i] && i + cnt <= M)
                ans++;
            else
                break;
            if(ans == M)
                break;
        }
        cout << ans << endl;
        cout << cnt << endl;
        if(ans == M)
            cout << "YES" << endl;
        else
            cout << "NO" << endl;
        return 0;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:53:6: error: expected '}' at end of input
   53 |     }
      |      ^
a.cc:25:11: note: to match this '{'
   25 | int main(){
      |           ^
Language: C++

#include "stdafx.h"

using namespace std;

int main()
{
	cin.tie(0);
	ios::sync_with_stdio(false);
	long long int n, m, d[200000], t[200000], cnt = 0;
	cin >> n;
	for (int i = 0; i < n; i++) {
		cin >> d[i];
	}
	cin >> m;
	for (int i = 0; i < m; i++) {
		cin >> t[i];
	}
	if (n < m) {
		cout << "NO" << endl;
		return 0;
	}
	sort(d, d + n);
	sort(t, t + m);
	for (int i = 0; i < m; i++) {
		for (int j = cnt; j < n; j++) {
			if (t[i] == d[j]) {
				t[i] = 0;
				d[j] = 0;
				cnt = j + 1;
				if (i == m - 1) {
					cout << "YES" << endl;
					return 0;
				}
				break;
			}
		}
		if (t[i]) {
			cout << "NO" << endl;
			return 0;
		}
	}
	cout << "NO" << endl;
	return 0;
}

Compiler output:
a.cc:1:10: fatal error: stdafx.h: No such file or directory
    1 | #include "stdafx.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: C

// 再提出

#include <iostream>
#include <map>
 
using namespace std;
 
int main() {
	int n;
	map<int, int> ma;
	int m;
 
	cin >> n;
	for (int i = 0; i < n; i++) {
		int d;
		cin >> d;
		ma[d]++;
	}
 
	cin >> m;
	for (int i = 0; i < m; i++) {
		int t;
		cin >> t;
		if (--ma[t] < 0) {
			cout << "NO" << endl;
			return 0;
		}
	}
 
	cout << "YES" << endl;
 
	return 0;
}

Compiler output:
main.c:3:10: fatal error: iostream: No such file or directory
    3 | #include <iostream>
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

#include<bits/stdc++.h>
using namespace std;
 
multiset<int> s;
int m,n,x;
int main()
{
    scanf("%d",&n);
    while(n--)
    {
        scanf("%d",&x);
        s.insert(x);
    }
    scanf("%d",&m);
    while(m--)
    {
        scanf("%d",&x);return 0;}
        s.erase(s.find(x));
    }
    puts("YES");
    return 0;
}

Compiler output:
a.cc:20:9: error: expected constructor, destructor, or type conversion before '(' token
   20 |     puts("YES");
      |         ^
a.cc:21:5: error: expected unqualified-id before 'return'
   21 |     return 0;
      |     ^~~~~~
a.cc:22:1: error: expected declaration before '}' token
   22 | }
      | ^
Language: C++

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

int main()
{
  int n;
  cin >> n;
  int d[n-1];
  bool flag[n-1];
  bool ans = true
  for(int i = 0;i < n;i++){
    cin >> d[i];
    flag[i] = true
  } 
  int m;
  cin >> m;
  int t[m-1];
  for(int j = 0;j < m;j++){
    cin >> t[j];
    for(int k = 0;k < n;k++){
      if(t[j] == d[k]){
        flag[k] = false;
      }else{
        ans = false;
      }
    }
  }
  if (ans){
    cout << "YES\n";
  }else{
    cout << "NO\n";
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:3: error: expected ',' or ';' before 'for'
   12 |   for(int i = 0;i < n;i++){
      |   ^~~
a.cc:12:17: error: 'i' was not declared in this scope
   12 |   for(int i = 0;i < n;i++){
      |                 ^
Language: C++

#include<iostream>
#include<cstdio>
using namespace std;
int main()
{
	cin>>n;
 	for(int i=1;i<=n;i++) cin>>d[i];
 	cin>>m;
 	for(int i=1;i<=m;i++) cin>>t[i];
 	cout<<"NO"<<endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:14: error: 'n' was not declared in this scope
    6 |         cin>>n;
      |              ^
a.cc:7:36: error: 'd' was not declared in this scope
    7 |         for(int i=1;i<=n;i++) cin>>d[i];
      |                                    ^
a.cc:8:14: error: 'm' was not declared in this scope; did you mean 'tm'?
    8 |         cin>>m;
      |              ^
      |              tm
a.cc:9:36: error: 't' was not declared in this scope
    9 |         for(int i=1;i<=m;i++) cin>>t[i];
      |                                    ^
Language: C++

#include <bits/stdc++.h>
#define ll long long
#define mod 1000000007
#define upperlimit 1000100
#define INF 1000000100
#define INFL 1000000000000000100
#define eps 1e-8
#define endl '\n'
#define sd(n) scanf("%d",&n)
#define slld(n) scanf("%lld",&n)
#define pd(n) printf("%d",n)
#define plld(n) printf("%lld",n)
#define pds(n) printf("%d ",n)
#define pllds(n) printf("%lld ",n)
#define pdn(n) printf("%d\n",n)
#define plldn(n) printf("%lld\n",n)
#define REP(i,a,b) for(i=a;i<=b;i++)
#define mp make_pair
#define pb push_back
#define pcc pair<char,char>
#define pii pair<int,int>
#define pll pair<ll,ll>
#define vi vector<int>
#define vl vector<ll>
#define vii vector<pii>
#define vll vector<pll>
#define tr(container,it) for(typeof(container.begin()) it=container.begin();it!=container.end();it++)
#define F first
#define S second
#define clr(a) memset(a,0,sizeof(a))
using namespace std;
 
ll gcd(ll n1,ll n2){
    if(!n1)return n2;
    if(!n2)return n1;
    if(n1%n2==0)return n2;
    return gcd(n2,n1%n2);
}
ll powmod(ll base,ll exponent){
    base%=mod;
    ll ans=1;
    while(exponent){
        if(exponent&1)ans=(ans*base)%mod;
        base=(base*base)%mod;
        exponent/=2;
    }
    ans%=mod;
    return ans;
}
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 j=0;j<M;j++){
        cin>>T[j];
    }
    std::set<int> st;
    for(int k=0;k<M;k++){   
        for(int l=0;l<N;l++){
           if(M[l]==T[k]){
                st.push_back (l);
           }
        }
    }　
    if(st.size()==M){
    cout<<"YES";
    }
    else cout<<"NO" ;
    return 0;
}

Compiler output:
a.cc:71:6: error: extended character 　 is not valid in an identifier
   71 |     }　
      |      ^
a.cc: In function 'int main()':
a.cc:67:16: error: invalid types 'int[int]' for array subscript
   67 |            if(M[l]==T[k]){
      |                ^
a.cc:68:20: error: 'class std::set<int>' has no member named 'push_back'
   68 |                 st.push_back (l);
      |                    ^~~~~~~~~
a.cc:71:6: error: '\U00003000' was not declared in this scope
   71 |     }　
      |      ^~
a.cc:75:5: error: 'else' without a previous 'if'
   75 |     else cout<<"NO" ;
      |     ^~~~
Language: C++

#include <iostream>
#include <vector>
#include <algorithm> 
#include <queue>
#include <functional>
#include <map>
#include <string>
using namespace std;

typedef long long ll;

int main(void){
    
    ll n, m, d[100005], t[100005];
    map<ll, ll> mp1, mp2;

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

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

    bool flag = true;

    for (int i = 0; i < m; i++){
        if (mp1[t[i]] < mp2[t[i]]){
            cout << "NO" << endl;
            return;
        }
    }

    cout << "YES" << endl;
   
}

Compiler output:
a.cc: In function 'int main()':
a.cc:33:13: error: return-statement with no value, in function returning 'int' [-fpermissive]
   33 |             return;
      |             ^~~~~~
Language: C++

module MultiSet = struct
  module type S = sig
    type elt
    type t
    val empty : t
    val is_empty : t -> bool
    val mem : elt -> t -> bool
    val count : elt -> t -> int
    val add : elt -> t -> t
    val remove : elt -> t -> t
    val clear : elt -> t -> t
    val cardinal : t -> int
    val fold : (elt -> 'a -> 'a) -> t -> 'a -> 'a
    val max_elt : t -> elt
    val subset : t -> t -> bool
  end

  module Make (E : Set.OrderedType) : S with type elt = E.t = struct
    module EltMap = Map.Make (E)
    type elt = EltMap.key
    type t = int EltMap.t

    let empty = EltMap.empty
    let is_empty = EltMap.is_empty
    let mem = EltMap.mem
    let count x m = try EltMap.find x m with Not_found -> 0
    let add x m = EltMap.add x (count x m + 1) m
    let remove x m =
      match EltMap.find x m with
      | 1 -> EltMap.remove x m
      | n -> EltMap.add x (n - 1) m
      | exception Not_found -> m
    let clear = EltMap.remove
    let cardinal m = EltMap.fold (fun _ -> ( + )) m 0
    let fold f = EltMap.fold (fun x n -> Array.fold_right f (Array.make n x))
    let max_elt m = fst (EltMap.max_binding m)
    let subset m1 m2 = EltMap.for_all (fun x n1 -> n1 <= count x m2) m1
  end
end

module IntMultiSet = MultiSet.Make (struct
  type t = int
  let compare = compare
end)

let () =
  let n = Scanf.scanf "%d\n" (fun n -> n) in
  let ds = Array.init n (fun _ -> Scanf.scanf "%d%c" (fun d _ -> d)) in
  let m = Scanf.scanf "%d\n" (fun m -> m) in
  let ts = Array.init m (fun _ -> Scanf.scanf "%d%c" (fun t _ -> t)) in
  print_endline
    begin if IntMultiSet.subset (Array.fold_left (fun m x -> IntMultiSet.add x m) IntMultiSet.empty ts) (Array.fold_left (fun m x -> IntMultiSet.add x m) IntMultiSet.empty ds) then "YES"
    else "NO" end

Compiler output:
a.cc:13:24: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
   13 |     val fold : (elt -> 'a -> 'a) -> t -> 'a -> 'a
      |                        ^~~~~~~~
a.cc:13:42: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
   13 |     val fold : (elt -> 'a -> 'a) -> t -> 'a -> 'a
      |                                          ^~~~~~~~
a.cc:1:1: error: 'module' does not name a type
    1 | module MultiSet = struct
      | ^~~~~~
a.cc:1:1: note: C++20 'module' only available with '-fmodules-ts'
Language: C++

#include <map>
using namespace std;
map<int,int>d;
int main(void){
    int n,m;
    cin>>n;
    for(int i=0;i<n;i++){
        int num;
        cin>>num;
        d[num]++;
    }
    cin>>m;
    for(int i=0;i<m;i++){
        int num;
        cin>>num;
        if(d[num]==0){
            cout<<"No"<<endl;
            return 0;
        }
        d[num]--;
    }
        cout<<"Yes"<<endl;
        return 0;
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: 'cin' was not declared in this scope
    6 |     cin>>n;
      |     ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include <map>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:17:13: error: 'cout' was not declared in this scope
   17 |             cout<<"No"<<endl;
      |             ^~~~
a.cc:17:13: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:17:25: error: 'endl' was not declared in this scope
   17 |             cout<<"No"<<endl;
      |                         ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    1 | #include <map>
  +++ |+#include <ostream>
    2 | using namespace std;
a.cc:22:9: error: 'cout' was not declared in this scope
   22 |         cout<<"Yes"<<endl;
      |         ^~~~
a.cc:22:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:22:22: error: 'endl' was not declared in this scope
   22 |         cout<<"Yes"<<endl;
      |                      ^~~~
a.cc:22:22: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

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

int main()
{
	map<int,int> mp;
	int n;
	cin>>n;
	for (int i=1;i<=n;i++)
	{
		int k;
		cin>>k;
		mp[k]=1;
	}
	cin>>m;
	for (int i=1;i<=m;i++)
	{
		int k;
		cin>>k;
		if (mp[k])
		 mp[k]--;
		else
		 {
		 	cout<<"NO\n";
		 	return 0;
		 }
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:14: error: 'm' was not declared in this scope
   15 |         cin>>m;
      |              ^
Language: C++

#include<iostream>
#include<cstdio>
#include<string>
#include<cstring>
#include<algorithm>
#include<cstdlib>
#include<cmath>
#include<vector>
#include<deque>
#include<utility>
#include<queue>
#include<stack>
#define REP(i,n) for(int i=0;i<(n);i++)
#define FOR(i,x,n) for(int i=(x);i<(n);i++)
#define EREP(i,n) for(int i=1;i<=n;i++)
typedef long long int ll;
typedef unsigned long long int ull;
	const ll MOD7=1000000007;
	const ll INF=200000;
using namespace std;
int main(){
	ll n,d[INF],m,t[INF],ans=0,some[10002],ans=0;
	for(int i=0;i<10000;i++){
		some[i]=0;
	}
	cin>>n;
	REP(i,n)cin>>d[i];
	cin>>m;
	REP(i,m)cin>>t[i];
	for(int i=0;i<m;i++){
		for(int j=0;j<n;j++){
			if(d[i]==t[j]){
				some[t[i]]=1;
			}
		}
	}
	for(int i=1;i<=10000;i++){
		if(some[i]==1){
			ans++;
		}
	}
	if(ans==m){
		cout<<"YES"<<endl;
	}
	else{
		cout<<"NO"<<endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:48: error: redeclaration of 'll ans'
   22 |         ll n,d[INF],m,t[INF],ans=0,some[10002],ans=0;
      |                                                ^~~
a.cc:22:30: note: 'll ans' previously declared here
   22 |         ll n,d[INF],m,t[INF],ans=0,some[10002],ans=0;
      |                              ^~~
Language: C++

#include<iostream>
#include<cstdio>
#include<string>
#include<cstring>
#include<algorithm>
#include<cstdlib>
#include<cmath>
#include<vector>
#include<deque>
#include<utility>
#include<queue>
#include<stack>
#define REP(i,n) for(int i=0;i<(n);i++)
#define FOR(i,x,n) for(int i=(x);i<(n);i++)
#define EREP(i,n) for(int i=1;i<=n;i++)
typedef long long int ll;
typedef unsigned long long int ull;
	const ll MOD7=1000000007;
	const ll INF=200000;
using namespace std;
int main(){
	ll n,d[INF],m,t[INF],ans=0,some[INF+2]={},ans=0;
	cin>>n;
	REP(i,n)cin>>d[i];
	cin>>m;
	REP(i,m)cin>>t[i];
	for(int i=0;i<m;i++){
		for(int j=0;j<n;j++){
			if(d[i]==t[j]){
				some[t[i]]=1;
			}
		}
	}
	for(int i=1;i<=10000;i++){
		if(some[i]==1){
			ans++;
		}
	}
	if(ans==m){
		cout<<"YES"<<endl;
	}
	else{
		cout<<"NO"<<endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:51: error: redeclaration of 'll ans'
   22 |         ll n,d[INF],m,t[INF],ans=0,some[INF+2]={},ans=0;
      |                                                   ^~~
a.cc:22:30: note: 'll ans' previously declared here
   22 |         ll n,d[INF],m,t[INF],ans=0,some[INF+2]={},ans=0;
      |                              ^~~
Language: C++

#include<iostream>
#include<cstdio>
#include<string>
#include<cstring>
#include<algorithm>
#include<cstdlib>
#include<cmath>
#include<vector>
#include<deque>
#include<utility>
#include<queue>
#include<stack>
#define REP(i,n) for(int i=0;i<(n);i++)
#define FOR(i,x,n) for(int i=(x);i<(n);i++)
#define EREP(i,n) for(int i=1;i<=n;i++)
typedef long long int ll;
typedef unsigned long long int ull;
	const ll MOD7=1000000007;
	const ll INF=200000;
using namespace std;
int main(){
	ll n,d[INF],m,t[INF],ans=0,some[INF+2]={},ans=0;
	cin>>n;
	REP(i,n)cin>>d[i];
	cin>>m;
	REP(i,m)cin>>t[i];
	for(int i=0;i<m;i++){
		for(int i=0;i<n;i++){
			if(d[i]==t[j]){
				some[t[i]]=1;
			}
		}
	}
	for(int i=1;i<=10000;i++){
		if(some[i]==1){
			ans++;
		}
	}
	if(ans==m){
		cout<<"YES"<<endl;
	}
	else{
		cout<<"NO"<<endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:51: error: redeclaration of 'll ans'
   22 |         ll n,d[INF],m,t[INF],ans=0,some[INF+2]={},ans=0;
      |                                                   ^~~
a.cc:22:30: note: 'll ans' previously declared here
   22 |         ll n,d[INF],m,t[INF],ans=0,some[INF+2]={},ans=0;
      |                              ^~~
a.cc:29:36: error: 'j' was not declared in this scope
   29 |                         if(d[i]==t[j]){
      |                                    ^
Language: C++

#include <vector>
using namespace std;
int binarySearch(int key,int n, vector<int> A) {
	int left = 0, right = n, mid;
	while (left < right) {
		mid = (left + right) / 2;
		if (A[mid] == key) {
			return mid;
			break;
		}
		else if (key < A[mid]) {
			right = mid;
		}
		else {
			left = mid + 1;
		}
	}
		return 0;
}
int main() {
	vector<int> D;
	int N, M, n, m;
	cin >> N;
	for (int i = 0; i < N; ++i) {
		cin >> n;
		D.emplace_back(n);
	}
	cin >> M;
	sort(D.begin(), D.end());
	for (int i = 0; i < M; ++i) {
		cin >> n;
		m = binarySearch(n, N, D);
		if (m != 0) {
			D.erase(D.begin() + m + 1);
			--N;
			break;
		}
		else {
			cout << "NO";
			for (int j = 0; j < N; ++j) {
				cout << D[j] << endl;
			}
			return 0;
		}
	}
	cout << "YES";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:9: error: 'cin' was not declared in this scope
   23 |         cin >> N;
      |         ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include <vector>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:29:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   29 |         sort(D.begin(), D.end());
      |         ^~~~
      |         short
a.cc:39:25: error: 'cout' was not declared in this scope
   39 |                         cout << "NO";
      |                         ^~~~
a.cc:39:25: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:41:49: error: 'endl' was not declared in this scope
   41 |                                 cout << D[j] << endl;
      |                                                 ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    1 | #include <vector>
  +++ |+#include <ostream>
    2 | using namespace std;
a.cc:46:9: error: 'cout' was not declared in this scope
   46 |         cout << "YES";
      |         ^~~~
a.cc:46:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

//============================================================================
// Name        : CODEFESTIVAL2017qualB.cpp
// Author      : 
// Version     :
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================

#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <string>
#include <cmath>
#include <cstring>
#include <vector>
#include <algorithm>

using namespace std;

inline int main1();
inline int main2();
inline int main3();
inline int main4();

int main() {

	main4();

	return 0;
}

inline int main1() {

	string s;

	cin >> s;

	cout << s.substr(0, s.length() - 8);

	return 0;
}

int compare_int(const void *a, const void *b) {
	return *(int*) a - *(int*) b;
}

inline int main2() {

	int i, j;
	int n, m;
	int temp;
	int *d, *t;
	bool flag;

	cin >> n;

	d = new int[n];

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

	cin >> m;

	t = new int[m];

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

	qsort(d, n, sizeof(int), compare_int);

	qsort(t, m, sizeof(int), compare_int);

	flag = false;

	for (i = 0; i < m; i++) {

		for (j = temp; j < n; j++)
			if (t[i] == d[j]) {
				d[j] = 0;
				flag = true;
				temp = j;
				break;
			} else if ((d[i] != 0) && (d[i] > t[i])) {
				break;
			}

		if (!flag) {
			cout << "NO";
			return 0;
		}

		flag = false;

	}

	cout << "YES";
	return 0;

}

Compiler output:
a.cc:23:12: warning: inline function 'int main4()' used but never defined
   23 | inline int main4();
      |            ^~~~~
/usr/bin/ld: /tmp/ccTkWGtl.o: in function `main':
a.cc:(.text+0x5): undefined reference to `main4()'
collect2: error: ld returned 1 exit status
Language: C++

#include<stdio.h>
#include <stdio.h>
#include <stdlib.h>

int n;
long D[200000];
long T[200000];
int index;
int n,m;
long i,j;

void quicksort(long a[200000],int left,int right){
	int t,i,j,temp;

	if(left>right){
		return;
	}
	i=left;
	j=right;
	temp=a[left];

	while(i!=j){
		while(i<j&&a[j]>=temp){
		j--;
	}
	while(i<j&&a[i]<=temp){
		i++;
	}

	if(i<j){
		 t=a[i];
		a[i]=a[j];
		a[j]=t;
	}
	}

		a[left]=a[i];
		a[i]=temp;

	quicksort(a,left,i-1);
	quicksort(a,i+1,right);
	return;
}

int main(int argc,char *argv[]){


    while(scanf("%d",&n)!=EOF)
    {
        index=0;
long book[200000]={0};

        for(i=1; i<=n; i++)
        {
            scanf("%ld",&D[i]);
        }
        quicksort(D,1,n);


        scanf("%d",&m);


        for(i=1; i<=m; i++)
        {
            scanf("%ld",&T[i]);
        }
        quicksort(T,1,m);



//start
        for(i=1;i<=m;i++){
            for(j=1;j<=n;j++){
                if(T[i]==D[j]&&book[j]==0){
                        book[j]=1;
                    index++;
                    break;
                }
            }
        }

        if(index==m&&m<=n){
            printf("YES\n");
        }else
            printf("NO\n");




    }



    return 0;

}










Compiler output:
a.cc:8:5: warning: built-in function 'index' declared as non-function [-Wbuiltin-declaration-mismatch]
    8 | int index;
      |     ^~~~~
a.cc:9:5: error: redefinition of 'int n'
    9 | int n,m;
      |     ^
a.cc:5:5: note: 'int n' previously declared here
    5 | int n;
      |     ^
Language: C++

#include<stdio.h>
#include <stdio.h>
#include <stdlib.h>

int n;
long D[200000];
long T[200000];
int index;
int n,m;
int i,j;

void quicksort(int a[200000],int left,int right){
	int t,i,j,temp;

	if(left>right){
		return;
	}
	i=left;
	j=right;
	temp=a[left];

	while(i!=j){
		while(i<j&&a[j]>=temp){
		j--;
	}
	while(i<j&&a[i]<=temp){
		i++;
	}

	if(i<j){
		 t=a[i];
		a[i]=a[j];
		a[j]=t;
	}
	}

		a[left]=a[i];
		a[i]=temp;

	quicksort(a,left,i-1);
	quicksort(a,i+1,right);
	return;
}

int main(int argc,char *argv[]){


    while(scanf("%d",&n)!=EOF)
    {
        index=0;
int book[200000]={0};

        for(i=1; i<=n; i++)
        {
            scanf("%ld",&D[i]);
        }
        quicksort(D,1,n);


        scanf("%d",&m);


        for(i=1; i<=m; i++)
        {
            scanf("%ld",&T[i]);
        }
        quicksort(T,1,m);



//start
        for(i=1;i<=m;i++){
            for(j=1;j<=n;j++){
                if(T[i]==D[j]&&book[j]==0){
                        book[j]=1;
                    index++;
                    break;
                }
            }
        }

        if(index==m&&m<=n){
            printf("YES\n");
        }else
            printf("NO\n");




    }



    return 0;

}










Compiler output:
a.cc:8:5: warning: built-in function 'index' declared as non-function [-Wbuiltin-declaration-mismatch]
    8 | int index;
      |     ^~~~~
a.cc:9:5: error: redefinition of 'int n'
    9 | int n,m;
      |     ^
a.cc:5:5: note: 'int n' previously declared here
    5 | int n;
      |     ^
a.cc: In function 'int main(int, char**)':
a.cc:57:19: error: cannot convert 'long int*' to 'int*'
   57 |         quicksort(D,1,n);
      |                   ^
      |                   |
      |                   long int*
a.cc:12:20: note:   initializing argument 1 of 'void quicksort(int*, int, int)'
   12 | void quicksort(int a[200000],int left,int right){
      |                ~~~~^~~~~~~~~
a.cc:67:19: error: cannot convert 'long int*' to 'int*'
   67 |         quicksort(T,1,m);
      |                   ^
      |                   |
      |                   long int*
a.cc:12:20: note:   initializing argument 1 of 'void quicksort(int*, int, int)'
   12 | void quicksort(int a[200000],int left,int right){
      |                ~~~~^~~~~~~~~
Language: C++

#include<algorithm>
using namespace std;


 int main(){
  int N, M;
  int D[10];
  int T[10];
  int i;


  cin >> N;
  for ( i = 0; i < N; i++ ) cin >> D[i];
  cin >> M;
  for ( i = 0; i < M; i++ ) cin >> T[i];
  

  sort (D,D+N, less<int>());
  sort (T,T+M, less<int>());


  if ((N-M >= 0) && (D[i] != T[i]))
   cout << "Yes" << endl;

   else cout << "No" << endl;

 
 return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:3: error: 'cin' was not declared in this scope
   12 |   cin >> N;
      |   ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include<algorithm>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:18:16: error: 'less' was not declared in this scope
   18 |   sort (D,D+N, less<int>());
      |                ^~~~
a.cc:18:21: error: expected primary-expression before 'int'
   18 |   sort (D,D+N, less<int>());
      |                     ^~~
a.cc:19:21: error: expected primary-expression before 'int'
   19 |   sort (T,T+M, less<int>());
      |                     ^~~
a.cc:23:4: error: 'cout' was not declared in this scope
   23 |    cout << "Yes" << endl;
      |    ^~~~
a.cc:23:4: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:23:21: error: 'endl' was not declared in this scope
   23 |    cout << "Yes" << endl;
      |                     ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    1 | #include<algorithm>
  +++ |+#include <ostream>
    2 | using namespace std;
a.cc:25:9: error: 'cout' was not declared in this scope
   25 |    else cout << "No" << endl;
      |         ^~~~
a.cc:25:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:25:25: error: 'endl' was not declared in this scope
   25 |    else cout << "No" << endl;
      |                         ^~~~
a.cc:25:25: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

#include <iostream>
#include <algorithm>
#include <cstdio>
#include <cstring>
using namespace std;
int main()
{
    int n,m;
    int a[200005],s[200005];
    cin>>n;
    for(int i=0;i<n;i++)
    {
        cin>>a[i];
    }
    cin>>m;
    for(int i=0;i<m;i++)
    {
        cin>>s[i];
    }
    sort(a,a+n);
    sort(s,s+m);
    int s=0;
    for(int i=0,j=0;i<n&&j<m;)
    {
        if(a[i]==s[j])
        {
            i++;
            j++;
            s++;
        }
        else if(a[i]>s[j])j++;
    }
    if(s==m)cout<<"YES"<<endl;
    else cout<<"NO"<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:9: error: conflicting declaration 'int s'
   22 |     int s=0;
      |         ^
a.cc:9:19: note: previous declaration as 'int s [200005]'
    9 |     int a[200005],s[200005];
      |                   ^
a.cc:29:13: error: lvalue required as increment operand
   29 |             s++;
      |             ^
a.cc:33:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   33 |     if(s==m)cout<<"YES"<<endl;
      |        ~^~~
Language: C++

#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<ctime>
#include<cctype>
#include<climits>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<numeric>
#include<utility>
#include<complex>
#include<memory>
#include<functional>
#include<set>
 
using namespace std;
 
#define ALL(g) (g).begin(),(g).end()
#define REP(i, x, n) for(int i = x; i < n; i++)
#define rep(i,n) REP(i,0,n)
#define F(i,j,k) fill(i[0],i[0]+j*j,k)
#define P(p) cout<<(p)<<endl;
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define INF 1<<25
#define pb push_back
 
typedef vector<int> vi;
typedef vector<long long> vl;
typedef vector<double> vd;
typedef pair<int,int> pii;
typedef pair<long,long> pll;
typedef long long ll;
int D[200001],T[200001];
int memo[200001];
int* binary_search(int* array, size_t size, int value)
{
	int lower, upper, mid;

	lower = 0;     /* 探索範囲の下限の添字 */
	upper = size;  /* 探索範囲の上限の添字 + 1 */

	while( lower < upper ){  /* 上限と下限が逆転したら終わり */

		/* 中央の位置を求める */
		mid = (lower + upper) / 2;

		if( array[mid] < value ){
			lower = mid + 1;  /* 次は中央より後ろを調べるため、下限を変更 */
		}
		else{
			/* ここに来るケースには、目的の値と同じ場合を含んでいる */
			/* そのため、upper = mid - 1; ではない */
			upper = mid;  /* 次は中央より手前を調べるため、上限を変更 */
		}
	}

	/* 目的の値を発見している場合も、発見できなかった場合も、
	   ここに来ることになるので、ここで最終的な確認を行う。
	   lower == upper は、array が空の場合への備え。 */
	if (lower == upper && array[lower] == value){
		if(array[lower+memo[lower]==value]){
			return &array[lower];
			memo[lower]++;
		}
	}

	return NULL;
}
int main(){
	int N;
	cin>>N;
	rep(i,N){
		cin>>D[i];
	}
	int M;
	cin>>M;
	rep(i,M){
		cin>>T[i];
	}
	sort(D,D+N);
//	sort(T,T+M);
	rep(i,M){
			int *p;
			p=binary_search_a(D,N,T[i]);
			if(p==NULL){
				cout<<"NO"<<endl;
				return 0;
			}
	}
/*	rep(i,M){
		rep(j,N){
			if(T[i]==D[j]){
				D[j]=-1;
				goto ok;
			}
		}
		goto fal;
	ok:;
	}*/
	cout<<"YES"<<endl;
	return 0;
//	fal:
//	cout<<"NO"<<endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:91:27: error: 'binary_search_a' was not declared in this scope; did you mean 'binary_search'?
   91 |                         p=binary_search_a(D,N,T[i]);
      |                           ^~~~~~~~~~~~~~~
      |                           binary_search
Language: C++

    #include <iostream>
    #include <vector>
    #include <set>
     
    using namespace std;
     
    int main()
    {
    int M, N;
    multiset< long long int > S;
     
    cin >> M;
    for(int i = 0; i < M; i++) {
    long long int tmp;
    cin >> tmp;
    S.insert(tmp);
    }
    cin >> N;
    multiset< long long int > T;
    vector< long long int > a;
    for(int i = 0; i < N; i++) {
    long long int tmp;
    cin >> tmp;
    T.insert(tmp);
    a.push_back(tmp);
    }
    
    sort(a.begin(), a.end());
    a.erase(unique(a.begin(), a.end()), a.end());
    for(int i = 0; i < a.size(); i++) {
      if(T.count(a[i]) > S.count(a[i])) {cout << "NO" << endl; return 0;}
    }

    cout << "YES" << endl;
     
    return 0;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:28:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   28 |     sort(a.begin(), a.end());
      |     ^~~~
      |     short
a.cc:29:13: error: 'unique' was not declared in this scope
   29 |     a.erase(unique(a.begin(), a.end()), a.end());
      |             ^~~~~~
Language: C

#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <algorithm>

using namespace std;

map<int, int> D;
int N,M,T;

int main()
{
	cin >> N;
	for(int i=0;i<N;i++)
	{
		cin >> T;
		D[T]++;
	}
	cin >> M;
	while(M--)
	{
		cin >> T;
		if(D[T]--<=0)
		{
			cout << "NO" << endl;
			return 0;
		}
	}
	cout << "YES" << endl;
	return 0;
}

Compiler output:
main.c:1:10: fatal error: cstdlib: No such file or directory
    1 | #include <cstdlib>
      |          ^~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
int N;
vector<int> D(200001);
int M;
vector<int> T(200001);
int binarySearch(int i) {
	int left = 1;
	int right = N+1;
	while (left < right) {
		int mid = (left + right) / 2;
		if (D[mid] == T[i]) {
			return mid;
		}
			else if(T[i] < D[mid]) {
				right = mid;
			}
			else {
				left = mid + 1;
			}
	}
	return 0;
}
int Search(int i) {
	for (int i = 1; i <= N; i++) {
		if(D[i] == T[i]){
			return i;
	}
		return 0;
}


int main() {
	cin >> N;
	for (int i = 1; i <= N; i++) {
		cin >> D[i];
	}
	cin >> M;
	for (int i = 1; i <= M; i++) {
		cin >> T[i];
	}
	for (int i = 1; i <= M; i++) {
		int pos = Search(i);
		if (pos == 0) {
			cout << "NO" << endl;
			return 0;
		}
		else {
			D[pos] = 0;
		}
	}
	cout << "YES" << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int Search(int)':
a.cc:35:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   35 | int main() {
      |         ^~
a.cc:35:9: note: remove parentheses to default-initialize a variable
   35 | int main() {
      |         ^~
      |         --
a.cc:35:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:35:12: error: a function-definition is not allowed here before '{' token
   35 | int main() {
      |            ^
a.cc:56:2: error: expected '}' at end of input
   56 | }
      |  ^
a.cc:26:19: note: to match this '{'
   26 | int Search(int i) {
      |                   ^
a.cc:56:2: warning: control reaches end of non-void function [-Wreturn-type]
   56 | }
      |  ^
Language: C++

# include <bits/stdc++.h>

#define fr first
#define sc second
#define mk make_pair
#define pb push_back
#define ll long long

using namespace std;

 map<int,int>m;
int main()
{
    int n, m, i, a, b;
    cin >> n;
    for (i = 0; i < n; i++)
    {
        cin >> a;
       m[a]++;
    }
    cin >> m;
    for (i = 0; i < m; i++)
    {
        cin >> b;
        m[a]--;
        if (m[a] < 0)
        {
            cout << "NO";
            return 0;
        }

    }
    cout << "YES";
   return 0;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:19:9: error: invalid types 'int[int]' for array subscript
   19 |        m[a]++;
      |         ^
a.cc:25:10: error: invalid types 'int[int]' for array subscript
   25 |         m[a]--;
      |          ^
a.cc:26:14: error: invalid types 'int[int]' for array subscript
   26 |         if (m[a] < 0)
      |              ^
Language: C++

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

int main(){
  int n,m;
  int prob[200000],nd[200000];
  int tmp;
  cin>>n;

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

  sort(prob.begin(), prob.end());
  cin>>m;
  for(int i=0;i<m;i++){
    cin>>tmp;
    nd[i]=tmp;
  }
  sort(nd.begin(), nd.end());
  if(includes(prob.begin(), prob.end(), nd.begin(), nd.end()){
    cout<<"YES"<<endl;
  }else{
    cout<<"NO"<<endl;
  }


  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:13: error: request for member 'begin' in 'prob', which is of non-class type 'int [200000]'
   17 |   sort(prob.begin(), prob.end());
      |             ^~~~~
a.cc:17:27: error: request for member 'end' in 'prob', which is of non-class type 'int [200000]'
   17 |   sort(prob.begin(), prob.end());
      |                           ^~~
a.cc:23:11: error: request for member 'begin' in 'nd', which is of non-class type 'int [200000]'
   23 |   sort(nd.begin(), nd.end());
      |           ^~~~~
a.cc:23:23: error: request for member 'end' in 'nd', which is of non-class type 'int [200000]'
   23 |   sort(nd.begin(), nd.end());
      |                       ^~~
a.cc:24:20: error: request for member 'begin' in 'prob', which is of non-class type 'int [200000]'
   24 |   if(includes(prob.begin(), prob.end(), nd.begin(), nd.end()){
      |                    ^~~~~
a.cc:24:34: error: request for member 'end' in 'prob', which is of non-class type 'int [200000]'
   24 |   if(includes(prob.begin(), prob.end(), nd.begin(), nd.end()){
      |                                  ^~~
a.cc:24:44: error: request for member 'begin' in 'nd', which is of non-class type 'int [200000]'
   24 |   if(includes(prob.begin(), prob.end(), nd.begin(), nd.end()){
      |                                            ^~~~~
a.cc:24:56: error: request for member 'end' in 'nd', which is of non-class type 'int [200000]'
   24 |   if(includes(prob.begin(), prob.end(), nd.begin(), nd.end()){
      |                                                        ^~~
a.cc:26:4: error: expected primary-expression before 'else'
   26 |   }else{
      |    ^~~~
a.cc:26:4: error: expected ')' before 'else'
   26 |   }else{
      |    ^~~~
      |    )
a.cc:24:5: note: to match this '('
   24 |   if(includes(prob.begin(), prob.end(), nd.begin(), nd.end()){
      |     ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
//i am very dangerous
set s[200000];
set t[200000];
 
int main()
{long m,n;
cin>>n>>m;
for(int i=0;i<n;i++)
cin>>s[i];
for(int i=0;i<m;i++)
cin>>t[i];
if(m>n)
{
    cout<<"NO"<<endl;
    return 0;
}
sort(s,s+n);
sort(t,t+m);long h=0;
for(int i=0;i<m;i++)
{while(s[h]<t[i]&&h<n)
h++;
if(h==n)
{cout<<"NO"<<endl;
    return 0;}
if(s[h]!=t[h])
{
    cout<<"NO"<<endl;
    return 0;
}
h++;
    
}
cout<<"YES"<<endl;
return 0;
}
//mmmm

Compiler output:
a.cc:4:1: error: missing template argument list after 'std::set'; for deduction, template placeholder must be followed by a simple declarator-id
    4 | set s[200000];
      | ^~~
      |    <>
In file included from /usr/include/c++/14/set:63,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:158,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_set.h:96:11: note: 'template<class _Key, class _Compare, class _Alloc> class std::set' declared here
   96 |     class set
      |           ^~~
a.cc:5:1: error: missing template argument list after 'std::set'; for deduction, template placeholder must be followed by a simple declarator-id
    5 | set t[200000];
      | ^~~
      |    <>
/usr/include/c++/14/bits/stl_set.h:96:11: note: 'template<class _Key, class _Compare, class _Alloc> class std::set' declared here
   96 |     class set
      |           ^~~
a.cc: In function 'int main()':
a.cc:11:6: error: 's' was not declared in this scope
   11 | cin>>s[i];
      |      ^
a.cc:13:6: error: 't' was not declared in this scope
   13 | cin>>t[i];
      |      ^
a.cc:19:6: error: 's' was not declared in this scope
   19 | sort(s,s+n);
      |      ^
a.cc:20:6: error: 't' was not declared in this scope
   20 | sort(t,t+m);long h=0;
      |      ^
Language: C++

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

int main(){
    int n,m;
    cin >> n;
    vector<long long> d(n,0);
    for(int i=0;i<n;i++)cin >> d[i];
    cin >> m;
    vector<long long> t(m,0);
    for(int i=0;i<m;i++)cin >> t[i];
    sort(d.begin(),d.end());
    sort(t.begin(),t.end());
    int frg=1,st=0;
    for(int i=0;i<m;i++){
        for(int j=st;j<n;j++){
            if(t[i]==d[j]){
                st=j+1;
                break;
            }else if(t[i]<d[j]){
                frg=0;
                break;
            }else if(m-i>n-j){
                frg=0;
                break;
            }
        }
        if(!frg)break;
    }
    if(frg)cout << "YES" << endl;
    else cout << "NO" << endl;
}


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

#include <iostream>
#include <math.h>
#include <algorithm>
#include <vector>
#include <numeric>
#include <string>
using namespace std;
const double PI = acos(-1.0);
const string alp = "abcdefghijklmnopqrstuvwxyz";
const string ALP = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
int main(){
  int n,m;
  cin >> n;
  vector<int> v(n);
  REP(i,n){
    cin >> v[i];
  }
  cin >> m;
  int d,c;
  c = 0;
  SORT(v);
  REP(i,m){
    cin >> d;
    REP(j,n){
      if(v[j]==d){
        c++;
        v[j]=0;
        break;
      } else if(v[j] > d) {
        c = -1
        break;
      }
    }
    if (c==-1){
      break;
    }
  }
  if (m==c) {
    puts("YES");
  } else {
    puts("NO");
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:34:15: error: expected ';' before 'break'
   34 |         c = -1
      |               ^
      |               ;
   35 |         break;
      |         ~~~~~
Language: C++

int main()
{
  // 入力
  int N;                // 問題案
  cin >> N;
  vector<int> D(N);
  for (int i = 0; i < N; i++) {
    cin >> D[i];
  }

  int M;        // 問題セット
  cin >> M;
  vector<int> T(M);
  for (int i = 0; i < M; i++) {
    cin >> T[i];
  }

  // 並び替え
  sort(D.begin(), D.end());
  sort(T.begin(), T.end());

  // for (int i = 0; i < M; i++) {  // 確認用
  //   cout << T[i] << ' ';
  // } cout << endl;

  int j = 0; // 問題案カウンタ
  int i = 0; // i = Mまでいけば全問ある
  for (i = 0; i < M; i++) {
    if (T[i] == D[j]) {
      j++;
    }
    else if (D[j] > T[i]) break;
    while (D[j] < T[i]) j++;
  }

  if (i == M) cout << "YES" << endl;
  else cout <<  "NO" << endl;

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin >> N;
      |   ^~~
a.cc:6:3: error: 'vector' was not declared in this scope
    6 |   vector<int> D(N);
      |   ^~~~~~
a.cc:6:10: error: expected primary-expression before 'int'
    6 |   vector<int> D(N);
      |          ^~~
a.cc:8:12: error: 'D' was not declared in this scope
    8 |     cin >> D[i];
      |            ^
a.cc:13:10: error: expected primary-expression before 'int'
   13 |   vector<int> T(M);
      |          ^~~
a.cc:15:12: error: 'T' was not declared in this scope
   15 |     cin >> T[i];
      |            ^
a.cc:19:8: error: 'D' was not declared in this scope
   19 |   sort(D.begin(), D.end());
      |        ^
a.cc:19:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   19 |   sort(D.begin(), D.end());
      |   ^~~~
      |   short
a.cc:20:8: error: 'T' was not declared in this scope
   20 |   sort(T.begin(), T.end());
      |        ^
a.cc:36:15: error: 'cout' was not declared in this scope
   36 |   if (i == M) cout << "YES" << endl;
      |               ^~~~
a.cc:36:32: error: 'endl' was not declared in this scope
   36 |   if (i == M) cout << "YES" << endl;
      |                                ^~~~
a.cc:37:8: error: 'cout' was not declared in this scope
   37 |   else cout <<  "NO" << endl;
      |        ^~~~
a.cc:37:25: error: 'endl' was not declared in this scope
   37 |   else cout <<  "NO" << endl;
      |                         ^~~~