criyle/codenet-compile-errors huggingface dataset:
Language: Java

import java.util.*;
import java.math.*;
     
class Main{
    public static void main(String[] args) {
        
        try(Scanner sc = new Scanner(System.in)){
 
            long n = Long.parseLong(sc.next());
            long m = Long.parseLong(sc.next());
 
            ArrayList<Long> height = new ArrayList<>();
            HashSet<Long> bad = new HashSet<>();
 
            height.add((long)0);
 
            for(int i = 0; i < n; i++){
                height.add(Long.parseLong(sc.next()));
            }
 
            for(int j = 0; j < m; j++){
                long a = Long.parseLong(sc.next());
                long b = Long.parseLong(sc.next());
 
                if(height.get((Integer)a) > height.get((Integer)b)) {
                    if(bad.add(b)) n--;
                }else if(height.get((Integer)a) == height.get((Integer)b)){
                    if(bad.add(a)) n--;
                    if(bad.add(b)) n--;
                }else {
                    if(bad.add(a)) n--;
                }
            }
 
            System.out.println(n);
 
        }catch(Exception e){
            e.printStackTrace();
        }        
    }
}

Compiler output:
Main.java:25: error: incompatible types: long cannot be converted to Integer
                if(height.get((Integer)a) > height.get((Integer)b)) {
                                       ^
Main.java:25: error: incompatible types: long cannot be converted to Integer
                if(height.get((Integer)a) > height.get((Integer)b)) {
                                                                ^
Main.java:27: error: incompatible types: long cannot be converted to Integer
                }else if(height.get((Integer)a) == height.get((Integer)b)){
                                             ^
Main.java:27: error: incompatible types: long cannot be converted to Integer
                }else if(height.get((Integer)a) == height.get((Integer)b)){
                                                                       ^
4 errors
Language: C++

include<bits/stdc++.h>
using namespace std;
int a,b,s[100005],x[100005],l[100005],p[100005],ans=0;
int main(){
  cin>>a>>b;
  for(int i=0;i<a;i++)
    cin>>s[i];
  for(int i=0;i<b;i++){ 
    cin>>x[i]>>l[i];
    if(s[x[i]]>=s[l[i]])
      p[x[i]]=1;
    if(s[l[i]]>=s[x[i]])
      p[l[i]]=1;
  } 
  for(int i=0;i<a;i++)
    if(p[i]==1)
      ans++;
  cout<<ans;
  return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin>>a>>b;
      |   ^~~
a.cc:18:3: error: 'cout' was not declared in this scope
   18 |   cout<<ans;
      |   ^~~~
Language: C++

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

int main(){
  int n,m,sum=0;
  vector<int> h(n);
  vector<pair<int,int>> edge(m);
  for(int i=0;i<n;i++){
    cin>>h[i];
  }
  for(int i=0;i<m;i++){
    int a,b;
    cin>>a>>b;
    edge.push_back(make_pair(a,b));
  }
  for(int i=0;i<n;i++){
    int flag=1;
  	for(const auto& [id1,id2]: edges){
      if(i==id1 && h[id1] > h[id2]){
        flag*=1;
      }else if(i==id1 && h[id1] <= h[id2]){
        flag*=0;
      }else if(i==id2 && h[id2] > h[id1]){
        flag*=1;
      }else if(i==id2 && h[id2] <= h[id1]){
        flag*=0;
      }else{
        ;
      }
    }
    if(flag==1){
      sum++;
    }
  }
  cout<<sum<<endl;
}
  
        

Compiler output:
a.cc: In function 'int main()':
a.cc:18:36: error: 'edges' was not declared in this scope; did you mean 'edge'?
   18 |         for(const auto& [id1,id2]: edges){
      |                                    ^~~~~
      |                                    edge
Language: C++

#include<iostream>
#include<algorithm>
#include<cmath>
#include<vector>
#include<cstring>
#include<queue>
#define cs ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define rep(i,b)  for(int i=0;i<(int)(b);i++)
#define Rep(i,n) for(int i=1;i<(int)(n);i++)
#define repp(i,a,b)  for(int i=a;i<=(int)(b);i++)
#define Repp(i,a,b)  for(int i=a;i>=(int)(b);i--)
#define ii pair<int,int>
#define fi first
#define se second
typedef long long ll;
typedef long double ld;

using namespace std;
bool vis[100005];
bool ans[100005];
void bfs(vector<int> &v,vector<vector<int>> &vv){
    queue<int> q;
    repp(i,1,n){
        if(!vis[i]){
            q.push(i);vis[i]=1;
            while(!q.empty()){
                int t=q.front();q.pop();bool b=1;
                for(auto i:vv[t]){
                    if(!vis[i]) {vis[i]=1;q.push(i);}
                    if(v[t]<=v[i]) b=0;
                }
                ans[t]=b;
            }
        }
    }
}

int main(){
    cs
    memset(vis,0,sizeof vis);
    memset(ans,1,sizeof ans);
    int n,m,x,y;
    cin>>n>>m;
    vector<int> v(n+1);
    Rep(i,n+1) cin>>v[i];
    vector<vector<int>> vv(n+1);   
    rep(i,m) {
        cin>>x>>y;
        vv[x].push_back(y);
        vv[y].push_back(x);
    }
    bfs(v,vv);
    x=0;
    repp(i,1,n) if(ans[i]) x++;
    cout<<x;
}

Compiler output:
a.cc: In function 'void bfs(std::vector<int>&, std::vector<std::vector<int> >&)':
a.cc:23:14: error: 'n' was not declared in this scope
   23 |     repp(i,1,n){
      |              ^
a.cc:10:43: note: in definition of macro 'repp'
   10 | #define repp(i,a,b)  for(int i=a;i<=(int)(b);i++)
      |                                           ^
Language: C++

#include <bits/stdc++.h>
#define ll long long
#define SIZE_OF_ARRAY(array) (sizeof(array)/sizeof(array[0]))

using namespace std;

int gcd(int x, int y) { return (x % y)? gcd(y, x % y): y; }

int main(){
    ll N,M; cin >> N >> M;
    vector<vector<bool>> gra(N, vector<bool>(N, false));
    vector<ll> H(N);
    ll ans = 0;
    vector<bool> highest(N, false);


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

    for (ll j = 0; j < M; ++j) {
        ll A, B;
        cin >> A >> B;
        if(H[A-1]>H[B-1]){
            highest[A-1]=true;
            highest[B-1]=false;
        } else {
            highest[B-1]=true;
            highest[A-1]=false;
        }

    for (int k = 0; k < N; ++k) {
        if(highest[k])ans++;
    }
    cout << ans << endl;

    return 0;
}

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

#include<bits/stdc++.h>
using namespace std;
using ll=long long int;
int main()
{
	ll n,t;
	cin>>n>>t;
	
	unordered_map<ll,ll> obs;
	for(ll i=0;i<n;i++)
	{
		ll value;
		cin>>value;
		obs[i+1]=value;
	}
	
	vector<ll> adj[n+1];
	
	for(ll i=0;i<t;i++)
	{
		int f,s;
		cin>>f>>s;
		
		adj[f].push_back(s);
		adj[s].push_back(f);
	}
	ll ans=0;
	for(ll i=1;i<=n;i++)
	{
		bool flag=1;
		for(int j=0;j<adj[i].size();j++)
		{
			if(obs[i]<=obs[adj[i][j]])
			flag=0;
			break;
		}
		if(flag)
		ans++;
		
	}
	cout<<and;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:41:18: error: expected identifier before ';' token
   41 |         cout<<and;
      |                  ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int a,b,s[100005],x[100005],l[100005],p[100005],ans;
int main(){
  cin>>a>>b;
  for(int i=0;i<a;i++)
    cin>>s[i];
  for(int i=0;i<b;i++){
    cin>>x[i]>>l[i];
    if(s[x[i]]>=s[l[i]])
      p[x[i]]=1;
    if(s[l[i]]>=s[x[i]])
      p[l[i]]=1;
  for(int i=0;i<a;i++)
    if(p[i]==1)
      ans++;
  cout<<ans;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:2: error: expected '}' at end of input
   19 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: Java

import java.util.Scanner;

import sun.jvm.hotspot.ui.table.LongCellRenderer;
public class Main {
    public static void main(String[] args){
        int N,M;

        Scanner scn = new Scanner(System.in);
        N = scn.nextInt();
        M = scn.nextInt();
        long[] h = new long[N];
        int[] a = new int[M];
        int[] b = new int[M];

        boolean[] ans = new boolean[N];
        //Hの入力
        for(int i=0;i<N;i++){
            h[i] = scn.nextLong();
        }
        //A,Bの入力と計算
        for(int i=0;i<M;i++){
            a[i] = scn.nextInt();
            b[i] = scn.nextInt();
        }

        int cnt = 0;

        //計算
        for(int i=0;i<M;i++){
            if(h[a[i]-1] <= h[b[i]-1]){
                ans[b[i]-1] = true;
            }else{
                ans[a[i]-1] = false;
            }
        }

        for(int i=0;i<M+1;i++){
            if(ans[i]){
                //System.out.println("i:"+i);
                cnt++;
            }
        }
        System.out.println(cnt);


    }
}

Compiler output:
Main.java:3: error: package sun.jvm.hotspot.ui.table is not visible
import sun.jvm.hotspot.ui.table.LongCellRenderer;
                         ^
  (package sun.jvm.hotspot.ui.table is declared in module jdk.hotspot.agent, which is not in the module graph)
1 error
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[][] yoi = new int[tenboudai][miti];
      	int ans = 0;
      	for (int i=0; i<tenboudai; i++){
        	int c = sc.nextInt();
         	hyoukou[i] = c;
        }
      	for (int i=0; i<miti; i++){
          int a = sc.nextInt();
          int b = sc.nextInt();
          yoi[a - 1][i] = b;
        }
      	for (int i=0; i<tenboudai; i++){
          boolean ret = false;
          boolen aa = false;
          for(int j=0; j<miti; j++){
            int x = yoi[i][j] - 1;
          	if (x != 0){
              if (!ret){
                ret = true;
              }
              if(hyoukou[i] > hyoukou[x]){
                aa = true; 
              }else{
                aa = false;
                break;
              }
            }
          }
          if(!ret || aa){
          	ans+=1;
          }
        }
		System.out.println(ans);
	}
}

Compiler output:
Main.java:21: error: cannot find symbol
          boolen aa = false;
          ^
  symbol:   class boolen
  location: class Main
1 error
Language: C++

#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
#define rep(i, N) for(i = 0; i < N; i++)
#define ll long long

ll main() {
  ll N, M;
  cin >> N >> M;
  vector<ll> H = {};

  vector<bool> rep = {};
  vector<vector<ll>> m = {};

  ll i;
  rep(i, N) {
    ll input;
    cin >> input;
    H.push_back(input);
    rep.push_back(true);
    m.push_back({});
  }

  vector<ll> A = {}, B = {};
  rep(i, M) {
    ll inputA, inputB;
    cin >> inputA >> inputB;
    inputA -= 1;
    inputB -= 1;

    if(H[inputA] > H[inputB]) {
      rep[inputB] = false;
    } else if(H[inputA] < H[inputB]) {
      rep[inputA] = false;
    } else {
      rep[inputA] = false;
      rep[inputB] = false;
    }

    if(find(m[inputA].begin(), m[inputA].end(), inputB) != m[inputA].end() &&
       find(m[inputB].begin(), m[inputB].end(), inputA) != m[inputB].end()) {
      rep[inputA] = false;
      rep[inputB] = false;
    }

    m[inputA].push_back(inputB);
    m[inputB].push_back(inputA);
  }

  ll ans = 0;
  rep(i, N) {
    if(rep[i]) ans++;
  }
  cout << ans;
  return 0;
}

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

#include<iostream>
#include<queue>
using namespace std;
struct edge {
	int next=0, to=0;
}edges[10010];
int h[10010], flag[10010], head[10010] = {0},lower;
int cnt = 1;
void add(int a,int b){
	edges[cnt].to = b;
	edges[cnt].next = head[a];
	head[a] = cnt++;
}
int main() {
	int N, M;
	cin >> N >> M;
	for (int i = 1; i <= N; i++) {
		scanf_s("%d", & h[i]);
	}
	while (M--) {
		int a, b;
		scanf_s("%d %d", &a, &b);
		add(a,b);
		add(b, a);
	}
	cnt = 0;
	queue<int> Q;
	for (int i = 1; i <= N; i++) {
		if (flag[i])continue;
		Q.push(i);
		while (!Q.empty()) {
			int c = Q.front();
			if (flag[c]) {
				Q.pop();
				continue;
			}
			flag[c] = 1;
			Q.pop();
			int t;
			lower = 0;
			for (t = head[c]; t; t = edges[t].next)
			{
				int d = edges[t].to;
				if (h[d] >= h[c])lower = 1;
				if (flag[d])continue;
				Q.push(d);
			}
			if (!lower) { cnt++; }
		}
	}
	cout << cnt;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   18 |                 scanf_s("%d", & h[i]);
      |                 ^~~~~~~
      |                 scanf
a.cc:22:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   22 |                 scanf_s("%d %d", &a, &b);
      |                 ^~~~~~~
      |                 scanf
Language: C++

#include<iostream>
#include<vector>
#include<algorithm>
#include<set>
#include<map>
#include<stack>
#include<queue>
#include<math.h>
#include<bitset>
#include <numeric>
using namespace std;
using ll=long long;
using ld=long double;
using pint=pair<int,int>;
using pll=pair<ll,ll>;
#define LONG_INF 9223372036854775807
#define INF 1000000000LL
#define EPS 1e-10
#define rep(i, n) for(int i = 0; i < (int)n; i++)
#define dump(a) rep(d,a.size()){cout<<a[d];if(d!=a.size()-1)cout<<" ";else cout<<endl;}
#define all(v) v.begin(),v.end()
#define pb push_back

#define MAX_N 100000

int A[MAX_N][MAX_N]=[0];
int H[MAX_N], dp[MAX_N] = [0];

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);

    ll N, M;
    cin >> N >> M;
    for(ll i=1; i<=N; i++) cin >> H[i];

    ll a, b;
    rep(i, M){
        cin >> a >> b;
        A[a][b] = 1;
        A[b][a] = 1;
    }

    ll ret=0;
    for(ll i=1; i<=N; i++){
        if(dp[i] == 0){
            bool temp = true;
            ll vv = 0;

            for(ll j=1; j<=N; j++){
                if(A[i][j] == 1){
                    if (H[i] <= H[j]){
                        temp = false;
                        break;
                    }else{
                        dp[i] = 1;
                    }
                }else{
                    vv++;
                }
            }
            if(temp){
                //cout << i << endl;
                ret++;
            }else if(vv==N) ret ++;
        }
    }

    cout << ret << endl;


    return 0;
}

Compiler output:
a.cc:26:22: error: expected identifier before numeric constant
   26 | int A[MAX_N][MAX_N]=[0];
      |                      ^
a.cc: In lambda function:
a.cc:26:24: error: expected '{' before ';' token
   26 | int A[MAX_N][MAX_N]=[0];
      |                        ^
a.cc: At global scope:
a.cc:26:21: error: array must be initialized with a brace-enclosed initializer
   26 | int A[MAX_N][MAX_N]=[0];
      |                     ^~~
a.cc:27:28: error: expected identifier before numeric constant
   27 | int H[MAX_N], dp[MAX_N] = [0];
      |                            ^
a.cc: In lambda function:
a.cc:27:30: error: expected '{' before ';' token
   27 | int H[MAX_N], dp[MAX_N] = [0];
      |                              ^
a.cc: At global scope:
a.cc:27:27: error: array must be initialized with a brace-enclosed initializer
   27 | int H[MAX_N], dp[MAX_N] = [0];
      |                           ^~~
Language: Java

import java.util.*;
class Main{
    static Scanner sc=new Scanner(System.in);
    public static void main(String[] args){
        long N = sc.nextLong();
        long M = sc.nextLong();
        long[] H = new long[N+1];
        long[] A = new long[N];
        long[] B = new long[N];
        long[] C = new long[N+1];
        long temp = 0;
        for(int i=1;i<=N;i++){
            H[i]=sc.nextLong();
            C[i]=H[i];
        }
        for(int i=0;i<M;i++){
            A[i]=sc.nextLong();
            B[i]=sc.nextLong();
            if(C[A[i]]<C[B[i]])
                H[A[i]]=0;
            if(C[A[i]]>C[B[i]])
                H[B[i]]=0;
            if(C[A[i]]==C[B[i]]){
                H[A[i]]=0;
                H[B[i]]=0;
            }
        }
        for(int i=1;i<=N;i++){
            //System.out.println(H[i]);
            if(H[i]!=0)
                temp++;
        }
        System.out.println(temp);
    }
}

Compiler output:
Main.java:7: error: incompatible types: possible lossy conversion from long to int
        long[] H = new long[N+1];
                             ^
Main.java:8: error: incompatible types: possible lossy conversion from long to int
        long[] A = new long[N];
                            ^
Main.java:9: error: incompatible types: possible lossy conversion from long to int
        long[] B = new long[N];
                            ^
Main.java:10: error: incompatible types: possible lossy conversion from long to int
        long[] C = new long[N+1];
                             ^
Main.java:19: error: incompatible types: possible lossy conversion from long to int
            if(C[A[i]]<C[B[i]])
                  ^
Main.java:19: error: incompatible types: possible lossy conversion from long to int
            if(C[A[i]]<C[B[i]])
                          ^
Main.java:20: error: incompatible types: possible lossy conversion from long to int
                H[A[i]]=0;
                   ^
Main.java:21: error: incompatible types: possible lossy conversion from long to int
            if(C[A[i]]>C[B[i]])
                  ^
Main.java:21: error: incompatible types: possible lossy conversion from long to int
            if(C[A[i]]>C[B[i]])
                          ^
Main.java:22: error: incompatible types: possible lossy conversion from long to int
                H[B[i]]=0;
                   ^
Main.java:23: error: incompatible types: possible lossy conversion from long to int
            if(C[A[i]]==C[B[i]]){
                  ^
Main.java:23: error: incompatible types: possible lossy conversion from long to int
            if(C[A[i]]==C[B[i]]){
                           ^
Main.java:24: error: incompatible types: possible lossy conversion from long to int
                H[A[i]]=0;
                   ^
Main.java:25: error: incompatible types: possible lossy conversion from long to int
                H[B[i]]=0;
                   ^
14 errors
Language: C++

#include<iostream>
#include<vector>
#include<algorithm>
#include<set>
#include<map>
#include<stack>
#include<queue>
#include<math.h>
#include<bitset>
#include <numeric>
using namespace std;
using ll=long long;
using ld=long double;
using pint=pair<int,int>;
using pll=pair<ll,ll>;
#define LONG_INF 9223372036854775807
#define INF 1000000000LL
#define EPS 1e-10
#define rep(i, n) for(int i = 0; i < (int)n; i++)
#define dump(a) rep(d,a.size()){cout<<a[d];if(d!=a.size()-1)cout<<" ";else cout<<endl;}
#define all(v) v.begin(),v.end()
#define pb push_back

#define MAX_N 100000

int A[MAX_N][MAX_N]={0};
int H[MAX_N], dp[MAX_N] = {0};

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);

    ll N, M;
    cin >> N >> M;
    for(ll i=1; i<=N; i++) cin >> H[i];

    ll a, b;
    rep(i, M){
        cin >> a >> b;
        A[a][b] = 1;
        A[b][a] = 1;
    }

    ll ret=0;
    for(ll i=1; i<=N; i++){
        if(dp[i] == 0){
            bool temp = true;
            ll vv = 0;

            for(ll j=1; j<=N; j++){
                if(A[i][j] == 1){
                    if (H[i] <= H[j]){
                        temp = false;
                        break;
                    }else{
                        dp[i] = 1;
                    }
                }else{
                    vv++;
                }
            }
            if(temp){
                //cout << i << endl;
                ret++;
            }else if(vv==N) ret ++;
        }
    }

    cout << ret << endl;


    return 0;
}

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

#include<iostream>
#include<vector>
#include<algorithm>
#include<set>
#include<map>
#include<stack>
#include<queue>
#include<math.h>
#include<bitset>
#include <numeric>
using namespace std;
using ll=long long;
using ld=long double;
using pint=pair<int,int>;
using pll=pair<ll,ll>;
#define LONG_INF 9223372036854775807
#define INF 1000000000LL
#define EPS 1e-10
#define rep(i, n) for(int i = 0; i < (int)n; i++)
#define dump(a) rep(d,a.size()){cout<<a[d];if(d!=a.size()-1)cout<<" ";else cout<<endl;}
#define all(v) v.begin(),v.end()
#define pb push_back

#define MAX_N 100000

int A[MAX_N][MAX_N]={0};
int H[MAX_N], dp[MAX_N] = {0};

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);

    ll N, M;
    cin >> N >> M;
    for(ll i=1; i<=N; i++) cin >> H[i];

    ll a, b;
    rep(i, M){
        cin >> a >> b;
        A[a][b] = 1;
        A[b][a] = 1;
    }

    ll ret=0;
    for(ll i=1; i<=N; i++){
        if(dp[i] == 0){
            bool temp = true;
            ll vv = 0;

            for(ll j=1; j<=N; j++){
                if(A[i][j] == 1){
                    if (H[i] <= H[j]){
                        temp = false;
                        break;
                    }else{
                        dp[i] = 1;
                    }
                }else{
                    vv++;
                }
            }
            if(temp){
                //cout << i << endl;
                ret++;
            }else if(vv==N) ret ++;
        }
    }

    cout << ret << endl;


    return 0;
}

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

#include<iostream>
#include<vector>
#include<algorithm>
#include<set>
#include<map>
#include<stack>
#include<queue>
#include<math.h>
#include<bitset>
#include <numeric>
using namespace std;
using ll=long long;
using ld=long double;
using pint=pair<int,int>;
using pll=pair<ll,ll>;
#define LONG_INF 9223372036854775807
#define INF 1000000000LL
#define EPS 1e-10
#define rep(i, n) for(int i = 0; i < (int)n; i++)
#define dump(a) rep(d,a.size()){cout<<a[d];if(d!=a.size()-1)cout<<" ";else cout<<endl;}
#define all(v) v.begin(),v.end()
#define pb push_back

#define MAX_N 100000

int A[MAX_N][MAX_N]={0};
int H[MAX_N], dp[MAX_N] = {0};

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);

    ll N, M;
    cin >> N >> M;
    for(ll i=1; i<=N; i++) cin >> H[i];

    ll a, b;
    rep(i, M){
        cin >> a >> b;
        A[a][b] = 1;
        A[b][a] = 1;
    }

    ll ret=0;
    for(ll i=1; i<=N; i++){
        if(dp[i] == 0){
            bool temp = true;
            ll vv = 0;

            for(ll j=1; j<=N; j++){
                if(A[i][j] == 1){
                    if (H[i] <= H[j]){
                        temp = false;
                        break;
                    }else{
                        dp[i] = 1;
                    }
                }else{
                    vv++;
                }
            }
            if(temp){
                //cout << i << endl;
                ret++;
            }else if(vv==N) ret ++;
        }
    }

    cout << ret << endl;


    return 0;
}

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

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

int main() {
  int N, M;
  cin >> N >> M;
  
  vector<int> height(N);
  vector<int> breaker;
  for (int i=0; i<N; i++)
    cin >> height.at(i);
  
  for (int i=0; i<M; i++) {
    int a, b;
    cin >> a >> b;
    
    if (height.at(a-1) < height.at(b-1)) 
      breaker.push_back(a);
    else if (height.at(a-1) > height.at(b-1)) 
      breaker.push_back(b);
    else {
      breaker.push_back(a);
      breaker.push_back(b);
    }
  }
  
  int count = 0;
  for (int i=0; i<N; i++) {
    int test = 0;
    for (int j=0; j<breaker.size(); j++) {
      if (breaker(j) == i+1)
        test = 1;
    }
    if (test == 0)
      count++;
  }
  
  cout << count << endl;
}
    
  


Compiler output:
a.cc: In function 'int main()':
a.cc:31:18: error: no match for call to '(std::vector<int>) (int&)'
   31 |       if (breaker(j) == i+1)
      |           ~~~~~~~^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int n,m; cin>>n>>m;
  vector<vector<int>> road(n,vector<int>(n,0));
  vector<int> h(n);
  for(int i=0;i<n;i++) cin>>h[i];
  int tmp_a,tmp_b;
  for(int i=0;i<m;i++){
    cin>>tmp_a>>tmp_b;
    road[tmp_a-1][tmp_b-1]=1;
    road[tmp_b-1][tmp_a-1]=1;
  }
  int ans=0;
  bool flag=true;
  for(int i=0;i<n;i++){
    flag=true;
    for(int j=0;j<n;j++){
      if(h[i]<=h[j] && road[i][j]==1 && i!=j){
        flag=false;
        break;
      }else if(road[i][j]==1){
        road[j][i]=0;
      }
    }
    if(flag){ans++; //cout<<i<<endl;}
  }
  cout<<ans<<endl;
}

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

#include <bits/stdc++.h>
#include <cstdlib>
#include <cmath>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int,int>;
const ll INF=1e18 ;
const ll mod=2019 ;
inline void chmax(ll& a,ll b){a=max(a,b);}
inline void chmin(ll& a,ll b){a=min(a,b);}

int main() {
   int n,m ;
   cin >> n>>m ;
   vector<int> H(n) ;
   rep(i,n) cin >> H[i] ;
   vector<int> AB(2*m) ;
   rep(i,2*m) cin >> AB[i] ;
   vector<int> cnt(n) ;
   rep(i,m) {
     if(H[AB[2*i]-1]=>H[AB[2*i+1]-1])
     cnt[AB[2*i+1]-1] = -1 ;
     if(H[AB[2*i]-1]=<H[AB[2*i+1]-1])
    cnt[AB[2*i]-1] = -1 ;
  
   }   
   ll ans=n ;
   rep(i,n){
     if(cnt[i]==-1)
     ans-- ;
   }
   cout<<ans <<endl;
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:22:22: error: expected primary-expression before '>' token
   22 |      if(H[AB[2*i]-1]=>H[AB[2*i+1]-1])
      |                      ^
a.cc:24:22: error: expected primary-expression before '<' token
   24 |      if(H[AB[2*i]-1]=<H[AB[2*i+1]-1])
      |                      ^
Language: C++

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

int main(){
  int N,K;
  cin >> N >> K; //nk=33
  vector<int> P(N) ;
  for(int i =0;i<K;i++){
    int d;
    cin >> d;//1
    vector<int> S(d) ;
    for(int j=0;j<d;j++){
      
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:2: error: expected '}' at end of input
   15 | }
      |  ^
a.cc:8:24: note: to match this '{'
    8 |   for(int i =0;i<K;i++){
      |                        ^
a.cc:15:2: error: expected '}' at end of input
   15 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include <bits/stdc++.h>
#include <cstdlib>
#include <cmath>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int,int>;
const ll INF=1e18 ;
const ll mod=2019 ;
inline void chmax(ll& a,ll b){a=max(a,b);}
inline void chmin(ll& a,ll b){a=min(a,b);}

int main() {
   int n,m ;
   cin >> n>>m ;
   vector<int> H(n) ;
   rep(i,n) cin >> H[i] ;
   vector<int> AB(2*m) ;
   rep(i,2*m) cin >> AB[i] ;
   vector<int> cnt(n) ;
   rep(i,m) {
     if(H[AB[2*i]-1]>=H[AB[2*i+1]-1])
     cnt[AB[2*i+1]-1] = -1 ;
     if(H[AB[2*i]-1]=<H[AB[2*i+1]-1])
    cnt[AB[2*i]-1] = -1 ;
  
   }   
   ll ans=n ;
   rep(i,n){
     if(cnt[i]==-1)
     ans-- ;
   }
   cout<<ans <<endl;
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:24:22: error: expected primary-expression before '<' token
   24 |      if(H[AB[2*i]-1]=<H[AB[2*i+1]-1])
      |                      ^
Language: C++

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

int main(){
int N, M;
  cin >> N >> M;
  
  vector<int> H(N);
  
  for(int i=0;i<N;i++){
    cin >> H.at(i);
  }
  
  vector<vector<int>> G(M, vector<int>(2));
  for(int j=0;j<M;j++){
    cin >> G.at(j).at(0) >> G.at(j).at(1);
  }
  
  set<int> MAX;
  set<int> MIN;
  set<int> ALL;
  
  for(int k=0;k<M;k++){
    MAX.insert(max(G.at(k).at(0),G.at(j).at(1)));
      MIN.insert(max(G.at(k).at(0),G.at(j).at(1)));
      ALL.insert(G.at(k).at(0));
      ALL.insert(G.at(k).at(1));
}
  
  int EX = N - ALL.size();
  
  for(int l=1;l<N+1;l++){
  if(MAX.count(l) && MIN.count(l)){
    MAX.erase(l);
  }
  }
  
  cout << MAX.size() + EX <<endl;
}
    
    


Compiler output:
a.cc: In function 'int main()':
a.cc:24:39: error: 'j' was not declared in this scope
   24 |     MAX.insert(max(G.at(k).at(0),G.at(j).at(1)));
      |                                       ^
Language: C++

#include<iostream>
using namespace std;

int main(){
  int n = 0, m = 0;
  int h[n] = {0};
  int r[n];
  memset(r, 2, sizeof(r));
  for(int i=0; i < n; i++){
    cin >> h[i];
  }
  for(int j=0; j < m; j++){
    int a = 0, b = 0;
    cin >> a >> b;
    if(h[a-1] > h[b-1]){
      if(r[a-1] != 0)	r[a-1] = 1;
      r[b-1] = 0;
    }
    else if(h[a-1] < h[b-1]){
      r[a-1] = 0;
      if(r[b-1] != 0)	r[b-1] = 1;
    }
    else{
      r[a-1] = 0;
      r[b-1] = 0;
    }
  }
  int count = 0;
  for(int k=0; k < n; k++){
    if(r[k] == 1)	count++;
  }
  cout << count << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 'memset' was not declared in this scope
    8 |   memset(r, 2, sizeof(r));
      |   ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<iostream>
  +++ |+#include <cstring>
    2 | using namespace std;
Language: C++

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

int main() {
  int N, M, i, j;
  cin >> N >> M;
  vector<int> vec(N);
  vector<int> vec2;
  vec2.insert(vec2.begin()+0, -1);
  int z = 1;
  for(i = 0; i < N; i++){
    int a;
    cin >> a;
    vec[i] = a;
  }
  for(i = 0; i < M; i++){
    int b, c;
    cin >> b >> c;
    if(vec[b-1] < vec[c-1]){
      for(j = 0; j < z; j++){
        if(vec2[j] == b){
          break;
        }
      }
      if(j == z){
        vec2.insert(vec2.begin()+0, b);
        z++;
      }
    }else if(vec[b-1] > vec[c-1]){
      for(j = 0; j < z; j++){
        if(vec2[j] == c){
          break;
        }
      }
      if(j == z){
        vec2.insert(vec2.begin()+0, c);
        z++;
      }
    }else{
      for(j = 0; j < z; j++){
        if(vec2[j] == b){
          break;
        }
      }
      if(j == z){
        vec2.insert(vec2.begin()+0, b);
        z++;
      }
      for(j = 0; j < z; j++){
        if(vec2[j] == c){
          break;
        }
      }
      if(j == z){
        vec2.insert(vec2.begin()+0, c);
        z++;
      }
  }
  
  cout << N - z + 1 << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:61:2: error: expected '}' at end of input
   61 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

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

int main(){
int N, M;
  cin N >> M;
  
  vector<int> H(N);
  
  for(int i=0;i<N;i++){
    cin >> H.at(i);
  }
  
  vector<vector<int>> G(M, vector<int>(2));
  for(int j=0;j<M;j++){
    cin >> G.at(j).at(0) >> G.at(j).at(1);
  }
  
  set<int> MAX;
  set<int> MIN;
  set<int> ALL;
  
  for(k=0;k<M;k++){
    MAX.insert(max(G.at(k).at(0),G.at(j).at(1)));
      MIN.insert(max(G.at(k).at(0),G.at(j).at(1)));
      ALL.insert(G.at(k).at(0));
      ALL.insert(G.at(k).at(1));
}
  
  int EX = N - ALL.size();
  
  for(l=1;l<N+1;l++){
  if(MAX.count(l) && MIN.count(l)){
    MAX.erase(l);
  }
  }
  
  cout << MAX.size() + EX <<endl;
}
    
    

Compiler output:
a.cc: In function 'int main()':
a.cc:6:6: error: expected ';' before 'N'
    6 |   cin N >> M;
      |      ^~
      |      ;
a.cc:23:7: error: 'k' was not declared in this scope
   23 |   for(k=0;k<M;k++){
      |       ^
a.cc:24:39: error: 'j' was not declared in this scope
   24 |     MAX.insert(max(G.at(k).at(0),G.at(j).at(1)));
      |                                       ^
a.cc:32:7: error: 'l' was not declared in this scope
   32 |   for(l=1;l<N+1;l++){
      |       ^
Language: C

#include <bits/stdc++.h>
#define REP(i, n) for (long long i = 0; i < (long long)n; i++)
//#define _GLIBCXX_DEBUG
using namespace std;
using ll = long long;
using Pi = pair<int, int>;
using Pl = pair<ll, ll>;
using Vl = vector<ll>;
using vi = vector<int>;
using Graph = vector<Vl>;

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  // std::cout << std::fixed << std::setprecision(15); //"for float-base
  // problem"
  ll N, M;
  cin >> N >> M;
  Graph G(N);
  REP(i, N) {
    ll tmp;
    cin >> tmp;
    G.at(i).push_back(tmp);
  }
  ll ans = 0;
  vector<bool> flag(N);

  REP(j, M) {
    int A, B;
    cin >> A >> B;
    G.at(A - 1).push_back(B - 1);
    G.at(B - 1).push_back(A - 1);
  }
  for (ll n = 0; n < N; n++) {
    if (flag.at(n) == true) continue;
    ll H = G.at(n).at(0);
    for (ll q = 1; q < G.at(n).size(); q++) {
      ll query = G.at(n).at(q);
      if (H > G.at(query).at(0)) {
        flag.at(query) = true;
        //       cout << query << "is short than" << n << endl;
      } else if (H == G.at(query).at(0)) {
        flag.at(query) = true;
        flag.at(n) = true;
        //        cout << query << "equal" << n << endl;
        continue;
      } else {
        flag.at(n) = true;
        //        cout << n << "is short than" << query << endl;
        continue;
      }
    }
    if (!flag.at(n)) {
      ans++;
      //     cout << n << endl;
    }
  }
  cout << ans << endl;
}

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

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

typedef long long ll;

#define Canuc80k cin.tie(0); cout.tie(0);
#define I_am ios_base::sync_with_stdio(false);
#define REP(i,a,b) for (int i = a; i < b; i ++)
#define FOR(i,a,b) for (int i = a; i <= b; i ++)
#define FORD(i,a,b) for (int i = a; i >= b; i --)

const int N = 1e6 + 1;
const int M = 1e9 + 7;

string str;
pair<int, int> a[N];
int n, m, h[N], cnt = 0;
bool pp[N];

int main() {
    I_am Canuc80k;

    cin >> n >> m;
    FOR (i, 1, n) {
        cin >> h[i];
        pp[i] = true;
    }

    FOR (i, 1, m)
        cin >> a[i].first >> a[i].second;
        
    sort(a + 1, a + m + 1);

    FOR (i, 1, m) {
        if (h[a[j].second] >=h[a[j].first] ) 
                    pp[a[j].first] = false;
                if (h[a[j].second] <= h[a[j].first]) 
                    pp[a[j].second] = false;
    }   

    FOR (i, 1, n)
        if (pp[i]) cnt ++;
    
    cout << cnt;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:35:17: error: 'j' was not declared in this scope
   35 |         if (h[a[j].second] >=h[a[j].first] )
      |                 ^
a.cc:37:25: error: 'j' was not declared in this scope
   37 |                 if (h[a[j].second] <= h[a[j].first])
      |                         ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, M;
  cin >> N >> M;
  vector<int> vec(N);
  for (int i = 0;i < N;i++){
    cin >> vec.at(i);
  }
  for (int j = 0;j < M;j++){
    int A, B;
    cin >> A >> B;
    if (vec.at(A) = vec.at(B)){
      vec.at(A) = 0;
      vec.at(B) = 0;
    }
    else if(vec.at(A) < vec.at(B)){
      vec.at(A) = 0;
    }
  }
  int count = 0
    for (int n = 0;n < N;n++){
      if (vec.at(n) != 0)
        count++;
    }
  cout << count << endl;
}
      


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

#include <bits/stdc++.h>
#define rep(i,n) for(int i=0; i <(n); i++)
#define all(x) x.begin(), x.end()
using namespace std;
using ll = long long;
using p = pair<int,int>;

int main(){
  int n,m;
  cin >> n >> m;
  vector<int>hight(n);
  rep(i,n)cin >> hight[i];
  vector<int>jdg(n,1);
  rep(i,m){
    int a,b;
    cin >> a >> b;
    int a_h, b_h;
    a_h = hight[a-1];
    b_h = hight[b-1];
    if(a_h == b_h){
      jdg[a-1] = 0;
      jdg[b-1] = 0;
      continue;
    }
    int f;
    if(a_h > b_h) f = b;
    else f = a;
    jdg[f-1] = 0;
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:29:4: error: expected '}' at end of input
   29 |   }
      |    ^
a.cc:8:11: note: to match this '{'
    8 | int main(){
      |           ^
Language: Java

import java.util.*;

class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		long M = sc.nextLong();
		Map<Integer,Long> H = new HashMap<>();
		Set<Integer> s = new HashSet<>();
		Set<Integer> none = new HashSet<>();
		for(int i = 1; i <= N; i++){
			H.put(i,sc.nextLong());
		}
		for(int i = 0; i < M; i++){
			int a = sc.nextInt();
			int b = sc.nextInt();
			none.add(a);
			none.add(b);
			if(H.get(a) - H.get(b) > 0){
				remove(b);
				s.add(a);
			}else if(H.get(b) - H.get(a) > 0){
				remove(a);
				s.add(b);
			}
		}
		System.out.print(s.size() + (N -none.size()));
	}
}

Compiler output:
Main.java:20: error: cannot find symbol
				remove(b);
				^
  symbol:   method remove(int)
  location: class Main
Main.java:23: error: cannot find symbol
				remove(a);
				^
  symbol:   method remove(int)
  location: class Main
2 errors
Language: C++

#include<iostream>
using namespace std;
int main(){
	long long T,R;
	cin >> T >> R;
	long long a[200001]={};
	long long b[200001];
	for(long long i=1;i<=T;i++){
		cin >> b[i];
	}
	for(long long i=0;i<R;i++){
		long long x,y;
		cin >> x >> y;
		a[function(b,x,y)]=1;
	}
	long long sum=0;
	for(long long i=1;i<=T;i++){
		if(a[i]==0){
			sum++;
		}
	}
	cout << sum << endl;
	return 0;
}





Compiler output:
a.cc: In function 'int main()':
a.cc:14:19: error: 'function' was not declared in this scope
   14 |                 a[function(b,x,y)]=1;
      |                   ^~~~~~~~
a.cc:2:1: note: 'std::function' is defined in header '<functional>'; this is probably fixable by adding '#include <functional>'
    1 | #include<iostream>
  +++ |+#include <functional>
    2 | using namespace std;
Language: C++

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

int ans[100005];
int main(){
    int n,m;
    int a,b;
    cin >> n >> m;
    int h[i];
    for(int i=0;i<n;i++)cin >> h[i];
    for(int i=1;i<m+1;i++){
        cin >> a >> b;
        if(h[a-1]<=h[b-1])ans[a-1]--;
    }
    int answer=0;
    for(int i=0;i<n;i++)if(ans[i]>=0)answer++;
    cout << answer << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:11: error: 'i' was not declared in this scope
    9 |     int h[i];
      |           ^
a.cc:10:32: error: 'h' was not declared in this scope
   10 |     for(int i=0;i<n;i++)cin >> h[i];
      |                                ^
a.cc:13:12: error: 'h' was not declared in this scope
   13 |         if(h[a-1]<=h[b-1])ans[a-1]--;
      |            ^
Language: C++

#include<iostream>
#include<cmath>
#include<numeric>
#include<functional>
#include<string>
#include<algorithm>
#include<vector>
#include<map>
#include<iomanip>
#define rep(i,n) for(int i=0;i<n;i++)
#define rep1(i,n) for(int i=1;i<n;i++)
#define ll long long
using namespace std;
using Graph=vector<vector<int>>;

int main(){
  int n,m;
  cin>>n>>m;
  Graph G;
  int h[n];
  rep(i,n){
    cin>>h[i];
  }
  rep(i,m){
    int a,b;
    cin>>a>>b;
    G[a].push_back(b);
  }
  int ans=0;
  rep(i,n){
    int x=1;
    for(auto itr=G[i].begin();itr!=G[i].end();itr++){
      if(h[i]<=h[*itr]]){
        x=0;
      }
    }
    ans+=x;
  }
  cout<<ans;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:33:23: error: expected ')' before ']' token
   33 |       if(h[i]<=h[*itr]]){
      |         ~             ^
      |                       )
a.cc:33:23: error: expected primary-expression before ']' token
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[w[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:69: error: expected ')' before '{' token
    5 |                                if(h[v[i]-1]<=h[w[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[w[i]-1]&&c.at(v[i]-1){c.at(v[i]-1)=0;x--;}}cout<<x<<endl;}
      |                                                                                          ^
Language: C++

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

int ans[100005];
int main(){
    int a,b;
    cin >> n >> m;
    int h[i];
    for(int i=0;i<n;i++)cin >> h[i];
    for(int i=1;i<m+1;i++){
        cin >> a >> b;
        if(h[a-1]<=h[b-1])ans[a-1]--;
    }
    int answer=0;
    for(int i=0;i<n;i++)if(ans[i]>=0)answer++;
    cout << answer << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: 'n' was not declared in this scope
    7 |     cin >> n >> m;
      |            ^
a.cc:7:17: error: 'm' was not declared in this scope
    7 |     cin >> n >> m;
      |                 ^
a.cc:8:11: error: 'i' was not declared in this scope
    8 |     int h[i];
      |           ^
a.cc:9:32: error: 'h' was not declared in this scope
    9 |     for(int i=0;i<n;i++)cin >> h[i];
      |                                ^
a.cc:12:12: error: 'h' was not declared in this scope
   12 |         if(h[a-1]<=h[b-1])ans[a-1]--;
      |            ^
Language: C++

#include<iostream>
#include<cmath>
#include<numeric>
#include<functional>
#include<string>
#include<algorithm>
#include<vector>
#include<map>
#include<iomanip>
#define rep(i,n) for(int i=0;i<n;i++)
#define rep1(i,n) for(int i=1;i<n;i++)
#define ll long long
using namespace std;
using Graph=vector<vector<int>>;

int main(){
  int n,m;
  cin>>n>>m;
  Graph G;
  int h[n];
  rep(i,n){
    cin>>h[i];
  }
  rep(i,m){
    int a,b;
    cin>>a>>b;
    G[a].push_back(b);
  }
  int ans=0;
  rep(i,n){
    int x=1;
    for(auto itr=G[i].begin();itr=G[i].end();itr++){
      if(h[i]<=h[G[i][itr]]){
        x=0;
      }
    }
    ans+=x;
  }
  cout<<ans;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:34: error: could not convert '(itr = (& G.std::vector<std::vector<int> >::operator[](((std::vector<std::vector<int> >::size_type)i)))->std::vector<int>::end())' from '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' to 'bool'
   32 |     for(auto itr=G[i].begin();itr=G[i].end();itr++){
      |                               ~~~^~~~~~~~~~~
      |                                  |
      |                                  __gnu_cxx::__normal_iterator<int*, std::vector<int> >
a.cc:33:22: error: no match for 'operator[]' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<std::vector<int> >, std::vector<int> >::value_type' {aka 'std::vector<int>'} and '__gnu_cxx::__normal_iterator<int*, std::vector<int> >')
   33 |       if(h[i]<=h[G[i][itr]]){
      |                      ^
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from a.cc:4:
/usr/include/c++/14/bits/stl_vector.h:1128:7: note: candidate: 'std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](size_type) [with _Tp = int; _Alloc = std::allocator<int>; reference = int&; size_type = long unsigned int]'
 1128 |       operator[](size_type __n) _GLIBCXX_NOEXCEPT
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1128:28: note:   no known conversion for argument 1 from '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' to 'std::vector<int>::size_type' {aka 'long unsigned int'}
 1128 |       operator[](size_type __n) _GLIBCXX_NOEXCEPT
      |                  ~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:1147:7: note: candidate: 'std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::operator[](size_type) const [with _Tp = int; _Alloc = std::allocator<int>; const_reference = const int&; size_type = long unsigned int]'
 1147 |       operator[](size_type __n) const _GLIBCXX_NOEXCEPT
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1147:28: note:   no known conversion for argument 1 from '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' to 'std::vector<int>::size_type' {aka 'long unsigned int'}
 1147 |       operator[](size_type __n) const _GLIBCXX_NOEXCEPT
      |                  ~~~~~~~~~~^~~
Language: C++

#include<iostream>
using namespace std;

# define MAX_N (1<<5)+10
# define MAX_M (1<<5)+10

int main() {
	int N, M;
	cin >> N >> M;
	int H[MAX_N];
	int isR[MAX_N];
	int A[MAX_N];
	int B[MAX_N];
	memset(isR, 0, sizeof(isR));
	for (int i = 0; i < N; i++) {
		cin >> H[i];
	}
	for (int i = 0; i < M; i++) {
		cin >> A[i] >> B[i];
		isR[A[i] - 1] = 1;
		isR[B[i] - 1] = 1;
	}

	int num = 0;
	for (int i = 0; i < N; i++) {
		if (isR[i] == 0) {
			num++;
			continue;
		}
		int t = 0;
		int m = 0;
		for (int j = 0; j < M; j++) {
			if (A[j] == (i+1)) {
				m = 1;
				if (H[i] > H[B[j]-1]) {
					t = 1;
				}
				else {
					t = 0;
				}
			}
			if (B[j] == (i + 1)) {
				m = 1;
				if (H[i] > H[A[j] - 1]) {
					t = 1;
				}
				else {
					t = 0;
				}
			}
		}
		if ((m == 1 && t == 1)||(m == 0)) {
			num++;
		}
	}

	cout << num << endl;
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:9: error: 'memset' was not declared in this scope
   14 |         memset(isR, 0, sizeof(isR));
      |         ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<iostream>
  +++ |+#include <cstring>
    2 | using namespace std;
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:30:2: error: expected '}' at end of input
   30 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^