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

#include<bits/stdc++.h>
using namespace std;
#define N 100010;
int main(){
  int n,m,h[N],ma[N];
  
  cin>>n>>m;
  for(int i=0;i<n;i++) {
    cin>>h[i];
    ma[i]=0;
  }
  
  for(int i=0;i<m;i++) {
    int a,b;
    cin>>a>>b;
    ma[a]=max(ma[a],h[b]);
    ma[b]=max(ma[b],h[a]);
  }
  
  int ans=0;
  for(int i=0;i<n;i++) {
    if(h[i]>ma[i]){
      ans++;
    }
  }
  cout<<ans<<endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:3:17: error: expected ']' before ';' token
    3 | #define N 100010;
      |                 ^
a.cc:5:13: note: in expansion of macro 'N'
    5 |   int n,m,h[N],ma[N];
      |             ^
a.cc:5:14: error: expected primary-expression before ']' token
    5 |   int n,m,h[N],ma[N];
      |              ^
a.cc:5:20: error: expected primary-expression before ']' token
    5 |   int n,m,h[N],ma[N];
      |                    ^
a.cc:9:10: error: 'h' was not declared in this scope
    9 |     cin>>h[i];
      |          ^
a.cc:10:5: error: 'ma' was not declared in this scope; did you mean 'm'?
   10 |     ma[i]=0;
      |     ^~
      |     m
a.cc:16:5: error: 'ma' was not declared in this scope; did you mean 'a'?
   16 |     ma[a]=max(ma[a],h[b]);
      |     ^~
      |     a
a.cc:16:21: error: 'h' was not declared in this scope
   16 |     ma[a]=max(ma[a],h[b]);
      |                     ^
a.cc:22:8: error: 'h' was not declared in this scope
   22 |     if(h[i]>ma[i]){
      |        ^
a.cc:22:13: error: 'ma' was not declared in this scope; did you mean 'm'?
   22 |     if(h[i]>ma[i]){
      |             ^~
      |             m
Language: C++

#include<bits/stdc++.h>
using namespace std;
#difine N 100010;
int main(){
  int n,m,h[N],ma[N];
  
  cin>>n>>m;
  for(int i=0;i<n;i++) {
    cin>>h[i];
    ma[i]=0;
  }
  
  for(int i=0;i<m;i++) {
    int a,b;
    cin>>a>>b;
    ma[a]=max(ma[a],h[b]);
    ma[b]=max(ma[b],h[a]);
  }
  
  int ans=0;
  for(int i=0;i<n;i++) {
    if(h[i]>ma[i]){
      ans++;
    }
  }
  cout<<ans<<endl;
  return 0;
}

Compiler output:
a.cc:3:2: error: invalid preprocessing directive #difine; did you mean #define?
    3 | #difine N 100010;
      |  ^~~~~~
      |  define
a.cc: In function 'int main()':
a.cc:5:13: error: 'N' was not declared in this scope
    5 |   int n,m,h[N],ma[N];
      |             ^
a.cc:9:10: error: 'h' was not declared in this scope
    9 |     cin>>h[i];
      |          ^
a.cc:10:5: error: 'ma' was not declared in this scope; did you mean 'm'?
   10 |     ma[i]=0;
      |     ^~
      |     m
a.cc:16:5: error: 'ma' was not declared in this scope; did you mean 'a'?
   16 |     ma[a]=max(ma[a],h[b]);
      |     ^~
      |     a
a.cc:16:21: error: 'h' was not declared in this scope
   16 |     ma[a]=max(ma[a],h[b]);
      |                     ^
a.cc:22:8: error: 'h' was not declared in this scope
   22 |     if(h[i]>ma[i]){
      |        ^
a.cc:22:13: error: 'ma' was not declared in this scope; did you mean 'm'?
   22 |     if(h[i]>ma[i]){
      |             ^~
      |             m
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:17:17: error: invalid types 'int[int]' for array subscript
   17 |         cin >> a[i] >> b[i];
      |                 ^
a.cc:17:25: error: invalid types 'int[int]' for array subscript
   17 |         cin >> a[i] >> b[i];
      |                         ^
Language: C++

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

int main() {
  int N, M, H, A, B;
  cin >> N >> M;
  vector<vector<int>> P(N, vector<int>(M));
  int good = 0;
  int T = 1;
  bool judge;
  for (int i = 0; i < N; i++){
    cin >> H;
    P.at(i).at(0) = H;
  }
  for (int i = 0; i < M; i++){
    cin >> A >> B;
    if(P.at(B-1).at(T) == 0) P.at(B-1).at(T) = P.at(A-1).at(0);
    else {
    P.at(B-1).at(G) = P.at(A-1).at(0);
    G++;
    }
    if(P.at(A-1).at(T) == 0) P.at(A-1).at(T) = P.at(B-1).at(0);
    else {
    P.at(A-1).at(G) = P.at(B-1).at(0);
    G++;
    }
  }
  for (int i = 0; i < M; i++){
    for (int j = 1; j <= M; j++){
       if (P.at(i).at(1) == 0) {
         good++;
         break;
       }
       if(P.at(i).at(j) == 0) break;
       if(P.at(i).at(0) > P.at(i).at(j) && !(P.at(i).at(j) == 0)) judge = true;
       else judge = false;
    }
    if (judge) good++;
  }
  cout << good << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:18: error: 'G' was not declared in this scope
   19 |     P.at(B-1).at(G) = P.at(A-1).at(0);
      |                  ^
a.cc:24:18: error: 'G' was not declared in this scope
   24 |     P.at(A-1).at(G) = P.at(B-1).at(0);
      |                  ^
Language: C++

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

#define N 100010

/*
展望台iから一本の道を使ってたどり着けるどんな展望台よりも展望台iの方が標高が高い
＝
展望台iから一本の道を使ってたどり着ける展望台の標高の最大値よりも展望台iの標高が高い

そんなiはいくつあるか
*/

int main(){
    int n,m.h[N],ma[N];
    cin >> n >> m;
    //展望台の標高の入力
    //展望台は1からだから
    for(int i=1;i<=n;i++){
        cin >> h[i];
        ma[i]=0;
    }
    for(int i=0;i<m;i++){
        int a,b;
        //aが展望台の番号
        //bが一本の道を使ってたどり着ける展望台の番号
        cin >> a >> b;
        //maにその展望台の標高の最大値
        /*
        たどり着ける展望台最大値：ma
        自分の標高:h
        を比べている
        */
        ma[a] = max(ma[a],h[b]);
        //上と同様に
        ma[b] = max(ma[b],h[a]);
    }
    int ans = 0;
    /*
    hがその展望台の標高
    maが一本の道で行ける展望台の最大値
    行ける展望台のどれよりも、自分の方が大きい
    */
    //ma[a]=max(ma[a],h[b])でh[b]を代入すれば
    //h[i] > ma[i] になる

    //h[i]の方がma[i]より大きければ+1
    for(int i=1;i<=n;i++){
        ans += h[i]>ma[i];
    }
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:12: error: expected initializer before '.' token
   15 |     int n,m.h[N],ma[N];
      |            ^
a.cc:16:17: error: 'm' was not declared in this scope
   16 |     cin >> n >> m;
      |                 ^
a.cc:20:16: error: 'h' was not declared in this scope
   20 |         cin >> h[i];
      |                ^
a.cc:21:9: error: 'ma' was not declared in this scope; did you mean 'fma'?
   21 |         ma[i]=0;
      |         ^~
      |         fma
a.cc:34:9: error: 'ma' was not declared in this scope; did you mean 'a'?
   34 |         ma[a] = max(ma[a],h[b]);
      |         ^~
      |         a
a.cc:34:27: error: 'h' was not declared in this scope
   34 |         ma[a] = max(ma[a],h[b]);
      |                           ^
a.cc:49:16: error: 'h' was not declared in this scope
   49 |         ans += h[i]>ma[i];
      |                ^
a.cc:49:21: error: 'ma' was not declared in this scope; did you mean 'fma'?
   49 |         ans += h[i]>ma[i];
      |                     ^~
      |                     fma
Language: Java

import java.util.Scanner;

class Tower{
  int hight;
  boolean good = True;
}

public class Main{
  public static void main(String args[]){
    Scanner scan = new Scanner(System.in);
    
    int N = scan.nextInt();
    int M = scan.nextInt();
    
    Tower[] tower = new Tower[N];
    
	for(int n = 0; n < N; n++){
      tower[n] = new Tower();
      tower[n].hight = scan.nextInt();
    }
    
    int el;
    int pt;
    for(int m = 0; m < M; m++){
      el = scan.nextInt()-1;
      pt = scan.nextInt()-1;
      if(tower[el].hight > tower[pt].hight){
        if(tower[pt].good){
          N--;
          tower[pt].good = False;
        }
      }else if(tower[el].hight < tower[pt].hight){
        if(tower[el].good){
          N--;
          tower[el].good = False;
        }
      }else{
         if(tower[pt].good){
          N--;
          tower[pt].good = False;
        }
        if(tower[el].good){
          N--;
          tower[el].good = False;
        }
      }
    }
    
    System.out.println(N);
  }
}

Compiler output:
Main.java:5: error: cannot find symbol
  boolean good = True;
                 ^
  symbol:   variable True
  location: class Tower
Main.java:30: error: cannot find symbol
          tower[pt].good = False;
                           ^
  symbol:   variable False
  location: class Main
Main.java:35: error: cannot find symbol
          tower[el].good = False;
                           ^
  symbol:   variable False
  location: class Main
Main.java:40: error: cannot find symbol
          tower[pt].good = False;
                           ^
  symbol:   variable False
  location: class Main
Main.java:44: error: cannot find symbol
          tower[el].good = False;
                           ^
  symbol:   variable False
  location: class Main
5 errors
Language: C

#include <iostream>
#define rep(i,n) for (int i=0; i<(n); i++)
using namespace std;

int main(){
    int n,m;
    cin >> n >> m;
    int h[n],a,b;
    rep(i,n) cin >> h[i];
    int highest[100010]={0};
    rep(i,m){
        cin >> a >> b;
        highest[a] = max(highest[a], h[b]); 
        highest[b] = max(highest[b], h[a]);

    }
    int result=0;
    for(int i=0; i<n-1; i++){
        if(h[i]>highest[i]){
            result++;
        }
    }

    cout << result << endl;
    return 0;
}

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

#include<stdio.h>
#define N 100002
int main() {
  int i,n,m,h[N],a[m + 1],b[m + 1],ma[N];

  scanf("%d %d",&n,&m);
  for (i = 1;i <= N;i ++) {
    int height;
    scanf("%d",&height);
    h[i] = height;
    ma[i] = 0;
  }

  for (i = 1;i <= m;i ++) {
    int scana,scanb;
    scanf("%d %d",&scana,&scanb);
    a[i] = scana;
    b[i] = scanb;
  }
  for (i = 1;i <= m;i ++) {
    if (ma[scana[i]] <= h[scanb[i]]) {
      ma[scana[i]] = h[scanb[i]];
    }
    if (ma[scanb[i]] <= h[scana[i]]) {
      ma[scanb[i]] = h[scana[i]];
    }
  }
  int x = 0;
  for (i = 1;i <= N;i ++) {
    if (h[i] > ma[i]) {
      x ++;
    }
  }
  printf("%d",x);
}

Compiler output:
main.c: In function 'main':
main.c:21:12: error: 'scana' undeclared (first use in this function); did you mean 'scanf'?
   21 |     if (ma[scana[i]] <= h[scanb[i]]) {
      |            ^~~~~
      |            scanf
main.c:21:12: note: each undeclared identifier is reported only once for each function it appears in
main.c:21:27: error: 'scanb' undeclared (first use in this function); did you mean 'scanf'?
   21 |     if (ma[scana[i]] <= h[scanb[i]]) {
      |                           ^~~~~
      |                           scanf
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[i];
  vector<vector<int>> tree(n,vector<int>(n));
  for (int i=0; i<m; i++){
    int a,b; cin>>a>>b;
    a-=1;
    b-=1;
    tree[a].push_back(h[b]);
    tree[b].push_back(h[a]);
  }
  int ans=0;
  for (int i=0; i<n; i++){
    int i_h=h[i];
    if (i_h>max_h) ans+=1;
  }
  cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:13: error: 'max_h' was not declared in this scope
   19 |     if (i_h>max_h) ans+=1;
      |             ^~~~~
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
#defineN 1000105

int main()
{
  int n,m,h[N],ma[N];
  cin>>n>>m;
  for(int i=1;i<=n;i++)
  {cin>>h[i];ma[i]=0;11}
  for(int i=0;i<m;i++)
  {
    int a,b;cin>>a>>b;
    ma[a]=max(ma[a],h[b]);
    ma[b]=max(ma[b],h[a]);}
  int ans=0;for(int i=1;i<=n;i++){ans+=h[i]>ma[i];}
  cout<<ans<<endl;}

Compiler output:
a.cc:4:2: error: invalid preprocessing directive #defineN; did you mean #define?
    4 | #defineN 1000105
      |  ^~~~~~~
      |  define
a.cc: In function 'int main()':
a.cc:8:13: error: 'N' was not declared in this scope
    8 |   int n,m,h[N],ma[N];
      |             ^
a.cc:11:9: error: 'h' was not declared in this scope
   11 |   {cin>>h[i];ma[i]=0;11}
      |         ^
a.cc:11:14: error: 'ma' was not declared in this scope; did you mean 'm'?
   11 |   {cin>>h[i];ma[i]=0;11}
      |              ^~
      |              m
a.cc:11:24: error: expected ';' before '}' token
   11 |   {cin>>h[i];ma[i]=0;11}
      |                        ^
      |                        ;
a.cc:15:5: error: 'ma' was not declared in this scope; did you mean 'a'?
   15 |     ma[a]=max(ma[a],h[b]);
      |     ^~
      |     a
a.cc:15:21: error: 'h' was not declared in this scope
   15 |     ma[a]=max(ma[a],h[b]);
      |                     ^
a.cc:17:40: error: 'h' was not declared in this scope
   17 |   int ans=0;for(int i=1;i<=n;i++){ans+=h[i]>ma[i];}
      |                                        ^
a.cc:17:45: error: 'ma' was not declared in this scope; did you mean 'm'?
   17 |   int ans=0;for(int i=1;i<=n;i++){ans+=h[i]>ma[i];}
      |                                             ^~
      |                                             m
Language: C++

#include<bits/stdc++.h>
using namespace std;
main()
{
	int n,m,i,p,q;
	cin>>n>>m;
	int a[n];
	int b[n]={0};
	vector<pair<int,int>>v;
	for(i=0;i<n;i++)
	{
		cin>>a[i];
		b[i]=0;
		mp[a[i]]=0;
	}
	for(i=0;i<m;i++)
	{
		cin>>p>>q;
		if(a[p-1]<a[q-1])
		b[p-1]=1;
		if(a[q-1]<a[p-1])
		b[q-1]=1;
	}
	cout<<c<<endl;
	for(i=0;i<n;i++)
	if(b[i]==0)
	c++;
	cout<<c<<endl;

}

Compiler output:
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    3 | main()
      | ^~~~
a.cc: In function 'int main()':
a.cc:14:17: error: 'mp' was not declared in this scope; did you mean 'p'?
   14 |                 mp[a[i]]=0;
      |                 ^~
      |                 p
a.cc:24:15: error: 'c' was not declared in this scope
   24 |         cout<<c<<endl;
      |               ^
Language: C++

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

#define ii pair<int ,int>
#define iii pair<int, ii>
#define all(v) (v).begin(), (v).end()

template <typename T, typename ... Args>
void read(T& n, Args& ... args){cin>>n; in(args...);}

bool comp(iii a, iii b){
    if(a.first==b.first)
        return a.second.first<b.second.first;
    return a.first>b.first;
}

int main(){
    int n,m,cnt=0;
    cin>>n>>m;
    int a[n+7],b[n+7]={0};
    for(int i=0; i<n; i++)
        cin>>a[i];

    for(int i=0; i<m; i++){
        int x,y;
        cin>>x>>y;
        b[x-1]=max(h[x-1],a[y-1]);
        b[y-1]=max(h[y-1],a[x-1]);
    }
    for(int i=0; i<n; i++){
        if(a[i]>h[i])
            cnt++;
    }
    cout<<cnt<<endl;
}










Compiler output:
a.cc: In function 'int main()':
a.cc:27:20: error: 'h' was not declared in this scope
   27 |         b[x-1]=max(h[x-1],a[y-1]);
      |                    ^
a.cc:31:17: error: 'h' was not declared in this scope
   31 |         if(a[i]>h[i])
      |                 ^
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
#define N 100010
int main() {
  int n, m, h[N], ma[N];
  cin>>n>>m;
  for(int i=1; i<=n; i++) {
    cin >> h[i];
    ma[i] = 0;
  }
  for(int i=0; i< m; i++) {
    int a,b;
    cin>>a>>b;
    m[a]=max(ma[a], h[b]);
    m[b]=max(ma[b], h[a]);
  }
  int ans=0;
  for(int i =1;i<=n; i++) {
    ans+=h[i]>ma[i];
  }
  cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:6: error: invalid types 'int[int]' for array subscript
   15 |     m[a]=max(ma[a], h[b]);
      |      ^
a.cc:16:6: error: invalid types 'int[int]' for array subscript
   16 |     m[b]=max(ma[b], h[a]);
      |      ^
Language: C++

#include <bits/stdc++.h>
#define ll long long int
using namespace std;
int main()
{
  int n,m,x,y;
  scanf("%d%d",&n,&m);
  int obs[n+1];
  int c[n+1];
  bool d[n+1];
  memset(d,1,sizeof(d));
  obs[0]=c[0]=d[0]=0;
  for (int i=1;i<=n;i++)
    scanf("%d",&obs[i]);
  for (int i=1;i<=m;i++)
  {
    scanf("%d%d",&x,&y);
    if (obs[x]>obs[y])
      d[y]=0;
    else
      d[x]=0;
    c[x]++;
    c[y]++;
  }
  for (int i=1;i<=n;i++)
  {
    if (d[i]==1)
      count++;
    if (c[i]==0)
      count++;
  }
  printf("%d\n",count);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:12: error: no post-increment operator for type
   28 |       count++;
      |            ^~
a.cc:30:12: error: no post-increment operator for type
   30 |       count++;
      |            ^~
a.cc:32:9: error: overloaded function with no contextual type information
   32 |   printf("%d\n",count);
      |   ~~~~~~^~~~~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
#define ll long long int
using namespace std;
int main()
{
  int n,m;
  scanf("%d%d",&n,&m);
  int obs[n+1];
  int c[n+1];
  bool d[n+1];
  memset(d,1,sizeof(d));
  obs[0]=c[0]=d[0]=0;
  for (int i=1;i<=n;i++)
    scanf("%d",&obs[i]);
  for (int i=1;i<=m;i++)
  {
    scanf("%d%d",&x,&y);
    if (obs[x]>obs[y])
      d[y]=0;
    else
      d[x]=0;
    c[x]++;
    c[y]++;
  }
  for (int i=1;i<=n;i++)
  {
    if (d[i]==1)
      count++;
    if (c[i]==0)
      count++;
  }
  printf("%d\n",count);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:19: error: 'x' was not declared in this scope
   17 |     scanf("%d%d",&x,&y);
      |                   ^
a.cc:17:22: error: 'y' was not declared in this scope
   17 |     scanf("%d%d",&x,&y);
      |                      ^
a.cc:28:12: error: no post-increment operator for type
   28 |       count++;
      |            ^~
a.cc:30:12: error: no post-increment operator for type
   30 |       count++;
      |            ^~
a.cc:32:9: error: overloaded function with no contextual type information
   32 |   printf("%d\n",count);
      |   ~~~~~~^~~~~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
#define ll long long int
using namespace std;
int main()
{
  int n,m,count=0;
  scanf("%d%d",&n,&m);
  int obs[n+1];
  int c[n+1];
  bool d[n+1];
  memset(d,1,sizeof(d));
  obs[0]=c[0]=d[0]=0;
  for (int i=1;i<=n;i++)
    scanf("%d"&obs[i]);
  for (int i=1;i<=m;i++)
  {
    scanf("%d%d",&x,&y);
    if (obs[x]>obs[y])
      d[y]=0;
    else
      d[x]=0;
    c[x]++;
    c[y]++;
  }
  for (int i=1;i<=n;i++)
  {
    if (d[i]==1)
      count++;
    if (c[i]==0)
      count++;
  }
  printf("%d\n",count);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:15: error: invalid operands of types 'const char [3]' and 'int' to binary 'operator&'
   14 |     scanf("%d"&obs[i]);
      |           ~~~~^~~~~~~
      |           |         |
      |           |         int
      |           const char [3]
a.cc:17:19: error: 'x' was not declared in this scope
   17 |     scanf("%d%d",&x,&y);
      |                   ^
a.cc:17:22: error: 'y' was not declared in this scope
   17 |     scanf("%d%d",&x,&y);
      |                      ^
Language: C++

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

struct VP{
  int Number = 0;
  int Height = 0;
  bool good = true;
  vector<int> road = {};
  VP(){}
  VP(int N,int H){Number=N;Height=H;}
};

int main(){
  int N,M,H,Ai,Bi,count;
  cin>>N>>M;
  VP* VPs = new VP[N]
  for(i=0;i<N;i++){
    if(i==0){
      vector.push_back(new VP());
      continue;
    }
    cin>>H;
    vector.push_back(new VP(i,H))
  }
  for(i=0;i<M;i++){
    cin>>Ai>>Bi;
    VPs[Ai].road.push_back(Bi);
    VPs[Bi].road.push_back(Ai);
  }
  for(i=1;i<N;i++){
    for(auto x:VPs[i].road){
      if(VPs[x].Height>=VPs[i].Height){
        VPs[i].good=false;
        goto a;
      }
    }
    count++;
    a:
  }
  cout<<count<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:3: error: expected ',' or ';' before 'for'
   18 |   for(i=0;i<N;i++){
      |   ^~~
a.cc:18:11: error: 'i' was not declared in this scope; did you mean 'Bi'?
   18 |   for(i=0;i<N;i++){
      |           ^
      |           Bi
a.cc:40:3: warning: label at end of compound statement only available with '-std=c++2b' or '-std=gnu++2b' [-Wc++23-extensions]
   40 |   }
      |   ^
Language: C++

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

struct VP{
  int Number = 0;
  int Height = 0;
  bool good = true;
  vector<int> road = {};
  VP(){return;}
  VP(int N,int H;){Number=N;Height=H;}
}

int main(){
  int N,M,H,Ai,Bi,count;
  cin>>N>>M;
  VP* VPs = new VP[N]
  for(i=0;i<N;i++){
    if(i==0){
      vector.push_back(new VP());
      continue;
    }
    cin>>H;
    vector.push_back(new VP(i,H))
  }
  for(i=0;i<M;i++){
    cin>>Ai>>Bi;
    VPs[Ai].road.push_back(Bi);
    VPs[Bi].road.push_back(Ai);
  }
  for(i=1;i<N;i++){
    for(auto x:VPs[i].road){
      if(VPs[x].Height>=VPs[i].Height){
        VPs[i].good=false;
        goto a;
      }
    }
    count++;
    a:
  }
  cout<<count<<endl;
  return 0;
}

Compiler output:
a.cc:11:17: error: expected ')' before ';' token
   11 |   VP(int N,int H;){Number=N;Height=H;}
      |     ~           ^
      |                 )
a.cc:11:18: error: expected unqualified-id before ')' token
   11 |   VP(int N,int H;){Number=N;Height=H;}
      |                  ^
a.cc:12:2: error: expected ';' after struct definition
   12 | }
      |  ^
      |  ;
a.cc: In function 'int main()':
a.cc:18:3: error: expected ',' or ';' before 'for'
   18 |   for(i=0;i<N;i++){
      |   ^~~
a.cc:18:11: error: 'i' was not declared in this scope; did you mean 'Bi'?
   18 |   for(i=0;i<N;i++){
      |           ^
      |           Bi
a.cc:40:3: warning: label at end of compound statement only available with '-std=c++2b' or '-std=gnu++2b' [-Wc++23-extensions]
   40 |   }
      |   ^
Language: Java

public class Main {
    public static void main(final String[] args){
        final Scanner s = new Scanner(System.in);
        final int N = Integer.parseInt(s.next());
        final int M = Integer.parseInt(s.next());
        HashSet<Integer> peak = new HashSet<Integer>();
        HashMap<Integer,Integer> nameAndHigh = new HashMap<Integer,Integer>();
        HashSet<Integer> outList = new HashSet<Integer>();
        
        for(int i=1; i <= N ;i++){
           //peak.add(Integer.parseInt(s.next()));
           nameAndHigh.put(i,Integer.parseInt(s.next()));
        }
        
        for(int i=0; i<M ;i++){
            int peakNameOne = Integer.parseInt(s.next());
            int peakNameTwo = Integer.parseInt(s.next());
            int peakOne = nameAndHigh.get(peakNameOne);
            int peakTwo = nameAndHigh.get(peakNameTwo);
            int losePeak;
            if(peakOne<peakTwo){
                losePeak= peakNameOne;
            }else{
                losePeak = peakNameTwo;
            }

            //int hoge = Math.min(Integer.parseInt(s.next()),Integer.parseInt(s.next()));
            if(!outList.contains(losePeak)){
                outList.add(losePeak);
            }
         }

         System.out.println(N-outList.size());;
   

    }
}


Compiler output:
Main.java:3: error: cannot find symbol
        final Scanner s = new Scanner(System.in);
              ^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
        final Scanner s = new Scanner(System.in);
                              ^
  symbol:   class Scanner
  location: class Main
Main.java:6: error: cannot find symbol
        HashSet<Integer> peak = new HashSet<Integer>();
        ^
  symbol:   class HashSet
  location: class Main
Main.java:6: error: cannot find symbol
        HashSet<Integer> peak = new HashSet<Integer>();
                                    ^
  symbol:   class HashSet
  location: class Main
Main.java:7: error: cannot find symbol
        HashMap<Integer,Integer> nameAndHigh = new HashMap<Integer,Integer>();
        ^
  symbol:   class HashMap
  location: class Main
Main.java:7: error: cannot find symbol
        HashMap<Integer,Integer> nameAndHigh = new HashMap<Integer,Integer>();
                                                   ^
  symbol:   class HashMap
  location: class Main
Main.java:8: error: cannot find symbol
        HashSet<Integer> outList = new HashSet<Integer>();
        ^
  symbol:   class HashSet
  location: class Main
Main.java:8: error: cannot find symbol
        HashSet<Integer> outList = new HashSet<Integer>();
                                       ^
  symbol:   class HashSet
  location: class Main
8 errors
Language: Java

public class Main {
    public static void main(final String[] args){
        final Scanner s = new Scanner(System.in);
        final int N = Integer.parseInt(s.next());
        final int M = Integer.parseInt(s.next());
        HashSet<Integer> peak = new HashSet<Integer>();
        HashMap<Integer,Integer> nameAndHigh = new HashMap<Integer,Integer>();
        HashSet<Integer> outList = new HashSet<Integer>();
        
        for(int i=1; i <= N ;i++){
           //peak.add(Integer.parseInt(s.next()));
           nameAndHigh.put(i,Integer.parseInt(s.next()));
        }
        
        for(int i=0; i<M ;i++){
            int peakNameOne = Integer.parseInt(s.next());
            int peakNameTwo = Integer.parseInt(s.next());
            int peakOne = nameAndHigh.get(peakNameOne);
            int peakTwo = nameAndHigh.get(peakNameTwo);
            int losePeak;
            if(peakOne>peakTwo){
                losePeak= peakNameOne;
            }else{
                losePeak = peakNameTwo;
            }

            //int hoge = Math.min(Integer.parseInt(s.next()),Integer.parseInt(s.next()));
            if(!outList.contains(losePeak)){
                outList.add(losePeak);
            }
         }

         System.out.println(N-outList.size());;
   

    }
}


Compiler output:
Main.java:3: error: cannot find symbol
        final Scanner s = new Scanner(System.in);
              ^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
        final Scanner s = new Scanner(System.in);
                              ^
  symbol:   class Scanner
  location: class Main
Main.java:6: error: cannot find symbol
        HashSet<Integer> peak = new HashSet<Integer>();
        ^
  symbol:   class HashSet
  location: class Main
Main.java:6: error: cannot find symbol
        HashSet<Integer> peak = new HashSet<Integer>();
                                    ^
  symbol:   class HashSet
  location: class Main
Main.java:7: error: cannot find symbol
        HashMap<Integer,Integer> nameAndHigh = new HashMap<Integer,Integer>();
        ^
  symbol:   class HashMap
  location: class Main
Main.java:7: error: cannot find symbol
        HashMap<Integer,Integer> nameAndHigh = new HashMap<Integer,Integer>();
                                                   ^
  symbol:   class HashMap
  location: class Main
Main.java:8: error: cannot find symbol
        HashSet<Integer> outList = new HashSet<Integer>();
        ^
  symbol:   class HashSet
  location: class Main
Main.java:8: error: cannot find symbol
        HashSet<Integer> outList = new HashSet<Integer>();
                                       ^
  symbol:   class HashSet
  location: class Main
8 errors
Language: C++

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

int main(){
  int N, M;
  vector<int> H(N);
  for(int i=0; i < N; i++) cin >> H[i];
  vector<vector<int>> G(N);
  for(int i=0; i < M; i++){
    int a, b;
    cin >> a >> b;
    a--; b--;
    G[a].push_back(a);
    G[b].push_back(b);
  }
  int max_poi = 0;
  int ans = 0;
  
  for(int i=0; i <N; i++){
    for(auto &e: G[i]){
      max_poi = max(max_poi, G[e]);
    }
    if(max_poi < H[i]) ans++;
  }
  cout << ans << endl;
}


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:6:3: error: 'vector' was not declared in this scope
    6 |   vector<int> H(N);
      |   ^~~~~~
a.cc:6:10: error: expected primary-expression before 'int'
    6 |   vector<int> H(N);
      |          ^~~
a.cc:7:28: error: 'cin' was not declared in this scope
    7 |   for(int i=0; i < N; i++) cin >> H[i];
      |                            ^~~
a.cc:7:35: error: 'H' was not declared in this scope
    7 |   for(int i=0; i < N; i++) cin >> H[i];
      |                                   ^
a.cc:8:17: error: expected primary-expression before 'int'
    8 |   vector<vector<int>> G(N);
      |                 ^~~
a.cc:11:5: error: 'cin' was not declared in this scope
   11 |     cin >> a >> b;
      |     ^~~
a.cc:13:5: error: 'G' was not declared in this scope
   13 |     G[a].push_back(a);
      |     ^
a.cc:20:18: error: 'G' was not declared in this scope
   20 |     for(auto &e: G[i]){
      |                  ^
a.cc:21:17: error: 'max' was not declared in this scope
   21 |       max_poi = max(max_poi, G[e]);
      |                 ^~~
a.cc:23:18: error: 'H' was not declared in this scope
   23 |     if(max_poi < H[i]) ans++;
      |                  ^
a.cc:25:3: error: 'cout' was not declared in this scope
   25 |   cout << ans << endl;
      |   ^~~~
a.cc:25:18: error: 'endl' was not declared in this scope
   25 |   cout << ans << endl;
      |                  ^~~~
Language: C++

#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;

typedef long long ll;
const int N = 10010;

int n, m, h[N], vis[N];

inline int read () {
	int s = 0, w = 1;
	char ch = getchar();
	while(ch < '0' || ch > '9') {
		if(ch == '-') w = -1;
		ch = getchar();
	}
	while(ch >= '0' && ch <= '9') {
		s = s * 10 + ch - '0';
		ch = getchar();
	}
	return s * w;
}
int main () {
	n = read(), m = read();
	for(int i = 1; i <= n; i ++ ) h[i] = read();
	for(int i = 1; i <= m; i ++ ) {
		int x = read(), y = read();
		if(h[x] > h[y]) vis[x] = 1;
		else if(h[x] < h[y]) vis[y] = 1;
		else ans ++ ;
	}
	int ans = 0;
	for(int i = 1; i <= n; i ++ ) if(vis[i]) ans ++ ;
	printf("%d\n", ans);
	return 0;
}

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

#include <iostream>
#include <vector>
#include <utility>




int main() {
	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>> p(M);
	for(int i = 0; i < M; ++i){
    	int s, d;
		std::cin >> s >> d;
		p[i] = std::make_pair(s, d);
    }
  	
	int cnt{};
	for(int i = 0; i < N; ++i) {
		bool flag = true;
      	for(int j = 0; hbuff && j < M; ++j) {
        	int hbuff = (p[j].first==h[i] ? p[j].second : (p[j].second==h[i] ? p[j].first : -1));
          	flag = h[i] > hbuff;
        }
      	cnt += flag;
    }

	std::cout << cnt << std::endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:26:24: error: 'hbuff' was not declared in this scope
   26 |         for(int j = 0; hbuff && j < M; ++j) {
      |                        ^~~~~
Language: C++

#include <iostream>
#include <vector>

typedef unsigned short int index;
typedef unsigned long height;

int main() {
	long N, M;
	std::cin >> N >> M;
	std::vector<height> obs_height_vec(N);
	std::vector<std::pair<index, index>> path_vec(M);
	std::vector<int> isGood(N);
	for (auto& height : obs_height_vec) {
		std::cin >> height;
	}
	for (auto& path : path_vec) {
		std::cin >> path.first >> path.second;
		--path.first;
		--path.second;
		if (obs_height_vec.at(path.first) < obs_height_vec.at(path.second)) {
			isGood.at(path.first) = 0;
			isGood.at(path.second) = 1;
		}
		else {
			isGood.at(path.first) = 1;
			isGood.at(path.second) = 0;
		}
	}
	std::cout << std::count(isGood.begin(), isGood.end(), 1) << std::endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:27: error: 'count' is not a member of 'std'; did you mean 'cout'?
   29 |         std::cout << std::count(isGood.begin(), isGood.end(), 1) << std::endl;
      |                           ^~~~~
      |                           cout
Language: C

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

int main(void){
int i,n,m,a,b,count=0;
vector<int> h(N_SIZE);
vector<int> buf(N_SIZE);
cin >> n >> m;
rep(i,n){
cin >> h.at(i);
}
rep(i,n){
    buf.at(i)=h.at(i);
}
rep(i,m){
    cin >> a >> b;
    if(h.at(a) > h.at(b)){
    buf.at(b)=0;  
    }
    else if(h.at(a) < h.at(b)){
    buf.at(a)=0;  
    }
    else{
    buf.at(a)=0;
    buf.at(b)=0;
    }
}
rep(i,n){
//cout << buf.at(i) << endl;
    if(!buf.at(i))
    count++;
}
cout << count << 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++

import os
import sys
from io import BytesIO, IOBase
from collections import defaultdict


def solution():
    pass


def main():
    n, m = r_array()
    heights = r_array()
    heights.insert(0, 0)
    di = defaultdict(int)
    for _ in range(m):
        a, b = r_array()
        di[a] = max(di[a], heights[b])
        di[b] = max(di[b], heights[a])

    res = sum(heights[i] > di[i] for i in range(1, n + 1))
    write(res)


# fast-io region
BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)


def input():
    return sys.stdin.readline().rstrip("\r\n")


def write(*args, end='\n'):
    for x in args[:-1]:
        sys.stdout.write(str(x) + ' ')
    sys.stdout.write(str(args[-1]))
    sys.stdout.write(end)


def r_array():
    return [int(x) for x in input().split()]


def r_int():
    return int(input())


if __name__ == "__main__":
    main()


Compiler output:
a.cc:25:3: error: invalid preprocessing directive #fast
   25 | # fast-io region
      |   ^~~~
a.cc:1:1: error: 'import' does not name a type
    1 | import os
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

#include<bits/stdc++.h>
using namespace std;
int N, M, H[101010];
vector<int> E[101010];
//---------------------------------------------------------------------------------------------------
void _main() {
    cin >> N >> M;
    rep(i, 0, N) cin >> H[i];
    rep(i, 0, M) {
        int a, b; cin >> a >> b;
        a--; b--;
        E[a].push_back(b);
        E[b].push_back(a);
    }

    int ans = 0;
    rep(cu, 0, N) {
        bool ok = true;
        fore(to, E[cu]) if (H[cu] <= H[to]) ok = false;
        if (ok) ans++;
    }
    cout << ans << endl;
}


Compiler output:
a.cc: In function 'void _main()':
a.cc:8:9: error: 'i' was not declared in this scope
    8 |     rep(i, 0, N) cin >> H[i];
      |         ^
a.cc:8:5: error: 'rep' was not declared in this scope
    8 |     rep(i, 0, N) cin >> H[i];
      |     ^~~
a.cc:17:9: error: 'cu' was not declared in this scope
   17 |     rep(cu, 0, N) {
      |         ^~
Language: C++

#include<bits/stdc++.h>

using namespace std;

int A[100005];
bool B[100005];
int main()
{
    int n,m;

    cin>>n>>m;

    for(int i=1;i<=n;i++)
        cin>>A[i];


    int a,b;
    while(m--)
    {
        cin>>a>>b;

        if(A[a] < A[b]){
            B[a] = true;
          else
            B[b]= true;
           
        }
        


    }

    int cont = 0;

    for(int i=1;i<=n;i++)
    {
        if(!B[i])
            cont++;
    }
    cout<<cont;

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:11: error: expected '}' before 'else'
   24 |           else
      |           ^~~~
a.cc:22:24: note: to match this '{'
   22 |         if(A[a] < A[b]){
      |                        ^
a.cc: At global scope:
a.cc:35:5: error: expected unqualified-id before 'for'
   35 |     for(int i=1;i<=n;i++)
      |     ^~~
a.cc:35:17: error: 'i' does not name a type
   35 |     for(int i=1;i<=n;i++)
      |                 ^
a.cc:35:22: error: 'i' does not name a type
   35 |     for(int i=1;i<=n;i++)
      |                      ^
a.cc:40:5: error: 'cout' does not name a type
   40 |     cout<<cont;
      |     ^~~~
a.cc:42:5: error: expected unqualified-id before 'return'
   42 |     return 0;
      |     ^~~~~~
a.cc:43:1: error: expected declaration before '}' token
   43 | }
      | ^
Language: C++

#include <vector>
#include <unordered_map>


using namespace std;

int main(){

  int n, m, h, a, b;
  cin >> n >> m;
  unordered_map<int, int> u;
  vector<bool> good(n + 1, true);
  for(int i = 0 ; i < n; i++){
    cin >> h;
    u[i + 1] = h;
  }

  for(int i = 0 ; i < m; i++){
    cin >> a >> b;
    if(u[a] > u[b]){
      good[b] = false;
    }
    else if(u[a] < u[b]){
      good[a] = false;
    }
    else{
      good[a] = false;
      good[b] = false;
    }
  }



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

  cout << res << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: 'cin' was not declared in this scope
   10 |   cin >> n >> m;
      |   ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include <unordered_map>
  +++ |+#include <iostream>
    3 | 
a.cc:39:3: error: 'cout' was not declared in this scope
   39 |   cout << res << endl;
      |   ^~~~
a.cc:39:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:39:18: error: 'endl' was not declared in this scope
   39 |   cout << res << endl;
      |                  ^~~~
a.cc:3:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    2 | #include <unordered_map>
  +++ |+#include <ostream>
    3 |
Language: C

#include <iostream>
#include <iomanip>
#include <cstdint>
#include <cmath>
#include <string>
#include <vector>
#include <set>
#include <map>
#include <algorithm>
#include <numeric>
#include <limits>
 
int main() {
 
    int64_t N, M;
    std::cin >> N >> M;
 
    std::vector<int64_t> Hs(N+1);
    for (int64_t i = 1; i <= N; ++i) {
        std::cin >> Hs.at(i);
    }
 
    std::set<std::pair<int64_t, int64_t>> pairs;
    std::vector<int64_t> obs(N+1, 1);
 
    auto disable = [&](int64_t idx) {
        if (obs.at(idx) == 1) N--;
        obs.at(idx) = 0;
    };
 
    for (int64_t i = 0; i < M; ++i) {
 
        int64_t A, B;
        std::cin >> A >> B;
        
        if (Hs.at(A) == Hs.at(B)) {
            disable(A);
            disable(B);
            continue;
        }
 
        if (Hs.at(A) > Hs.at(B)) {
            disable(B);
        } else {
            disable(A);
        }
    }
 
    std::cout << N << std::endl;
 
    return 0;
}

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

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

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

  vector<int> H(N);
  vector<bool> Good(N, true);

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

  for(int i = 0;i < M;i++){
    int a,b;
    cin >> a;
    cin >> b;
    a--;
    b--;
    Good[H[a] < H[b] ? a : b] = false;
  }

  int count = 0;
  for(int i = 0;i < N;i++){
    if(Good[i])
      count++;
  }  

  std::cout << count << std::endl;
}


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

#include <bits/stdc++.h>
using namespace std;
int main()
{
  int n,m;
  cin>>n>>m;
  int h[n];
  for (int i=0;i<n;i++)
    cin>>h[i];
  list <int> adj[n];
  while (m--)
  {
    cin>>u>>v;
    adj[u-1].push_back(v-1);
    adj[v-1].push_back(u-1);
  }
  int count=0;
  for (int i=0;i<n;i++)
  {   int tem=0;
    for (auto j: adj[i])
      if (h[j]>=h[i])
        tem=1,break;
    if (tem==0)
      count++;
  }
  cout<<count;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:10: error: 'u' was not declared in this scope
   13 |     cin>>u>>v;
      |          ^
a.cc:13:13: error: 'v' was not declared in this scope
   13 |     cin>>u>>v;
      |             ^
a.cc:22:15: error: expected primary-expression before 'break'
   22 |         tem=1,break;
      |               ^~~~~
Language: C

#include<stdio.h>
int max(int a, int b);
void sort(int a,int b);
int main(void) {
	int N,  M, i, j, d,ma;
	int H[10000]; int B[10000]; int A[10000]; 
	d = 0;
	scanf("%d", &N);
	scanf("%d",&M);
	for (i = 0; i < N; i++) {
		scanf("%d", &H[i]);
	}
	for (i = 0; i < M; i++) {
		scanf("%d", &A[i]);
		scanf("%d", &B[i]);
	}
	
	for (i = 0; i < M; i++) {
		
			H[A[i]-1]= max(H[A[i]-1], H[B[i]-1]);
			H[B[i]-1] = max(H[A[i]-1], H[B[i]-1]);
			

		}
	ma =H[0];
	for (i = 0; i < N; i++) {
		for (j = i; j < N; j++) {
			sort(&H[i], &H[j]);
		}
	}
	for (i = 1; i <M; i++) {
		

		if (ma !=H[i]) {
			d++;
			ma = H[i];
		}
			
		
	}
	
	printf("%d",d+1);
	return 0;
}
int max(int a, int b) {
	if (a > b) {
		return a;
	}
	else {
		return b;
	}
}
void sort(int *a, int *b) {
	int s;
	if (*a > *b) {
		s = *a;
		*a = *b;
		*b = s;
	}
}

Compiler output:
main.c: In function 'main':
main.c:28:30: error: passing argument 1 of 'sort' makes integer from pointer without a cast [-Wint-conversion]
   28 |                         sort(&H[i], &H[j]);
      |                              ^~~~~
      |                              |
      |                              int *
main.c:3:15: note: expected 'int' but argument is of type 'int *'
    3 | void sort(int a,int b);
      |           ~~~~^
main.c:28:37: error: passing argument 2 of 'sort' makes integer from pointer without a cast [-Wint-conversion]
   28 |                         sort(&H[i], &H[j]);
      |                                     ^~~~~
      |                                     |
      |                                     int *
main.c:3:21: note: expected 'int' but argument is of type 'int *'
    3 | void sort(int a,int b);
      |                 ~~~~^
main.c: At top level:
main.c:53:6: error: conflicting types for 'sort'; have 'void(int *, int *)'
   53 | void sort(int *a, int *b) {
      |      ^~~~
main.c:3:6: note: previous declaration of 'sort' with type 'void(int,  int)'
    3 | void sort(int a,int b);
      |      ^~~~
Language: C++

/*
         ██╗ ██████╗ ██╗███╗   ██╗    ██╗   ██╗███████╗
         ██║██╔═══██╗██║████╗  ██║    ██║   ██║██╔════╝
         ██║██║   ██║██║██╔██╗ ██║    ██║   ██║███████╗
    ██   ██║██║   ██║██║██║╚██╗██║    ██║   ██║╚════██║
    ╚█████╔╝╚██████╔╝██║██║ ╚████║    ╚██████╔╝███████║
     ╚════╝  ╚═════╝ ╚═╝╚═╝  ╚═══╝     ╚═════╝ ╚══════╝
*/
//password:+BdCHpO8dQvpo5fnV3/u
#include<bits/stdc++.h>

using namespace std;
typedef long long ll;
const int maxn = 5e5 + 5;
const int inf = 0x3f3f3f3f;


int main() {
    int n,m;
    cin>>n>>m;
    vector<int>h(n+1);
    for(int i=1;i<=n;i++) cin>>h[i];
    vector<int>good(n+1,1);
    map<pair<int,int>,int>qaq;
    for(int i=1;i<=m;i++)
    {
        int x,y;
        cin>>x>>y;
        qaq[make_pair(x,y)]++;
        qaq[make_pair(y,x)]++;
    }
    for(auto it:qaq) {
        else{
            if(h[it.first.first]>h[it.first.second]) good[it.first.second]=0;
            else if(h[it.first.first]<h[it.first.second]) good[it.first.first]=0;
            else good[it.first.first]=0,good[it.first.second]=0;
        }
    }
    int ans=0;
    for(int i=1;i<=n;i++){
        if(good[i]) ans++;
    }
    cout<<ans;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:33:9: error: 'else' without a previous 'if'
   33 |         else{
      |         ^~~~
Language: C++

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

int main() {
  int N,M;
  cin >> N >> M;
  vector<long long> H(N);
  for (int i = 0; i < N; i++) {
    cin >> H.at(i);
  }
  vector<vector<long long>> A(M,vector<long long>(2));
  for (int i = 0; i < M; i++) {
    for (int j = 0; j < 2; j++) {
      cin >> A.at(i).at(j);
    }
  }
  vector<long long> B(2*M);
  for (int i = 0; i < 2:M; i++) {
    B.at(i) = -1;
  }
  int s = 0;
  for (int i = 0; i < M; i++) {
    if (H.at(A.at(i).at(0)-1) < H.at(A.at(i).at(1)-1)) {
      B.at(i) = A.at(i).at(0)-1;
    }
    else if (H.at(A.at(i).at(0)-1) == H.at(A.at(i).at(1)-1)) {
      B.at(i) = A.at(i).at(0)-1;
      B.at(2*M-1-s) = A.at(i).at(1)-1;
      s++;
    }
    else {
      B.at(i) = A.at(i).at(1)-1;
    }
  }
  for  (long long x: B) {
    if (x == -1) {
      continue;
    }
    else {
    H.at(x) = 0;
    }
  }
  int ans = 0;
  for (long long x: H) {
    if (x != 0) {
      ans++;
    }
  }
  cout << ans <<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:19: warning: range-based 'for' loops with initializer only available with '-std=c++20' or '-std=gnu++20' [-Wc++20-extensions]
   18 |   for (int i = 0; i < 2:M; i++) {
      |                   ^
a.cc:18:24: error: expected ';' before ':' token
   18 |   for (int i = 0; i < 2:M; i++) {
      |                        ^
      |                        ;
a.cc:18:31: error: expected ';' before ')' token
   18 |   for (int i = 0; i < 2:M; i++) {
      |                               ^
      |                               ;
Language: Java

import java.util.*;
import java.util.List;

public class Main {
    // l, r in [0, 100]
    static int getKey(int l, int r) {
        return l > r ? l * 1000 + r : r * 1000 + l;
    }

    static Map<Integer, Integer> hs;

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        Main.hs = new ArrayList<>();
        int n = scan.nextInt();
        int nEdge = scan.nextInt();
        for (int i = 0; i < n; i++) {
            hs.put(i + 1, scan.nextInt());
        }
        Map<Integer, Set<Integer>> neighbours = new HashMap<>();
        for (int i = 0; i < nEdge; i++) {
            int l = scan.nextInt();
            int r = scan.nextInt();
            neighbours.computeIfAbsent(l, HashSet::new);
            neighbours.computeIfAbsent(r, HashSet::new);
            neighbours.get(l).add(r);
            neighbours.get(r).add(l);
        }
        scan.close();

        long cnt =
                neighbours.entrySet().stream().filter(Main::isGood).count();

        System.out.println(cnt);
    }

    static boolean isGood(Map.Entry<Integer, Set<Integer>> entry) {
        if (entry.getValue().size() == 0) {
            return true;
        }
        int height = Main.hs.get(entry.getKey());
        for (int key : entry.getValue()) {
            if (height <= Main.hs.get(key)) {
                return false;
            }
        }
        return true;
    }
}



Compiler output:
Main.java:14: error: incompatible types: cannot infer type arguments for ArrayList<>
        Main.hs = new ArrayList<>();
                               ^
    reason: no instance(s) of type variable(s) E exist so that ArrayList<E> conforms to Map<Integer,Integer>
  where E is a type-variable:
    E extends Object declared in class ArrayList
1 error
Language: C++

 #include<iostream>
 #include<algorithm>
 using namespace std;
 #define N 100010
 int main(){
 int n,m,h[N],ma[N];
 cin>>n>>m;
 for(int i=1;i<=n;i++){
 cin>>h[i];
 ma[i]=0;
 }
 for(int i=0;i<m;i++){
 int a,b;
 cin>>a>>b;
 ma[a]=max(ma[a],h[b]);
 ma[b]=max(ma[b],h[a]);
 }
 int ans=0;
 for(int i=1;i<=n;i++){
 ans+=h[i]>ma[i];
 }
22 cout<<ans<<endl;
23 }

Compiler output:
a.cc: In function 'int main()':
a.cc:22:3: error: expected ';' before 'cout'
   22 | 22 cout<<ans<<endl;
      |   ^~~~~
      |   ;
a.cc:23:3: error: expected ';' before '}' token
   23 | 23 }
      |   ^~
      |   ;