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

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

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

  vector <long long int> H(N);
  for(int i=0; i<N;i++){
    cin >> H.at(i);
  }

  vector <int> A(M),B(M);
  vector <bool> C(N,true);
  for(int i=0; i<M;i++){
    cin >> A.at(i) >> B.at(i);
    if(H.at(A.at(i)-1)<H.at(B.at(i)-1)){
      C.at(A.at(i)-1)=false;
    }else if(H.at(A.at(i)-1)==H.at(B.at(i)-1)){
      C.at(A.at(i)-1)=false;
      C.at(B.at(i)-1)=false;
    }else if(A.at(i)-1)>H.at(B.at(i)-1)){
      C.at(B.at(i)-1)=false;
  }

  int sum=0;

  //cout << "KA" << endl;

  for(int i=0; i<N;i++){
    //cout << C.at(i) <<endl;
    if(C.at(i)==true){
      sum++;
    }
  }



  cout << sum << endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:24: error: expected primary-expression before '>' token
   22 |     }else if(A.at(i)-1)>H.at(B.at(i)-1)){
      |                        ^
a.cc:41:2: error: expected '}' at end of input
   41 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int tenboudai = sc.nextInt();
		int miti = sc.nextInt();
      	int[] hyoukou = new int[tenboudai];
      	int ans = 0;
      	for (int i=0; i<tenboudai; i++){
        	int c = sc.nextInt();
         	hyoukou[c] = 1
        }
      	for (int i=0; i<miti; i++){
          int a = sc.nextInt();
          int b = sc.nextInt();
          if (b == 0){
            ans += 1;
            continue;
          }
          if (hyoukou[a - 1] > hyoukou[b - 1]){
            ans += 1;
          }else if (hyoukou[a - 1] < hyoukou[b - 1]){
            ans += 1;
          }
        }
		System.out.println(ans);
	}
}

Compiler output:
Main.java:11: error: ';' expected
         	hyoukou[c] = 1
         	              ^
1 error
Language: C++

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

int main() {
  int N, M, A, B;
  cin >> N >> M;
  map<int, int> mp;
  int arr[N];
  for(int i = 0; i < N; i++){
    cin >> arr[i];
    if(!(mp.count(arr[i]))){
      mp[arr[i]] = 1;
    }
    else{
      mp[arr[i]] += 1;
    }
  }
  
  for(int i = 0; i < M; i++){
    cin >> A >> B;
  	if(arr[A - 1] < arr[B - 1]){
      if(mp.count(arr[A - 1])){
        N -= mp.at(arr[A - 1]);
        mp.erase(arr[A - 1]);
      }
    }
    else if(arr[A - 1] > arr[B - 1]){
      if(mp.count(arr[B - 1])){
        N -= mp.at(arr[B - 1]);
        mp.erase(arr[B - 1]);
      }
    }
    else{
      if(mp.count(arr[A - 1])){
        N -= mp.at(arr[A - 1]);
        mp.erase(arr[A - 1]);
      }
      if(mp.count(arrB - 1])){
        N -= mp.at(arr[B - 1]);
        mp.erase(arr[B - 1]);
      }
    }
  }
    
  cout << N << endl;
  
  return 0;
        
}


Compiler output:
a.cc: In function 'int main()':
a.cc:38:19: error: 'arrB' was not declared in this scope; did you mean 'arr'?
   38 |       if(mp.count(arrB - 1])){
      |                   ^~~~
      |                   arr
a.cc:38:27: error: expected ')' before ']' token
   38 |       if(mp.count(arrB - 1])){
      |         ~                 ^
      |                           )
a.cc:38:27: error: expected primary-expression before ']' token
Language: C++

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

int main() {
  int N, M, A, B;
  cin >> N >> M;
  map<int, int> mp;
  int arr[N];
  for(int i = 0; i < N; i++){
    cin >> arr[i];
    if(!(mp.count(arr[i]))){
      mp[arr[i]] = 1;
    }
    else{
      mp[arr[i]] += 1;
    }
  }
  
  for(int i = 0; i < M; i++){
    cin >> A >> B;
  	if(arr[A - 1] < arr[B - 1]){
      if(mp.count(arr[A - 1])){
        N -= mp.at(arr[A - 1]);
        mp.erase(arr[A - 1]);
      }
    }
    else if(arr[A - 1] > arr[B - 1]){
      if(mp.count(arr[B - 1])){
        N -= mp.at(arr[B - 1]);
        mp.erase(arr[B - 1]);
      }
    }
    else{
      if(mp.count(arr[A - 1])){
        N -= mp.at(arr[A - 1]);
        mp.erase(arr[A - 1]);
      }
      if(mp.count(arrB - 1])){
        N -= mp.at(arr[B - 1]);
        mp.erase(arr[B - 1]);
      }
    }
  }
    
  cout << N << endl;
  
  return 0;
        
}

Compiler output:
a.cc: In function 'int main()':
a.cc:38:19: error: 'arrB' was not declared in this scope; did you mean 'arr'?
   38 |       if(mp.count(arrB - 1])){
      |                   ^~~~
      |                   arr
a.cc:38:27: error: expected ')' before ']' token
   38 |       if(mp.count(arrB - 1])){
      |         ~                 ^
      |                           )
a.cc:38:27: error: expected primary-expression before ']' token
Language: C++

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



int main() {
    vector<vector<int>> B(100001, vector<int>(100001));

    // int B[100001][100001];
    int H[100001];
    int N,M;
    cin >> N >> M;

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


    for(int i=0;i<M;i++){
        int a,b;
        cin >> a >> b;
        B.at(a).at(b)++;
        B.at(b).at(a)++;
        // B[a][b]++;
        // B[b][a]++;
    }
    int cnt = 0; 
    for(int i=1;i<N+1;i++){
        int max = H[i];
        for(int j=1;j<N+1;j++){
            if(B.at(i).at(j) > 0){
                if(max <= H[j]){
                    max = 0;
                    break;
                }
            }
        }
        if(max == H[i]){
            cnt++;
        }
    }
    cout << cnt << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: 'vector' was not declared in this scope
    8 |     vector<vector<int>> B(100001, vector<int>(100001));
      |     ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include <iostream>
  +++ |+#include <vector>
    2 | // #include <bits/stdc++.h>
a.cc:8:19: error: expected primary-expression before 'int'
    8 |     vector<vector<int>> B(100001, vector<int>(100001));
      |                   ^~~
a.cc:23:9: error: 'B' was not declared in this scope
   23 |         B.at(a).at(b)++;
      |         ^
a.cc:32:16: error: 'B' was not declared in this scope
   32 |             if(B.at(i).at(j) > 0){
      |                ^
Language: C++

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

#define ll long long



int main() {
	ll n, m;
	ll a, b;
	ll i;
	ll count = 0;
	cin >> n >> m;
	vector<ll>h(n+1);
	vector<ll>chk(n + 1); 
	for (i = 1; i <= n; i++) {
		cin >> h[i];
	}
	vector<vector<int>>s(n + 1, vector<int>(n+1));
	for (i = 1; i <= m; i++) {
		cin >> a >> b;
		if (a < b) {
			if (s[m][] != 0)count--;
			s[a][b]++;
		}
		else {
			if (s[b][a] != 0)count--;
			s[b][a]++;
		}
		if (h[a] > h[b])chk[b]++;
		else chk[a]++;
	}
	for (i = 1; i <= n; i++) {
		if (chk[i] == 0)count++;
	}

	cout << count;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:34: error: expected primary-expression before ']' token
   23 |                         if (s[m][] != 0)count--;
      |                                  ^
Language: C++

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

int main() {
  int n,m;
  cin>>n>>m;
  vector<int>h(n);
   vector<int>ans(n);
  for(int i=0;i<n;i++){
    cin>>h[i];
  }
  vector<vector<int>> b(m, vector<int>(2));
  for(int i=0;i<m;i++){
    cin>>b.at(i).at(0)>>b.at(i).at(1); 
  }
  for(int i=0;i<m;i++){
    if(h.at(b.at(i).at(0)) > h.at(b.at(i).at(1))){
     ans.erase(b.begin()+h.at(b.at(i).at(1));
   }
  else{
     ans.erase(b.begin()+h.at(b.at(i).at(0));
   }
  }
  cout<<ans.size()<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:45: error: expected ')' before ';' token
   18 |      ans.erase(b.begin()+h.at(b.at(i).at(1));
      |               ~                             ^
      |                                             )
a.cc:21:45: error: expected ')' before ';' token
   21 |      ans.erase(b.begin()+h.at(b.at(i).at(0));
      |               ~                             ^
      |                                             )
Language: C++

#include<bits/stdc++.h>

using namespace std;

int N, M;
int H[100005];
vector<bool> pass;
unordered_set<int> tempPass;
vector<unordered_set<int> to;
int num = 0;

void dfs(int n, int from){
  pass[n] = true; 
  tempPass.emplace(n);

  bool top = true;
  for(auto &next : to[n]){
    if (next == from) continue;
    if(tempPass.find(next) != tempPass.end()) continue;
    if(pass[next]) 
    {
      top = false;
      continue;
    }
    if(H[next] >= H[n]){ 
      dfs(next);
      top = false;
      continue;
    }
  }
  
  if(top){
    cout << n << endl;
    ++num;
  }
}

int main(){
  cin >> N >> M;
  to.resize(N);
  pass.resize(N, false);
  
  for(int i=0; i<N; i++) cin >> H[i];
  for(int i=0; i<M; i++){
    int a, b;
    cin >> a >> b;
    to[a].emplace(b);
    to[b].emplace(a);
  }
  
  for(int i=0; i<N; i++){
    if(pass[i]) continue;
    tempPass.clear();
    dfs(i, -1);
  }
  
  cout << num << endl;
  return 0;
}

Compiler output:
a.cc:9:27: error: template argument 1 is invalid
    9 | vector<unordered_set<int> to;
      |                           ^~
a.cc:9:27: error: template argument 2 is invalid
a.cc: In function 'void dfs(int, int)':
a.cc:17:20: error: 'to' was not declared in this scope; did you mean 'top'?
   17 |   for(auto &next : to[n]){
      |                    ^~
      |                    top
a.cc: In function 'int main()':
a.cc:40:3: error: 'to' was not declared in this scope; did you mean 'tm'?
   40 |   to.resize(N);
      |   ^~
      |   tm
Language: C++

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

int main() {
  int n,m;
  cin>>n>>m;
  vector<int>h(n);
   vector<int>ans(n);
  for(int i=0;i<n;i++){
    cin>>h[i];
  }
  vector<vector<int>> data(m, vector<int>(2));
  for(int i=0;i<m;i++){
    cin>>b.at(i).at(0)>>b.at(i).at(1); 
  }
  for(int i=0;i<m;i++){
    if(h.at(b.at(i).at(0)) > h.at(b.at(i).at(1))){
     ans.erase(a.begin()+h.at(b.at(i).at(1)));
   }
  else{
     ans.erase(a.begin()+h.at(b.at(i).at(0)));
   }
  }
  cout<<ans.size()<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:10: error: 'b' was not declared in this scope
   14 |     cin>>b.at(i).at(0)>>b.at(i).at(1);
      |          ^
a.cc:17:13: error: 'b' was not declared in this scope
   17 |     if(h.at(b.at(i).at(0)) > h.at(b.at(i).at(1))){
      |             ^
a.cc:18:16: error: 'a' was not declared in this scope
   18 |      ans.erase(a.begin()+h.at(b.at(i).at(1)));
      |                ^
a.cc:21:16: error: 'a' was not declared in this scope
   21 |      ans.erase(a.begin()+h.at(b.at(i).at(0)));
      |                ^
Language: C++

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

using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
const ll MOD = 1000000007;
int n, m;
ll h[100005];
bool visit[100005];
int mark = 0;
vector<vector<int>> g;

ll GCD(ll x, ll y){
	return y ? GCD(y, x%y) : x;	
}

int main() {
	int n, m; cin >> n >> m;
	for(int i=1;i<=n;i++){
		cin >> h[i];
		visit[i] = false;
	}
	int a[100005], b[100005];
	g.clear();
	g.resize(n+1);
	for(int i=1;i<=m;i++){
		cin >> a[i] >> b[i];
		g[a[i]].push_back(b[i]);
		g[b[i]].push_back(a[i]);
	}
	int ans = n;
	for(int i=1;i<=n;i++){
		for(auto c: g[i]){
			if(h[i]<=h[c]){
				ans--;
				break;
			}
		}
	}
	cout << ans << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:17: error: reference to 'visit' is ambiguous
   22 |                 visit[i] = false;
      |                 ^~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:80,
                 from a.cc:1:
/usr/include/c++/14/variant:1855:5: note: candidates are: 'template<class _Visitor, class ... _Variants> constexpr std::__detail::__variant::__visit_result_t<_Visitor, _Variants ...> std::visit(_Visitor&&, _Variants&& ...)'
 1855 |     visit(_Visitor&& __visitor, _Variants&&... __variants)
      |     ^~~~~
a.cc:10:6: note:                 'bool visit [100005]'
   10 | bool visit[100005];
      |      ^~~~~
Language: C

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

int main(void)
{
    long n,m.h[100000],ab[100000][2],i,j,con[100001][100001]={0},
    ans=0,ifgood;

    scanf("%ld %ld",&n,&m);
    for ( i = 0; i < n; i++)
    {
        scanf("%ld",h+i);
    }
    for ( i = 0; i < m; i++)
    {
        scanf("%ld %ld",&ab[i][0],&ab[i][1]);
        con[ab[i][0]][0]++;
        con[ab[i][1]][0]++;
        con[ab[i][0]][con[ab[i][0]][0]];
        con[ab[i][1]][con[ab[i][1]][0]];
    }

    for ( i = 1; i <= n; i++)
    {
        ifgood=1;
        j=1;
        while(con[i][j]!=0)
        {
            if(h[con[i][j]]>=h[i]) ifgood=0;
            j++;
        }
        if(ifgood=1) ans++;
    }

    printf("ld",ans);

    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:13: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    6 |     long n,m.h[100000],ab[100000][2],i,j,con[100001][100001]={0},
      |             ^
main.c:6:65: error: expected expression before ',' token
    6 |     long n,m.h[100000],ab[100000][2],i,j,con[100001][100001]={0},
      |                                                                 ^
main.c:7:5: error: 'ans' undeclared (first use in this function); did you mean 'abs'?
    7 |     ans=0,ifgood;
      |     ^~~
      |     abs
main.c:7:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:11: error: 'ifgood' undeclared (first use in this function)
    7 |     ans=0,ifgood;
      |           ^~~~~~
main.c:9:25: error: 'm' undeclared (first use in this function)
    9 |     scanf("%ld %ld",&n,&m);
      |                         ^
main.c:10:11: error: 'i' undeclared (first use in this function)
   10 |     for ( i = 0; i < n; i++)
      |           ^
main.c:12:21: error: 'h' undeclared (first use in this function)
   12 |         scanf("%ld",h+i);
      |                     ^
main.c:16:26: error: 'ab' undeclared (first use in this function); did you mean 'abs'?
   16 |         scanf("%ld %ld",&ab[i][0],&ab[i][1]);
      |                          ^~
      |                          abs
main.c:17:9: error: 'con' undeclared (first use in this function)
   17 |         con[ab[i][0]][0]++;
      |         ^~~
main.c:26:9: error: 'j' undeclared (first use in this function)
   26 |         j=1;
      |         ^
Language: C++

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

using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
const ll MOD = 1000000007;
int n, m;
ll h[100005];
bool visit[100005];
int mark = 0;
vector<vector<int>> g;

ll GCD(ll x, ll y){
	return y ? GCD(y, x%y) : x;	
}
void dfs(int i){
	if(visit[i]) return;
	visit[i] = true;
	for(auto c: g[i]){
		if(h[i]>h[c]){
			dfs(c);
		}else{
			mark = c;
			return;
		}
	}
	return;
}

int main() {
	int n, m; cin >> n >> m;
	for(int i=1;i<=n;i++){
		cin >> h[i];
		visit[i] = false;
	}
	int a[100005], b[100005];
	g.clear();
	g.resize(n+1);
	for(int i=1;i<=m;i++){
		cin >> a[i] >> b[i];
		g[a[i]].push_back(b[i]);
		g[b[i]].push_back(a[i]);
	}
	int ans = n;
	for(int i=1;i<=n;i++){
		for(auto c: g[i]){
			if(h[i]<=h[c]){
				ans--;
				break;
			}
		}
	}
	cout << ans << endl;
	return 0;
}

Compiler output:
a.cc: In function 'void dfs(int)':
a.cc:18:12: error: reference to 'visit' is ambiguous
   18 |         if(visit[i]) return;
      |            ^~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:80,
                 from a.cc:1:
/usr/include/c++/14/variant:1855:5: note: candidates are: 'template<class _Visitor, class ... _Variants> constexpr std::__detail::__variant::__visit_result_t<_Visitor, _Variants ...> std::visit(_Visitor&&, _Variants&& ...)'
 1855 |     visit(_Visitor&& __visitor, _Variants&&... __variants)
      |     ^~~~~
a.cc:10:6: note:                 'bool visit [100005]'
   10 | bool visit[100005];
      |      ^~~~~
a.cc:19:9: error: reference to 'visit' is ambiguous
   19 |         visit[i] = true;
      |         ^~~~~
/usr/include/c++/14/variant:1855:5: note: candidates are: 'template<class _Visitor, class ... _Variants> constexpr std::__detail::__variant::__visit_result_t<_Visitor, _Variants ...> std::visit(_Visitor&&, _Variants&& ...)'
 1855 |     visit(_Visitor&& __visitor, _Variants&&... __variants)
      |     ^~~~~
a.cc:10:6: note:                 'bool visit [100005]'
   10 | bool visit[100005];
      |      ^~~~~
a.cc: In function 'int main()':
a.cc:35:17: error: reference to 'visit' is ambiguous
   35 |                 visit[i] = false;
      |                 ^~~~~
/usr/include/c++/14/variant:1855:5: note: candidates are: 'template<class _Visitor, class ... _Variants> constexpr std::__detail::__variant::__visit_result_t<_Visitor, _Variants ...> std::visit(_Visitor&&, _Variants&& ...)'
 1855 |     visit(_Visitor&& __visitor, _Variants&&... __variants)
      |     ^~~~~
a.cc:10:6: note:                 'bool visit [100005]'
   10 | bool visit[100005];
      |      ^~~~~
Language: C++

int main() {

	int N, M;
	cin >> N >> M;

	int H[100000];
	int good[100000];
	for (int i = 0; i < N; i++) {
		cin >> H[i];
		good[i] = 1;
	}

	int A, B;
	for (int i = 0; i < M; i++) {
		cin >> A >> B;
		if (H[A - 1] <= H[B - 1]) good[A - 1] = 0;
		if (H[A - 1] >= H[B - 1]) good[B - 1] = 0;
	}
	int ans = 0;
	for (int i = 0; i < N; i++) {
		if (good[i] == 1) ans++;
	}
	cout << ans;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: 'cin' was not declared in this scope
    4 |         cin >> N >> M;
      |         ^~~
a.cc:23:9: error: 'cout' was not declared in this scope
   23 |         cout << ans;
      |         ^~~~
Language: C

#include<stdio.h>
int main ()
{
    int n,m;
    scanf("%d %d",&n,&m);
    int e[n+5][n+5]={0};
    long long int h[n+5]={0};
    int book[n+5]={0};
    int tmp=n;
    while(tmp--)scanf("%lld",&h[n-tmp]);
    tmp=m;
    while(tmp--)
    {
        int a,b;
        scanf("%d %d",&a,&b);
        e[a][b]++;
        e[b][a]++;
    }
    int i,j,sum=0;
    for(i=1;i<=n;i++)
    {
        int flag=0;
        for(j=1;j<=n;j++)
        {
            if(e[i][j])
            {
                flag++;
                if(h[i]>h[j])
                {
                    book[i]++;
                    break;
                }
            }
        }
        if(flag==0)book[i]++;
    }
    for(i=1;i<=n;i++)if(book[i])sum++;
    printf("%d",sum);
    return 0;
}



Compiler output:
main.c: In function 'main':
main.c:6:21: error: variable-sized object may not be initialized except with an empty initializer
    6 |     int e[n+5][n+5]={0};
      |                     ^
main.c:7:26: error: variable-sized object may not be initialized except with an empty initializer
    7 |     long long int h[n+5]={0};
      |                          ^
main.c:8:19: error: variable-sized object may not be initialized except with an empty initializer
    8 |     int book[n+5]={0};
      |                   ^
Language: C++

#include <iostream>
using namespace std;

int B[100001][100001];
int H[100001];

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

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


    for(int i=0;i<M;i++){
        int a,b;
        cin >> a >> b;
        B[a][b]++;
        B[b][a]++;
    }
    int cnt = 0; 
    for(int i=1;i<N+1;i++){
        int max = H[i];
        for(int j=1;j<N+1;j++){
            if(B[i][j] > 0){
                if(max <= H[j]){
                    max = 0;
                    break;
                }
            }
        }
        if(max == H[i]){
            cnt++;
        }
    }
    cout << cnt << endl;

	return 0;
}

Compiler output:
/tmp/ccx9jI8O.o: in function `main':
a.cc:(.text+0x49): relocation truncated to fit: R_X86_64_PC32 against symbol `H' defined in .bss section in /tmp/ccx9jI8O.o
a.cc:(.text+0x16d): relocation truncated to fit: R_X86_64_PC32 against symbol `H' defined in .bss section in /tmp/ccx9jI8O.o
a.cc:(.text+0x1bb): relocation truncated to fit: R_X86_64_PC32 against symbol `H' defined in .bss section in /tmp/ccx9jI8O.o
a.cc:(.text+0x1ec): relocation truncated to fit: R_X86_64_PC32 against symbol `H' defined in .bss section in /tmp/ccx9jI8O.o
collect2: error: ld returned 1 exit status
Language: C++

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

int h[100001],t[1000000001];
int n,m;
bool ok[100001];

int main(){
	cin>>n>>m;
	for (int i=0;i<n;i++){
		cin>>h[i];
		t[h[i]-1]=i;
	}
	for (int i=0;i<n;i++) ok[i]=true;
	for (int i=0;i<m;i++){
		int a,b;
		cin>>a>>b;
		if (a>b) ok[t[b-1]]=false;
		if (b>a) ok[t[a-1]]=false;
	}
	long long sum=0;
	for (int i=0;i<n;i++)
		if (ok[i]==true)
			sum++;
	cout<<sum<<endl;
	return 0;
}

Compiler output:
/tmp/ccW1HxjS.o: in function `main':
a.cc:(.text+0xb): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccW1HxjS.o
a.cc:(.text+0x27): relocation truncated to fit: R_X86_64_PC32 against symbol `m' defined in .bss section in /tmp/ccW1HxjS.o
a.cc:(.text+0x9f): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccW1HxjS.o
a.cc:(.text+0xb9): relocation truncated to fit: R_X86_64_PC32 against symbol `ok' defined in .bss section in /tmp/ccW1HxjS.o
a.cc:(.text+0xc7): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccW1HxjS.o
a.cc:(.text+0x12d): relocation truncated to fit: R_X86_64_PC32 against symbol `ok' defined in .bss section in /tmp/ccW1HxjS.o
a.cc:(.text+0x15e): relocation truncated to fit: R_X86_64_PC32 against symbol `ok' defined in .bss section in /tmp/ccW1HxjS.o
a.cc:(.text+0x16c): relocation truncated to fit: R_X86_64_PC32 against symbol `m' defined in .bss section in /tmp/ccW1HxjS.o
a.cc:(.text+0x192): relocation truncated to fit: R_X86_64_PC32 against symbol `ok' defined in .bss section in /tmp/ccW1HxjS.o
a.cc:(.text+0x1ad): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccW1HxjS.o
collect2: error: ld returned 1 exit status
Language: C++

#include <iostream>
#include <vector>
using namespace std;
 
int main() {
  int N, M;
  cin >> N >> M;
  vector<int> H;
  vector<bool> isGood;
  for (int i=0; i < N; i++) {
    int Hi;
    cin >> Hi;
    H.push_back(Hi);
    isGood.push_back(true);
  }

  for (int i = 0; i < M; i++) {
    int A, B;
    cin >> A >> B;
    if (H[A-1] > H[B-1]) {
      isGood[B-1] = false;
    } if else (H[A-1] == H[B-1]) {
      isGood[A-1] = false;
      isGood[B-1] = false;
    } else {
      isGood[A-1] = false;
    }
  }

  int count = 0;
  for(bool good : isGood) {
    if (good) count++;
  }
  cout << count << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:10: error: expected '(' before 'else'
   22 |     } if else (H[A-1] == H[B-1]) {
      |          ^~~~
      |          (
a.cc:25:7: error: 'else' without a previous 'if'
   25 |     } else {
      |       ^~~~
Language: C++

#include <bits/stdc++.h>

using namespace std;
typedef long long ll;

//マクロ
//forループ関係
//引数は、(ループ内変数,動く範囲)か(ループ内変数,始めの数,終わりの数)、のどちらか
//Dがついてないものはループ変数は1ずつインクリメントされ、Dがついてるものはループ変数は1ずつデクリメントされる
#define REP(i, n) for (ll i = 0; i < (ll)(n); i++)
#define REPD(i, n) for (ll i = n - 1; i >= 0; i--)
#define FOR(i, a, b) for (ll i = a; i <= (ll)(b); i++)
#define FORD(i, a, b) for (ll i = a; i >= (ll)(b); i--)
//xにはvectorなどのコンテナ
#define ALL(x) (x).begin(), (x).end() //sortなどの引数を省略したい
#define SIZE(x) ((ll)(x).size())      //sizeをsize_tからllに直しておく
#define MAX(x) *max_element(ALL(x))   //最大値を求める
#define MIN(x) *min_element(ALL(x))   //最小値を求める
#define D()
//定数
#define INF 1000000000000 //10^12:極めて大きい値,∞
#define MOD 10000007      //10^9+7:合同式の法
#define MAXR 100000       //10^5:配列の最大のrange(素数列挙などで使用)
//略記
#define PB push_back //vectorヘの挿入
#define MP make_pair //pairのコンストラクタ
#define F first      //pairの一つ目の要素
#define S second     //pairの二つ目の要素

signed main()
{
    ll N, M;
    cin >> N >> M;
    vector<ll> H(N);
    vector<ll> A(M);
    vector<ll> B(M);
    vector<ll> Good(N);
    REP(i, N)
    {
        Good.at(i) = 1;
    }
    REP(i, N)
    {
        cin >> H.at(i);
    }
    REP(i, M)
    {
        cin >> A.at(i) >> B.at(i);
        if (H.at(A.at(i) - 1) < H.at(B.at(i) - 1))
        {
            Good.at(A.at(i) - 1) = 0;
        }
        else if (H.at(A.at(i) - 1) = H.at(B.at(i) - 1))
        {
            Good.at(A.at(i) - 1) = 0;
            Good.at(B.at(i) - 1) = 0;
        }
        else if (H.at(A.at(i) - 1) > H.at(B.at(i) - 1))
        {
            Good.at(B.at(i) - 1) = 0;
        }
    }
    ll count = 0;
    REP(i, N)
    {
        if (Good.at(i) != 0)
        {
            count++
        }
        // count += Good.at(i);
    }
    cout << count << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:68:20: error: expected ';' before '}' token
   68 |             count++
      |                    ^
      |                    ;
   69 |         }
      |         ~
Language: C++

#include <iostream>
using namespace std;

int B[100001][100001];
int H[100001];

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

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


    for(int i=0;i<M;i++){
        int a,b;
        cin >> a >> b;
        B[a][b]++;
        B[b][a]++;
    }
    int cnt = 0; 
    for(int i=1;i<N+1;i++){
        int max = H[i];
        for(int j=1;j<N+1;j++){
            if(B[i][j] > 0){
                if(max <= H[j]){
                    max = 0;
                    break;
                }
            }
        }
        if(max == H[i]){
            cnt++;
        }
    }
    cout << cnt << endl;

	return 0;
}

Compiler output:
/tmp/ccPGZdyl.o: in function `main':
a.cc:(.text+0x49): relocation truncated to fit: R_X86_64_PC32 against symbol `H' defined in .bss section in /tmp/ccPGZdyl.o
a.cc:(.text+0x16d): relocation truncated to fit: R_X86_64_PC32 against symbol `H' defined in .bss section in /tmp/ccPGZdyl.o
a.cc:(.text+0x1bb): relocation truncated to fit: R_X86_64_PC32 against symbol `H' defined in .bss section in /tmp/ccPGZdyl.o
a.cc:(.text+0x1ec): relocation truncated to fit: R_X86_64_PC32 against symbol `H' defined in .bss section in /tmp/ccPGZdyl.o
collect2: error: ld returned 1 exit status
Language: C

#include<stdio.h>
int main ()
{
    int n,m;
    scanf("%d %d",&n,&m);
    int e[n+5][n+5]={0};
    long long int h[n+5]={0};
    int book[n+5]={0};
    int tmp=n;
    while(tmp--)scanf("%lld",&h[n-tmp]);
    tmp=m;
    while(tmp--)
    {
        int a,b;
        scanf("%d %d",&a,&b);
        e[a][b]++;
        e[b][a]++;
    }
    int i,j,sum=0;
    for(i=1;i<=n;i++)
    {
        int flag=0;
        for(j=1;j<=n;j++)
        {
            if(e[i][j])
            {
                flag++;
                if(h[i]>h[j])
                {
                    book[i]++;
                    break;
                }
            }
        }
        if(flag==0)book[i]++;
        ///printf("%d %d\n",flag,i);
    }
    for(i=1;i<=n;i++)if(book[i])sum++;
    printf("%d",sum);
    return 0;
}



Compiler output:
main.c: In function 'main':
main.c:6:21: error: variable-sized object may not be initialized except with an empty initializer
    6 |     int e[n+5][n+5]={0};
      |                     ^
main.c:7:26: error: variable-sized object may not be initialized except with an empty initializer
    7 |     long long int h[n+5]={0};
      |                          ^
main.c:8:19: error: variable-sized object may not be initialized except with an empty initializer
    8 |     int book[n+5]={0};
      |                   ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
    int n,m;
    cin >> n >> m;
    vector<int> good(n,1);
    vector<int> hi(n);
    for(int i = 0; i < n; i++) {
        cin >> hi.at(i);
    }
    for(int i = 0; i < m; i++) {
        if(hi.at(a-1) > hi.at(b-1)) {
            good.at(b-1) = 0;
        }
        else if(hi.at(a-1) < hi.at(b-1) {
          good.at(a-1) = 0;
        }
        else {
          good.at(a-1) = 0;
          good.at(b-1) = 0;
        }
    }
    int sum = 0;
  
    for(int i = 0; i < n; i++) {
      sum += good.at(i);
    }
    cout << sum << endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:12:18: error: 'a' was not declared in this scope
   12 |         if(hi.at(a-1) > hi.at(b-1)) {
      |                  ^
a.cc:12:31: error: 'b' was not declared in this scope
   12 |         if(hi.at(a-1) > hi.at(b-1)) {
      |                               ^
a.cc:15:40: error: expected ')' before '{' token
   15 |         else if(hi.at(a-1) < hi.at(b-1) {
      |                ~                       ^~
      |                                        )
a.cc:22:5: error: expected primary-expression before '}' token
   22 |     }
      |     ^
Language: C++

#include <iostream>
using namespace std;

int main(){
  int n,roads;
  int high[100001];
  int hantei[100001];
  int a,b;
  cin >> n >> roads;
  for(int i=1; i<=n; i++){
    cin >> high[i];
    hantei[i] = 1;
  }
  for(int i=1; i<=m; i++){
    cin >> a >> b;
    if(high[a] > high[b]){
      hantei[b] = 0;
    }else if(high[a] == high[b]){
      hantei[a] = 0;
      hantei[b] = 0;
    }else{
      hantei[a] = 0;
    }
  }
  int ans = 0;
  for(int i=1; i<=n; i++){
    if(hantei[i] == 1){
      ans += 1;
    }
  }
  cout << ans << '\n';
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:19: error: 'm' was not declared in this scope
   14 |   for(int i=1; i<=m; i++){
      |                   ^
Language: Java

import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		Set<Integer> set = new HashSet<>();
		int n = sc.nextInt();
		int m = sc.nextInt();
		int[] h = new int[n];
		for(int i = 0; i < n; i++) {
			h[i] = sc.nextInt();
		}
		int a,b;
		for(int i = 0; i < m; i++) {
			a = sc.nextInt();
			b = sc.nextInt();
			set.add(h[a-1]<h[b-1]?(a-1):(b-1));
		}
		System.out.println(n-set.size());
	}


Compiler output:
Main.java:21: error: reached end of file while parsing
	}
	 ^
1 error
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main(void) {

  int n, m;
  cin >> n >> m;
  
  vector<int> high(n);
  
  vector<vector<bool>> bridge(n, vector<bool>(n, false));
  
  for (int i = 0;i < n;i++) {
    cin >> high[i];
  }
  
  int a, b;
  vector<bool> flags(n, true);
  for (int i = 0;i < m;i++) {
    cin >> a >> b;

    if (high[a] > high[b]) flags[b] = false;
    else if (high[a] < high[b]) flags[a] = false;
    else {
      flags[a] = false;
      flags[b] = false;
    }
  }
  
  cout << ans << endl;

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:31:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   31 |   cout << ans << endl;
      |           ^~~
      |           abs
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main(void) {

  int n, m;
  cin >> n >> m;
  
  vector<int> high(n);
  
  vector<vector<bool>> bridge(n, vector<bool>(n, false));
  
  for (int i = 0;i < n;i++) {
    cin >> high[i];
  }
  
  int a, b;
  vector<bool> flags(n, true);
  for (int i = 0;i < m;i++) {
    cin >> a >> b;

    if (high[a] > high[b]) flags[b] = false;
    else if (high[a] < high[b]) flags[a] = false:
    else {
      flags[a] = false;
      flags[b] = false;
    }
  }
  
  cout << ans << endl;

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:49: error: expected ';' before ':' token
   24 |     else if (high[a] < high[b]) flags[a] = false:
      |                                                 ^
      |                                                 ;
a.cc:31:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   31 |   cout << ans << endl;
      |           ^~~
      |           abs
Language: C++

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

using namespace std;

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

int gcd(int a,int b){
    return (a%b==0) ? b : gcd(b,a%b); 
}

int main(){
    int n,m; cin >> n >> m;
    vector<int> h(n);
    int ab[n][n];

    for(int i=0;i<n;i++){
        for(int j=0;j<n;j++){
            ab[i][j]=0;
            if(i==j) ab[i][j]=-1;
        }
    }

    for(int i=0;i<n;i++) cin >> h[i];
    for(int i=0;i<m;i++){
        int a,b; cin >> a >> b;
        a--; b--;
        ab[a][b]=1;
        ab[b][a]=1;
    }

    int ans=0;

    for(int i=0;i<n;i++){
        bool ok=false;
        bool none=true;
        for(int j=0;j<n;j++){
            //printf("[%d,%d]=%d. %d~%d\n",i,j,ab[i][j],h[i],h[j]);
            if(ab[i][j]==1){
                none&=false;
                if(h[i]>h[j]){
                ok=true;
                //puts("<<");
                }
            }

        }
        if(ok || none;){
            ans++;
        }
    }

    cout << ans << endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:53:23: error: expected primary-expression before ')' token
   53 |         if(ok || none;){
      |                       ^
Language: C

#include<string.h>
#include<stdio.h>

bool flag[100090];
int value[100090];

int main(){
	memset(flag,true,sizeof(flag));
	int N,M;
	scanf("%d%d",&N,&M);
	for(int i=1;i<=N;++i) scanf("%d",&value[i]);
	int ori,des;
	for(int i=1;i<=M;++i){
		scanf("%d%d",&ori,&des);
		if(value[ori]>value[des]) flag[des]=false;
		else if(value[ori]<value[des]) flag[ori]=false;
		else{
			flag[des]=false;
			flag[ori]=false;
		}
	}
	int cnt=0;
	for(int i=1;i<=N;++i)
		if(flag[i]) ++cnt;
	printf("%d ",cnt);
} 

Compiler output:
main.c:4:1: error: unknown type name 'bool'
    4 | bool flag[100090];
      | ^~~~
main.c:3:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    2 | #include<stdio.h>
  +++ |+#include <stdbool.h>
    3 | 
main.c: In function 'main':
main.c:8:21: error: 'true' undeclared (first use in this function)
    8 |         memset(flag,true,sizeof(flag));
      |                     ^~~~
main.c:8:21: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:8:21: note: each undeclared identifier is reported only once for each function it appears in
main.c:15:53: error: 'false' undeclared (first use in this function)
   15 |                 if(value[ori]>value[des]) flag[des]=false;
      |                                                     ^~~~~
main.c:15:53: note: 'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < n; i++)
int main() {
  
  int n, m;
  cin >> n >> m;
  vector<long long> h(n + 1);
  REP(i, n) {
    cin >> h.at(i + 1);
  }
  vector<vector<int>> data(n + 1);
  int a, b;
  REP(i, m) {
    cin >> a >> b;
    data.at(a).push_back(b);
    data.at(b).push_back(a);
  }
  bool OK;
  int count = 0;
  int d;
  for (int i = 1; i <= n; i++) {
    d = data.at(i).aize()
    if (data.at(i).size() == 0) {
      count++;
      continue;
    }
    OK = true;
    for (int j = 0; j < d; j++) {
      if (h.at(data.at(i).at(j)) >= h.at(i)) {
        OK = false;
      }
    }
    if (OK) {
      count++;
    }
  }
  cout << count << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:20: error: '__gnu_cxx::__alloc_traits<std::allocator<std::vector<int> >, std::vector<int> >::value_type' {aka 'class std::vector<int>'} has no member named 'aize'; did you mean 'size'?
   23 |     d = data.at(i).aize()
      |                    ^~~~
      |                    size
Language: Java

import java.util.ArrayList;
import java.util.*;
 public class start
{
	public static void main (String[] args)
	 {
		Scanner sc=new Scanner(System.in); 
		int i,j;
		int n=sc.nextInt();
		int m=sc.nextInt();
		HashMap<Integer,Integer> h=new HashMap();
		HashMap<Integer,Integer> v=new HashMap();
		for(i=1;i<=n;i++)
		{
			h.put(i, sc.nextInt());
			v.put(i,1);
		}
		
		int in,og;
		for(i=0;i<m;i++)
		{
			in=sc.nextInt();
			og=sc.nextInt();
			if(h.get(in)==h.get(og))
			{
				v.put(in, -1);
				v.put(og, -1);
			}
			else if(h.get(in)>h.get(og))
			{
				v.put(og, -1);
			}
			else
			{
				v.put(in,-1);
			}
		}
		int count=0;
		for(i=1;i<=n;i++)
		{
			if(v.get(i)!=-1)
				count++;
		}
		
		
			
		System.out.println(count);
		
			
	}
}

Compiler output:
Main.java:3: error: class start is public, should be declared in a file named start.java
 public class start
        ^
Note: Main.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < n; i++)
int main() {
  
  int n, m;
  cin >> n >> m;
  vector<long long> h(n + 1);
  REP(i, n) {
    cin >> h.at(i + 1);
  }
  vector<vector<int>> data(n + 1);
  int a, b;
  REP(i, m) {
    cin >> a >> b;
    data.at(a).pushback(b);
    data.at(b).pushback(a);
  }
  bool OK;
  int count = 0;
  for (int i = 1; i <= n; i++) {
    if (data.at(i).size() == 0) {
      count++;
      continue;
    }
    OK = true;
    for (int j = 0; j < data.at(i).size(); j++) {
      if (h.at(data.at(i).at(j)) >= h.at(i)) {
        OK = false;
      }
    }
    if (OK) {
      count++;
    }
  }
  cout << count << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:16: error: '__gnu_cxx::__alloc_traits<std::allocator<std::vector<int> >, std::vector<int> >::value_type' {aka 'class std::vector<int>'} has no member named 'pushback'; did you mean 'push_back'?
   16 |     data.at(a).pushback(b);
      |                ^~~~~~~~
      |                push_back
a.cc:17:16: error: '__gnu_cxx::__alloc_traits<std::allocator<std::vector<int> >, std::vector<int> >::value_type' {aka 'class std::vector<int>'} has no member named 'pushback'; did you mean 'push_back'?
   17 |     data.at(b).pushback(a);
      |                ^~~~~~~~
      |                push_back
Language: C

#include<stdio.h>
bool f[100005];
int high[100005];
int main(){
	int n,m,u,v;
	scanf("%d%d",&n,&m);
	for(int i=1;i<=n;i++) scanf("%d",&high[i]);
	for(int i=1;i<=m;i++){
		scanf("%d%d",&u,&v);
		if(high[u]>=high[v]) f[v]=1;
		else f[u]=1;
	}
	int ans=0;
	for(int i=1;i<=n;i++) if(!f[i]) ans++;
	printf("%d",ans);
	return 0;
}

Compiler output:
main.c:2:1: error: unknown type name 'bool'
    2 | bool f[100005];
      | ^~~~
main.c:2:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    1 | #include<stdio.h>
  +++ |+#include <stdbool.h>
    2 | bool f[100005];
Language: C++

#include <iostream>
#include <utility>
using namespace std;
#define ll long long
 
int main(){
  ll n,m;
  cin >> n >>m;
  ll heights[n];
  for(ll i=0;i<n;i++){
    cin >> heights[i];
  }
  pair <ll,ll> roads[m];
  for(ll i=0;i<m;i++){
    cin >> roads[i].first >> roads[i].second;
  }
  ll count =0;
  ll connects[n];
  ll marks[n];
  for(ll i=0;i<n;i++){
    connects[i]=0;
    marks[i]=1;
  }
  for(ll i=0;i<m;i++){
    connects[roads[i].first]++;
    connects[roads[i].second]++;
  }
  for(ll i=0;i<m;i++){
    if(roads[i].first>roads[i].second)marks[roads[i].second]=0;
    if(roads[i].first<roads[i].second)marks[roads[i].first]=0;
    if(roads[i].first==roads[i].second){
      marks[roads[i].first]=0;
      marks[roads[i].second]=0;
    }
  }
  for(ll i=0;i<n;i++){
    if(marks[i]==1)count++;
  }
  cout << count;
  return 0;
    
}
#include <bits/stdc++.h>
using namespace std;
#define ll long long

int main(){
  ll n,m;
  cin >> n >>m;
  ll heights[n];
  for(ll i=0;i<n;i++){
    cin >> heights[i];
  }
  pair <ll,ll> roads[m];
  for(ll i=0;i<m;i++){
    cin >> roads[i].first >> roads[i].second;
  }
  ll count =0;
  ll connects[n];
  ll marks[n];
  for(ll i=0;i<n;i++){
    connects[i]=0;
    marks[i]=1;
  }
  for(ll i=0;i<m;i++){
    connects[roads[i].first]++;
    connects[roads[i].second]++;
  }
  for(ll i=0;i<m;i++){
    if(roads[i].first>roads[i].second)marks[roads[i].second]=0;
    if(roads[i].first<roads[i].second)marks[roads[i].first]=0;
    if(roads[i].first==roads[i].second){
      marks[roads[i].first]=0;
      marks[roads[i].second]=0;
    }
  }
  for(ll i=0;i<n;i++){
    if(marks[i]==1)count++;
  }
  cout << count;
  return 0;
    
}

Compiler output:
a.cc:47:5: error: redefinition of 'int main()'
   47 | int main(){
      |     ^~~~
a.cc:6:5: note: 'int main()' previously defined here
    6 | int main(){
      |     ^~~~
Language: C

#include<stdio.h>
bool f[500005];
int high[500005];
int main(){
	int n,m,h,u,v;
	scanf("%d%d",&n,&m);
	for(int i=1;i<=n;i++) scanf("%d",&high[i]);
	for(int i=1;i<=m;i++){
		scanf("%d%d",&u,&v);
		if(high[u]>=high[v]) f[v]=1;
		else f[u]=1;
	}
	int ans=0;
	for(int i=1;i<=n;i++) if(!f[i]) ans++;
	printf("%d",ans);
	return 0;
}

Compiler output:
main.c:2:1: error: unknown type name 'bool'
    2 | bool f[500005];
      | ^~~~
main.c:2:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    1 | #include<stdio.h>
  +++ |+#include <stdbool.h>
    2 | bool f[500005];
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < n; i++)
int main() {
  #define int long long
  int n, m;
  cin >> n >> m;
  vector<int> h(n + 1);
  REP(i, n) {
    cin >> h.at(i + 1);
  }
  vector<vector<int>> data(n + 1);
  int a, b;
  REP(i, m) {
    cin >> a >> b;
    data.at(a).pushback(b);
    data.at(b).pushback(a);
  }
  bool OK;
  int count = 0;
  for (int i = 1; i <= n; i++) {
    if (data.at.size() == 0) {
      count++;
      continue;
    }
    OK = true;
    for (int j = 0; j < data.at(i).size(); j++) {
      if (h.at(data.at(i).at(j)) >= h.at(i)) {
        OK = false;
      }
    }
    if (OK) {
      count++;
    }
  }
  cout << count << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:16: error: '__gnu_cxx::__alloc_traits<std::allocator<std::vector<long long int> >, std::vector<long long int> >::value_type' {aka 'class std::vector<long long int>'} has no member named 'pushback'; did you mean 'push_back'?
   16 |     data.at(a).pushback(b);
      |                ^~~~~~~~
      |                push_back
a.cc:17:16: error: '__gnu_cxx::__alloc_traits<std::allocator<std::vector<long long int> >, std::vector<long long int> >::value_type' {aka 'class std::vector<long long int>'} has no member named 'pushback'; did you mean 'push_back'?
   17 |     data.at(b).pushback(a);
      |                ^~~~~~~~
      |                push_back
a.cc:22:14: error: invalid use of member function 'std::vector<std::vector<long long int> >::at' (did you forget the '()' ?)
   22 |     if (data.at.size() == 0) {
      |         ~~~~~^~
a.cc:22:17: error: expected ')' before 'size'
   22 |     if (data.at.size() == 0) {
      |        ~        ^~~~
      |                 )
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){int N,M;cin>>N>>M;int h[N],v[M],w[M],x=N;vector<int>c(N,1);for(int i=0;i<N;i++)cin>>h[i];
           for(int i=0;i<M;i++){cin>>v[i]>>w[i];if(h[v[i]-1]>=h[w[i]-1]&&c.at(w[i]-1)){c.at(w[i]-1)=0;x--;}
                               if(h[v[i]-1]<=h[m[i]-1]&&c.at(v[i]-1){c.at(v[i]-1)=0;x--;}}cout<<x<<endl;}
           


Compiler output:
a.cc: In function 'int main()':
a.cc:5:48: error: 'm' was not declared in this scope
    5 |                                if(h[v[i]-1]<=h[m[i]-1]&&c.at(v[i]-1){c.at(v[i]-1)=0;x--;}}cout<<x<<endl;}
      |                                                ^
a.cc:5:69: error: expected ')' before '{' token
    5 |                                if(h[v[i]-1]<=h[m[i]-1]&&c.at(v[i]-1){c.at(v[i]-1)=0;x--;}}cout<<x<<endl;}
      |                                  ~                                  ^
      |                                                                     )
a.cc:5:90: error: expected primary-expression before '}' token
    5 |                                if(h[v[i]-1]<=h[m[i]-1]&&c.at(v[i]-1){c.at(v[i]-1)=0;x--;}}cout<<x<<endl;}
      |                                                                                          ^
Language: C++

#include <iostream>
#include <utility>
#include <stdint.h>
#include <vector>
#include <map>

using namespace std;

int main()
{
... (39 lines) ...

    if (good) {
      ++ans;
    }
  }

  cout << ans << endl;

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:1: error: expected primary-expression before '...' token
   11 | ... (39 lines) ...
      | ^~~
a.cc: At global scope:
a.cc:18:3: error: 'cout' does not name a type
   18 |   cout << ans << endl;
      |   ^~~~
a.cc:20:3: error: expected unqualified-id before 'return'
   20 |   return 0;
      |   ^~~~~~
a.cc:21:1: error: expected declaration before '}' token
   21 | }
      | ^
Language: C++

#include <iostream>
#include <iomanip>
#include <cmath>
#include <vector>
#include <string>
#include <limits>
#include <utility>
#include <algorithm>
#include <tuple>
#include <limits>
#include "UnionFind.h"

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

    std::cin >> n >> m;

    std::vector<int> h(n);
    for (int i = 0; i < n; i++) {
        std::cin >> h[i];
    }

    std::vector<std::pair<int,int>> r;
    r.reserve(2 * m);
    for (int i = 0; i < m; i++) {
        int a, b;
        std::cin >> a >> b;
        r.push_back(std::make_pair(a - 1, b - 1));
        r.push_back(std::make_pair(b - 1, a - 1));
    }

    std::vector<bool> good(n, true);
    for (const auto &it : r) {
        const int a = it.first, b = it.second;
        if (h[a] <= h[b]) {good[a] = false;}
    }

    int ans = 0;
    for (int i = 0; i < n; i++) {
        if (good[i]) {ans++;}
    }

    std::cout << ans << std::endl;

    return 0;
}


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

#include <iostream>
using namespace std;

int main () {
	int n;
	int m;
	cin >> n >> m;
	int height[n + 1];
	bool ans[n + 1];
	for(int i = 1; i <= n; i++) {
		ans[i] = true;
		cin >> height[i];
	}
	for(int i = 0; i < m; i++) {
		int a;
		int b;
		cin >> a >> b;
		if(height[a] >= height[b]) {
			ans[b] = false;
		}
		if(height[b] >= height[a]) {
			ans[a] = false;
		}
	}
	int res = n;
	for(int i = 1; i <= n; i++) {
		if(ans[i] == false) ans -= 1;
	}
	cout << ans << "\n";
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:41: error: incompatible types in assignment of 'int' to 'bool [(n + 1)]'
   27 |                 if(ans[i] == false) ans -= 1;
      |                                     ~~~~^~~~