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

#include<iostream>
#include<algorithm>
 using namespace std;
 #define N 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;
 }
 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:20: error: expected ']' before 'int'
    4 |  #define N 1000105 int main(){
      |                    ^~~
a.cc:5:12: note: in expansion of macro 'N'
    5 |  int n,m,h[N],ma[N];
      |            ^
Language: Java

import java.util.*;

public class peaks {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int N = in.nextInt(); ///nodes
        int M = in.nextInt();//edge
        int [] arr = new int[N+1];
        int i=1;
        while(in.hasNextInt()){
            arr[i++]  = in.nextInt();
        }
            BitSet bit = new BitSet(N+1);
            for(i=1;i<=N;i++)
            bit.set(i,true);
        for( i=0;i<M;i++){
            int u= in.nextInt();
            int v = in.nextInt();
            if(arr[u]==arr[v]){
                bit.set(u, false);
                bit.set(v, false);
            }
            else if( arr[u]<arr[v]){
                bit.set(u,false);
            }else{
                bit.set(v, true);
            }
        }
        System.out.println(bit.cardinality());
        in.close();
    }
}

Compiler output:
Main.java:3: error: class peaks is public, should be declared in a file named peaks.java
public class peaks {
       ^
1 error
Language: C++

#include <bits/stdc++.h>
 using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; } template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; } 
using ll=long long;
using Graph = vector<vector<int>>;
 int N,memo=0;
vector<ll> h(N);
vector<bool> seen;
map<int,int> cnt;
ll ans;
void dfs(const Graph &G, int v) {
    if(seen[v] &&v != i)continue;
   memo++;
  cnt[memo]++;
    for (auto next_v : G[v]) { 
        if (seen[next_v]) continue; 
        dfs(G, next_v); 
    }
}

int main() {
    int  M; cin >> N >> M;
    ans=N;
    rep(i,N)cin>>h[i];
    Graph G(N);
    for (int i = 0; i < M; ++i) {
        int a, b;
        cin >> a >> b;
        G[a].push_back(b);
        G[b].push_back(a);
    }
    seen.assign(N, false); 
   rep(i,N){
  seen[i]=true;
  dfs(G, i);
   }
  cout<<cnt.size()<<endl;
}

Compiler output:
a.cc: In function 'void dfs(const Graph&, int)':
a.cc:13:23: error: 'i' was not declared in this scope
   13 |     if(seen[v] &&v != i)continue;
      |                       ^
a.cc:13:25: error: continue statement not within a loop
   13 |     if(seen[v] &&v != i)continue;
      |                         ^~~~~~~~
Language: C++

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

int main() {
  int n, m;
  cin >> n >> m;
  int vec[n];
  //maxの収納
  #define N 100000
  int maximum[N];
  for(int i = 0; i < n; i++) {
    cin >> vec[i];
    maximum[i] = 0;
  }
  for(int i = 0; i < m; i++) {
    int a, b;
    cin >> a >> b;
    maximum[a] = max(maximum[a], vec[b]);
    maximum[b] = max(maximum[b], vec[a]);
   }
  int ans = 0;
  for(int i=1;i<=n;i++){
    if(h[i] > maximum[i]) {
      ans++;
    }
  }
  cout << ans << endl;
}      


Compiler output:
a.cc: In function 'int main()':
a.cc:23:8: error: 'h' was not declared in this scope
   23 |     if(h[i] > maximum[i]) {
      |        ^
Language: C

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

int main(void){
	int n,m,count=0;
	scanf("%d %d",&n,&m);
	long long int *h;
	h=malloc(n*sizeof(long long int));
	for(int i=0;i<n;i++){
		scanf("%lld",&h[i]);
	}
	
	int *check;
	check=malloc(n*sizeof(int));
	for(int i=0;i<n;i++){
		check[i]=0;
	}
	int a,b;
	for(int i=0;i<m;i++){
		scanf("%d %d",&a,&b);
			if(h[a]>h[b]){
				check[b]=1;
			}else if(h[a]<h[b]){
				check[a]=1;
			}else{
				check[a]=1;
				check[b]=1;
			}
	}
	for(int i=0;i<n;i++){
		if(check[i]==0){
			count++;
		}
	}
	printf("%d",count);
	free(h);
	free(check)
}

Compiler output:
main.c: In function 'main':
main.c:37:20: error: expected ';' before '}' token
   37 |         free(check)
      |                    ^
      |                    ;
   38 | }
      | ~
Language: C++

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

int main() {
  int n, m;
  cin >> n >> m;
  int vec[n];
  //maxの収納
  #define N 100000
  int maximum[N];
  for(int i = 0; i < n; i++) {
    cin >> vec[i];
    maximum[i] = 0;
  }
  for(int i = 0; i < m; i++) {
    int a, b;
    cin >> a >> b;
    maximum[a] = max(maximum[a], vec[b]);
    maximum[b] = max(maximum[b], vec[a]);
   }
  int ans = 0;
  for(int i=1;i<=n;i++){
    if(h[i]>ma[i]) {
      ans++;
    }
  }
  cout << ans << endl;
}      

Compiler output:
a.cc: In function 'int main()':
a.cc:23:8: error: 'h' was not declared in this scope
   23 |     if(h[i]>ma[i]) {
      |        ^
a.cc:23:13: error: 'ma' was not declared in this scope; did you mean 'm'?
   23 |     if(h[i]>ma[i]) {
      |             ^~
      |             m
Language: C++

#include<iostream>
#include<string>
#include <bits/stdc++.h>
#include<vector>
#include <algorithm>
#include <functional>
using namespace std;

int main(){
  int n,m;
  cin >> n >> m;
  int h[1000000];
  int i,ma[1000000];
  for(i=1;i<=n;i++){
    cin >> h[i];
    ma[i]=0;
  }
  int a[1000000],b[1000000];
  for(i=1;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(i=1;i<=n;i++){
    if(h[i]>ma[i]){
      ans+=h[i];
    }
  }
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:5: error: expected initializer before 'cin'
   21 |     cin >> a >> b;
      |     ^~~
a.cc:22:22: error: invalid types 'int [1000000][int [1000000]]' for array subscript
   22 |     ma[a]=max(ma[a],h[b]);
      |                      ^
a.cc:23:7: error: invalid types 'int [1000000][int [1000000]]' for array subscript
   23 |     ma[b]=max(ma[b],h[a]);
      |       ^
a.cc:23:17: error: invalid types 'int [1000000][int [1000000]]' for array subscript
   23 |     ma[b]=max(ma[b],h[a]);
      |                 ^
Language: C++

#include<bits/stdc++.h>
int main(){
  int N,M;
  std::cin >> N >> M;
  std::vector<int>H(N);
  for(auto& e : H) std::cin >> e;
  std::vector<std::vector<int>>edge(N);
  for(int i = 0; i < M; ++i){
    int s,t; std::cin >> s  >> t;
    --s;--t;
    edge[s].emplace_back(t);
    edge[t].emplace_back(s);
  }
  int ans = 0;
  int v = 0;
  for(auto& v :edge){
    auto itr = std::max_element(v.begin(),v.end());
    if(itr != v.end() and *itr < H[v]) ++ans;
    ++v;
  }
  std::cout << ans << std::endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:35: error: no match for 'operator[]' (operand types are 'std::vector<int>' and 'std::vector<int>')
   18 |     if(itr != v.end() and *itr < H[v]) ++ans;
      |                                   ^
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/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 '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 'std::vector<int>' to 'std::vector<int>::size_type' {aka 'long unsigned int'}
 1147 |       operator[](size_type __n) const _GLIBCXX_NOEXCEPT
      |                  ~~~~~~~~~~^~~
a.cc:19:5: error: no match for 'operator++' (operand type is 'std::vector<int>')
   19 |     ++v;
      |     ^~~
Language: C

#include <stdio.h>
#include <algorithm>
#include <iostream> 
int main(){
    int n, m;
    scanf("%d %d", &n, &m);
    int h[n];
    for(int i = 0; i < n; i++){
        scanf("%d", &h[i]);
    }
    int a, b;
    int ma[n];
    for(int i=0;i<n;i++)
        ma[i]=0;
    for(int i=0;i<m;i++){
        scanf("%d %d",&a,&b);
        if(h[b-1]>=ma[a-1]) ma[a-1]=h[b-1];
        if(h[a-1] >= ma[b-1]) ma[b-1] =h[a-1];a
    }
    register int cnt=0;
    for(int i=0;i<n;i++)
        if(h[i]>ma[i]) cnt++;
    printf("%d", cnt);
    return 0;
}

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

#include<bits/stdc++.h>
int main(){
  int N,M;
  std::cin >> N >> M;
  std::vector<int>H(N);
  for(auto& e : H) std::cin >> e;
  std::vector<std::vector<int>>edge(N);
  for(int i = 0; i < M; ++i){
    int s,t; std::cin >> s  >> t;
    --s;--t;
    edge[s].emplace_back(t);
    edge[t].emplace_back(s);
  }
  int ans = 0;
  int v = 0;
  for(auto& v :edge){
    auto itr = std::max_element(v.begin(),v.end());
    if(*itr < H[v]) ++ans;
    ++v;
  }
  std::cout << ans << std::endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:16: error: no match for 'operator[]' (operand types are 'std::vector<int>' and 'std::vector<int>')
   18 |     if(*itr < H[v]) ++ans;
      |                ^
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/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 '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 'std::vector<int>' to 'std::vector<int>::size_type' {aka 'long unsigned int'}
 1147 |       operator[](size_type __n) const _GLIBCXX_NOEXCEPT
      |                  ~~~~~~~~~~^~~
a.cc:19:5: error: no match for 'operator++' (operand type is 'std::vector<int>')
   19 |     ++v;
      |     ^~~
Language: Java

if __name__ == '__main__':
    
    ## input
    N, M = map(int,input().split())
    HEIGHT_LIST = list(map(int,input().split())) 
    ROAD_LIST = []
    for j in range(M): 
        ROAD_LIST.append(
            set(map(int,input().split()))
        )
    
    ## business logic
    COUNT = 0
    
    for i in list(range(1, N+1)):
        unioned_i = set([])
        for k in ROAD_LIST:
            if i in k:
                unioned_i = unioned_i | k
        if len(unioned_i) == 0:
            COUNT = COUNT + 1
            continue
        HIGHT_i = HEIGHT_LIST[i-1]
        if HIGHT_i >= max(
            [ HEIGHT_LIST[l-1] for l in list(unioned_i) ]
        ):
            COUNT = COUNT + 1
    
    ## output
    print(COUNT)

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
if __name__ == '__main__':
^
Main.java:1: error: unclosed character literal
if __name__ == '__main__':
               ^
Main.java:1: error: unclosed character literal
if __name__ == '__main__':
                        ^
Main.java:3: error: illegal character: '#'
    ## input
    ^
Main.java:3: error: illegal character: '#'
    ## input
     ^
Main.java:12: error: illegal character: '#'
    ## business logic
    ^
Main.java:12: error: illegal character: '#'
    ## business logic
     ^
Main.java:29: error: illegal character: '#'
    ## output
    ^
Main.java:29: error: illegal character: '#'
    ## output
     ^
9 errors
Language: C++

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

int main() {
  long long N,M;
  cin>>N>>M;
  vector<long long>H(N);
  for(long long i=0;i<N;i++){
    cin>>H.at(i);
  }
  vector<long long>A(M),B(M);
  for(long long i=0;i<M;i++){
    cin>>A.at(i)>>B.at(i);
  }
  vector<long long>ans(N,0);
  for(long long i=0;i<M;i++){
    
    if(H.at(A.at(i)-1)>H.at(B.at(i)-1)){
      ans.at(B.at(i)-1)=1;
    }
    if(H.at(A.at(i)-1)<H.at(B.at(i)-1)){
      ans.at(A.at(i)-1)=1;
    }
    if(H.at(A.at(i)==H.at(B.at(i))){
      ans.at(A.at(i)-1)=1;
      ans.at(B.at(i)-1)=1;
    }
  }
  long long X=0;
  for(long long i=0;i<N;i++){
    if(ans.at(i)==1){
      X++;
    }
  }
  cout<<N-X<< endl;
}
  
    
  
  
  
  
      


Compiler output:
a.cc: In function 'int main()':
a.cc:24:36: error: expected ')' before '{' token
   24 |     if(H.at(A.at(i)==H.at(B.at(i))){
      |       ~                            ^
      |                                    )
a.cc:28:3: error: expected primary-expression before '}' token
   28 |   }
      |   ^
Language: C++

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

int main() {
  ll n, m;
  cin >> n >> m;
  vector<ll> h(n);
  rep(i,n) cin >> h[i];
  
  vector<vector<ll>> v(n);
  rep(i,m) {
    ll a, b;
    cin >> a >> b;
    a--;
    b--;
    v[a].push_back(b);
    v[b].push_back(a);
  }
  
  ll ans = 0;
  rep(i,n) {
    bool y = true;
    for (auto z : v[i]) {
      if (h[i] <= h[z]) y = false;
    }
    if (y) ans++;
    }
  }
  
  cout << ans << endl;
}

Compiler output:
a.cc:33:3: error: 'cout' does not name a type
   33 |   cout << ans << endl;
      |   ^~~~
a.cc:34:1: error: expected declaration before '}' token
   34 | }
      | ^
Language: C++

# C++
#include <iostream>
#include <string>
using namespace std;
int main()
{
int N;
int M;
int p=0;
int i=0;
cin >> N;
cin >>M;
int H[N];
int S[N];
for(int k=1;k<=N;k++){
cin >> H[k];
}
for(int s=1;s<=2*M;s++){
cin >> S[s];
}

for(int q=1;q<=N;q++){

for(int t=1;t<=2*M;t+=2){
if(S[t]==q&&H[t+1]>H[t]){
p++;
}
}
for(int e=2;e<=2*M;e+=2){
if(S[e]==q&&H[e]<H[e-1]){
p++;
}
}

if(p==0){
i++;
}
p=0;
}
    std::cout << i << std::endl;
return 0;
}
# INPUT
4 3 1 2 3 4 1 3 2 3 2 4

Compiler output:
a.cc:1:3: error: invalid preprocessing directive #C
    1 | # C++
      |   ^
a.cc:43:3: error: invalid preprocessing directive #INPUT
   43 | # INPUT
      |   ^~~~~
a.cc:44:1: error: expected unqualified-id before numeric constant
   44 | 4 3 1 2 3 4 1 3 2 3 2 4
      | ^
Language: C++

#include<bits/stdc++.h>

using namespace std;

#define ll long long int

int main()
{
ios_base::sync_with_stdio(false);
cout.tie(NULL);
cin.tie(NULL);
              ll i,j,n,m,coun=0,flag;
  cin>>n>>m;
  vector<ll>H(n+1);
  vector<vector<ll>>A(n+1);
  for(i=1;i<=n;i++)
  {
    cin>>H[i];
  }
  for(i=0;i<m;i++)
  {
    cin>>x>>y;
    A[x].push_back(y);
    A[y].push_back(x);
  }
  for(i=1;i<=n;i++)
  {
    if(A[i].size()==0)
    {
      coun++;
      continue;
    }
    flag=0;
    for(j=0;j<A[i].size();j++)
    {
      if(H[A[i]]<H[A[i][j]])
      {
        flag=1;
        break;
      }
    }
    if(flag==0)
      coun++;
  }
  cout<<coun;
              return(0);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:10: error: 'x' was not declared in this scope
   22 |     cin>>x>>y;
      |          ^
a.cc:22:13: error: 'y' was not declared in this scope
   22 |     cin>>x>>y;
      |             ^
a.cc:36:11: error: no match for 'operator[]' (operand types are 'std::vector<long long int>' and '__gnu_cxx::__alloc_traits<std::allocator<std::vector<long long int> >, std::vector<long long int> >::value_type' {aka 'std::vector<long long int>'})
   36 |       if(H[A[i]]<H[A[i][j]])
      |           ^
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/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 = long long int; _Alloc = std::allocator<long long int>; reference = long long 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::__alloc_traits<std::allocator<std::vector<long long int> >, std::vector<long long int> >::value_type' {aka 'std::vector<long long int>'} to 'std::vector<long long 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 = long long int; _Alloc = std::allocator<long long int>; const_reference = const long long 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::__alloc_traits<std::allocator<std::vector<long long int> >, std::vector<long long int> >::value_type' {aka 'std::vector<long long int>'} to 'std::vector<long long int>::size_type' {aka 'long unsigned int'}
 1147 |       operator[](size_type __n) const _GLIBCXX_NOEXCEPT
      |                  ~~~~~~~~~~^~~
Language: C++

#include<iostream>
#include <vector>
using namespace std;
int main(){
  
  vector<vector<int>> v(n+1);
  int n,m; cin>>n>>m;
  
  int H[n+1]{};
  for(int i = 1; i<=n ; i++)cin>>H[i];
  
  for(int i = 0 ; i<m; i++){
    int u,v1; cin>>u>>v1;
    v[u].push_back(v1);
    v[v1].push_back(u);
 	}
  
  int cnt = 0 ; 
  
  for(int i = 1 ; i<=n ; i++){
    int num = H[i];
    bool ok = true;
    for(auto x : v[i]){
      
      if(H[x]>num)ok = false;
    }
    if(ok)cnt++;
   }
  
  cout << cnt;
 return 0; 
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:25: error: 'n' was not declared in this scope
    6 |   vector<vector<int>> v(n+1);
      |                         ^
a.cc:10:34: error: 'H' was not declared in this scope
   10 |   for(int i = 1; i<=n ; i++)cin>>H[i];
      |                                  ^
a.cc:21:15: error: 'H' was not declared in this scope
   21 |     int num = H[i];
      |               ^
Language: C++

#include<iostream>
#include <vector>
using namespace std;
int main(){
  
  vector<vector<int>> v(n);
  int n,m; cin>>n>>m;
  
  int H[n+1]{};
  for(int i = 1; i<=n ; i++)cin>>H[i];
  
  for(int i = 0 ; i<m; i++){
    int u,v1; cin>>u>>v1;
    v[u].push_back(v1);
    v[v1].push_back(u);
 	}
  
  int cnt = 0 ; 
  
  for(int i = 1 ; i<=n ; i++){
    int num = H[i];
    bool ok = true;
    for(auto x : v[i]){
      
      if(H[x]>num)ok = false;
    }
    if(ok)cnt++;
   }
  
  cout << cnt;
 return 0; 
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:25: error: 'n' was not declared in this scope
    6 |   vector<vector<int>> v(n);
      |                         ^
a.cc:10:34: error: 'H' was not declared in this scope
   10 |   for(int i = 1; i<=n ; i++)cin>>H[i];
      |                                  ^
a.cc:21:15: error: 'H' was not declared in this scope
   21 |     int num = H[i];
      |               ^
Language: C++

#include<iostream>
#include <vector>
using namespace std;
int main(){
  
  vector<vector<int>> v;
  int n,m; cin>>n>>m;
  
  int H[n+1]{};
  for(int i = 1; i<=n ; i++)cin>>H[i];
  
  for(int i = 0 ; i<m; i++){
    int u,v; cin>>u>>v1;
    v[u].push_back(v1);
    v[v1].push_back(u);
 	}
  
  int cnt = 0 ; 
  
  for(int i = 1 ; i<=n ; i++){
    int num = H[i];
    bool ok = true;
    for(auto x : v[i]){
      
      if(H[x]>num)ok = false;
    }
    if(ok)cnt++;
   }
  
  cout << cnt;
 return 0; 
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:22: error: 'v1' was not declared in this scope; did you mean 'v'?
   13 |     int u,v; cin>>u>>v1;
      |                      ^~
      |                      v
a.cc:14:6: error: invalid types 'int[int]' for array subscript
   14 |     v[u].push_back(v1);
      |      ^
Language: C++

#include<iostream>
using namespace std;
int main(){
  
  vector<vector<int>> v;
  int n,m; cin>>n>>m;
  
  int H[n+1]{};
  for(int i = 1; i<=n ; i++)cin>>H[i];
  
  for(int i = 0 ; i<m; i++){
    int u,v; cin>>u>>v1;
    v[u].push_back(v1);
    v[v1].push_back(u);
 	}
  
  int cnt = 0 ; 
  
  for(int i = 1 ; i<=n ; i++){
    int num = H[i];
    bool ok = true;
    for(auto x : v[i]){
      
      if(H[x]>num)ok = false;
    }
    if(ok)cnt++;
   }
  
  cout << cnt;
 return 0; 
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'vector' was not declared in this scope
    5 |   vector<vector<int>> v;
      |   ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include<iostream>
  +++ |+#include <vector>
    2 | using namespace std;
a.cc:5:17: error: expected primary-expression before 'int'
    5 |   vector<vector<int>> v;
      |                 ^~~
a.cc:12:22: error: 'v1' was not declared in this scope; did you mean 'v'?
   12 |     int u,v; cin>>u>>v1;
      |                      ^~
      |                      v
a.cc:13:6: error: invalid types 'int[int]' for array subscript
   13 |     v[u].push_back(v1);
      |      ^
a.cc:22:18: error: 'v' was not declared in this scope
   22 |     for(auto x : v[i]){
      |                  ^
Language: C++

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

int main(){
    int N, M;
    cin >> N >> M;
    int H[N],ma[N];
    for (int i = 1; i <= N; ++i){
        cin >> H[i];
        ma[i] = 0;
    }
    
    for (int i = 1; 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;
    return 0;
}


Compiler output:
a.cc:23:5: error: expected unqualified-id before 'for'
   23 |     for (int i = 1; i <= N; ++i){
      |     ^~~
a.cc:23:21: error: 'i' does not name a type
   23 |     for (int i = 1; i <= N; ++i){
      |                     ^
a.cc:23:29: error: expected unqualified-id before '++' token
   23 |     for (int i = 1; i <= N; ++i){
      |                             ^~
a.cc:26:5: error: 'cout' does not name a type
   26 |     cout << ans << endl;
      |     ^~~~
a.cc:27:5: error: expected unqualified-id before 'return'
   27 |     return 0;
      |     ^~~~~~
a.cc:28:1: error: expected declaration before '}' token
   28 | }
      | ^
Language: C++

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

int main() {

int n,m;
cin>>n>>m;
vector<int> high(n);
for(int i=0;i<n;i++){
    cin>>high[i];
}
vector<int> vec(n,0);
for(int i=0;i<m;i++){
    int a,b;
    cin>>a>>b;
    int x,y;
    x=high[a-1];
    y=high[b-1];
    if(x<y){
        vec[a-1]++;
    }
    else(y>x){
        vec[b-1]++;
    }
}
int count=0;
for(int i=0;i<n;i++){
   if(vec[i]==0){
       count++;
   }
}
cout<<count<<endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:14: error: expected ';' before '{' token
   22 |     else(y>x){
      |              ^
      |              ;
Language: C++

if __name__ == '__main__':
    n, m = tuple(map(int, input().split()))
    heights = list(map(int, input().split()))
    heights = [0] + heights
    roads = {}
    count = 0
    for i in range(0, m):
        a, b = tuple(map(int, input().split()))
        if not (a in roads.keys()):
            roads[a] = {heights[b], }
        else:
            roads[a].add(heights[b])
        if not (b in roads.keys()):
            roads[b] = {heights[a], }
        else:
            roads[b].add(heights[a])
    for each in roads.items():
        if heights[each[0]] > max(each[1]):
            count += 1
    count +=  n - len(roads.keys())
    print(count)


Compiler output:
a.cc:1:16: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
    1 | if __name__ == '__main__':
      |                ^~~~~~~~~~
a.cc:1:1: error: expected unqualified-id before 'if'
    1 | if __name__ == '__main__':
      | ^~
a.cc:6:5: error: 'count' does not name a type
    6 |     count = 0
      |     ^~~~~
a.cc:11:9: error: expected unqualified-id before 'else'
   11 |         else:
      |         ^~~~
a.cc:15:9: error: expected unqualified-id before 'else'
   15 |         else:
      |         ^~~~
Language: C++

#include<iostream>
2 #include<algorithm>
3 using namespace std;
4 #define N 100010
5 int main(){
6 int n,m,h[N],ma[N];
7 cin>>n>>m;
8 for(int i=1;i<=n;i++){
9 cin>>h[i];
10 ma[i]=0;
11 }
12 for(int i=0;i<m;i++){
13 int a,b;
14 cin>>a>>b;
15 ma[a]=max(ma[a],h[b]);
16 ma[b]=max(ma[b],h[a]);
17 }
18 int ans=0;
19 for(int i=1;i<=n;i++){
20 ans+=h[i]>ma[i];
21 }
22 cout<<ans<<endl;
23 }

Compiler output:
a.cc:2:3: error: stray '#' in program
    2 | 2 #include<algorithm>
      |   ^
a.cc:4:3: error: stray '#' in program
    4 | 4 #define N 100010
      |   ^
a.cc:2:1: error: expected unqualified-id before numeric constant
    2 | 2 #include<algorithm>
      | ^
a.cc:4:1: error: expected unqualified-id before numeric constant
    4 | 4 #define N 100010
      | ^
Language: C++

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

int main(){
  int n,m,ans=0;
  cin >> n >> m;
  vector<int> h(n),a(m),b(m),Mt(n);
  for(int i=0;i<n;i++){
    cin >> h.at(i);
  }
  for(int i=0;i<n;i++){
    cin >> a.at(i) >> b.at(i);
    if(h.at(a.at(i)-1) >= h.at(b.at(i)-1)) Mt.at(b.at(i)-1) = -1;
    else if(h.at(a.at(i)-1) <= h.at(b.at(i)-1)) Mt.at(a.at(i)-1) = -1;
  }
  
  for(int i=0;i<n;i++){
    if(Mt.at(i) == 0) ans++;
  }
  
  cout << asn << endl;
  
  
  return 0;
}


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

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

int main(){
  int n,m,ans=0;
  cin >> n >> m;
  vector<int> h(n),a(m),b(m),Mt(n);
  for(int i=0;i<n;i++){
    cin >> h.at(i);
  }
  for(int i=0;i<n;i++){
    cin >> a.at(i) >> b.at(i);
    if(h.at(a.at(i)-1) >= h.at(b.at(i)-1)) Mt.at(b.at(i)-1) = -1;
    else if(h.at(a.at(i)-1) <= h.at(b.at(i)-1)) Mt.at(a.at(i)-1) = -1
  }
  
  for(int i=0;i<n;i++){
    if(Mt.at(i) == 0) ans++;
  }
  
  cout << asn << endl;
  
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:70: error: expected ';' before '}' token
   14 |     else if(h.at(a.at(i)-1) <= h.at(b.at(i)-1)) Mt.at(a.at(i)-1) = -1
      |                                                                      ^
      |                                                                      ;
   15 |   }
      |   ~                                                                   
a.cc:21:11: error: 'asn' was not declared in this scope; did you mean 'ans'?
   21 |   cout << asn << endl;
      |           ^~~
      |           ans
Language: C

#include <stdio.h>
#include <math.h>

int main(){
    int n, m;
    scanf("%d %d", &n, &m);

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

    int a, b;
    int ma[m];
    for(int i = 0; i < m; i++){
        scanf("%d %d", &a, &b);
        ma[a] = max(ma[a], h[b]);
        ma[b] = max(ma[b], h[a]);
    }

    int cnt = 0;
    for(int i = 0; i < n; i++){
        if(h[i] > ma[i]) cnt++;
    }
}

Compiler output:
main.c: In function 'main':
main.c:17:17: error: implicit declaration of function 'max'; did you mean 'fmax'? [-Wimplicit-function-declaration]
   17 |         ma[a] = max(ma[a], h[b]);
      |                 ^~~
      |                 fmax
Language: C++

#define reps(i, x) for (int i = 1; i <= (int)(x); i++)
#define rrep(i, x) for (int i = ((int)(x)-1); i >= 0; i--)
#define rreps(i, x) for (int i = ((int)(x)); i > 0; i--)
#define SIZE_OF_ARRAY(array) (sizeof(array)/sizeof(array[0]))
 
using ll = long long;
using namespace std;
 int main(){
 ll aaaaa;
 int n,m,a,b,ans=0;
  cin>>n>>m;
  vector<int>h(n);
  vector<int>plan(m);
  rep(i,n)cin>>h[i];
 rep(i,m){
   cin>>a>>b;
  plan[a-1]=max(plan[a-1],h[b-1]);
  plan[b-1]=max(plan[b-1],h[a-1]);
 }
 rep(i,n)ans+=h[i]>plan[i];
cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:3: error: 'cin' was not declared in this scope
   11 |   cin>>n>>m;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #define reps(i, x) for (int i = 1; i <= (int)(x); i++)
a.cc:12:3: error: 'vector' was not declared in this scope
   12 |   vector<int>h(n);
      |   ^~~~~~
a.cc:1:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
  +++ |+#include <vector>
    1 | #define reps(i, x) for (int i = 1; i <= (int)(x); i++)
a.cc:12:10: error: expected primary-expression before 'int'
   12 |   vector<int>h(n);
      |          ^~~
a.cc:13:10: error: expected primary-expression before 'int'
   13 |   vector<int>plan(m);
      |          ^~~
a.cc:14:7: error: 'i' was not declared in this scope
   14 |   rep(i,n)cin>>h[i];
      |       ^
a.cc:14:3: error: 'rep' was not declared in this scope; did you mean 'reps'?
   14 |   rep(i,n)cin>>h[i];
      |   ^~~
      |   reps
a.cc:21:1: error: 'cout' was not declared in this scope
   21 | cout<<ans<<endl;
      | ^~~~
a.cc:21:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:21:12: error: 'endl' was not declared in this scope
   21 | cout<<ans<<endl;
      |            ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #define reps(i, x) for (int i = 1; i <= (int)(x); i++)
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <numeric>
#include <functional>
#include <string>
#include <map>//map<int, int> x;
#include <numeric>
#define rep(i, x) for (int i = 0; i < (int)(x); i++)
#define reps(i, x) for (int i = 1; i <= (int)(x); i++)
#define rrep(i, x) for (int i = ((int)(x)-1); i >= 0; i--)
#define rreps(i, x) for (int i = ((int)(x)); i > 0; i--)
#define SIZE_OF_ARRAY(array) (sizeof(array)/sizeof(array[0]))
 
using ll = long long;
using namespace std;
 int main(){
 ll aaaaa;
 int n,m,a,b,ans=0;
  cin>>n>>m;
  vector<int>h(n);
  vector<int>plan(m);
  reps(i,n)cin>>h[i];
 reps(i,m){
   cin>>a>>b;
  plan[a]=max(plan[a],h[b])
  plan[b]=max(plan[b],h[a])
 }
 reps(i,n)ans+=h[i]>plan[i]
cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:28: error: expected ';' before 'plan'
   27 |   plan[a]=max(plan[a],h[b])
      |                            ^
      |                            ;
   28 |   plan[b]=max(plan[b],h[a])
      |   ~~~~                      
a.cc:30:28: error: expected ';' before 'cout'
   30 |  reps(i,n)ans+=h[i]>plan[i]
      |                            ^
      |                            ;
   31 | cout<<ans<<endl;
      | ~~~~
Language: Java

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

Compiler output:
Note: Main.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for (ll i=1 ; i<=(n) ; ++i)
typedef long long ll;
using namespace std;
const ll MAX = 2500LL;
typedef pair <ll, ll> P;


int main(){
  int n,m;
  cin >> n >> m;
  vector<ll> h;
  vector<ll> ma(n,0);
  rep(i,n){
    int h_y
    cin >> h_y;
    h.push_back(h_y);
  }
  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;
  rep(i,n){
    if(h[i]>ma[i]) ans++;
  }
  cout << ans << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:5: error: expected initializer before 'cin'
   16 |     cin >> h_y;
      |     ^~~
a.cc:17:17: error: 'h_y' was not declared in this scope
   17 |     h.push_back(h_y);
      |                 ^~~
Language: C++

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

int main(){
    ll n,m;
    cin>>n>>m;
    vector<ll> h(n);
    rep(i,n) cin>>h[i];
    ll a,b;
    vector<ll> nmax(n,0);
    rep(i,m){
        cin>>a>>b;
        a--; b--;
        nmax[a]=max(nmax[a],h[b]);
        nmax[b]=max(nmac[b],h[a]);
    }
    ll ans=0;
    rep(i,n) ans+=(h[i]>nmax[i]);
    cout<<ans<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:21: error: 'nmac' was not declared in this scope; did you mean 'nmax'?
   18 |         nmax[b]=max(nmac[b],h[a]);
      |                     ^~~~
      |                     nmax
Language: Java

package main.task166;

import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Scanner;
import java.io.PrintWriter;
import java.util.Set;

public class C {
    public void solve(int testNumber, Scanner in, PrintWriter out) {
      int N = in.nextInt();
      int M = in.nextInt();
      Set<Integer> set = new HashSet<>();
      int[] h = new int[N];

      for (int i = 0; i < N; i++) {
        h[i] = in.nextInt();
      }

      for (int j = 0; j < M; j++) {
        int a = in.nextInt();
        int b = in.nextInt();

        if(h[a-1]==h[b-1]) {
          set.add(a);
          set.add(b);
        }else {
          set.add(h[a-1] < h[b-1]? a:b);
        }
      }
      out.print(N-set.size());
    }
}


Compiler output:
Main.java:11: error: class C is public, should be declared in a file named C.java
public class C {
       ^
1 error
Language: C++

#include<iostream>
#include<string>
#include <algorithm>
using namespace std;
int main()
{
	const int a = 100000;
	int N;//展望台の数
	ll Ni[a];//展望台iの高さ
	int M;//
	int A[a];
	int B[a];
	int winN[a] = {0};
 
	cin >> N;
	cin >> M;
 
	for (int i = 0; i < N; i++)
	{
		cin >> Ni[i];//高さ
	}
 
	for (int i = 0; i < M; i++)
	{
		cin >> A[i];
		cin >> B[i];
	}
 
	int count = 0;
	for (int i = 0; i < M; i++)
	{
		if (A[i] == B[i])
		{
 
		}
		else if (A[i] > B[i])
		{
			winN[i] = A[i];
			count++;
		}
		else
		{
			winN[i] = B[i];
			count++;
		}
	}
 
	sort(winN, winN + a);
	for (int i = a - 1; i > 1; i--)
	{
		if (winN[i] != 0)
		{
			if (winN[i] == winN[i - 1])
			{
				count--;
			}
		}
	}
 
	cout << count << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: 'll' was not declared in this scope
    9 |         ll Ni[a];//展望台iの高さ
      |         ^~
a.cc:20:24: error: 'Ni' was not declared in this scope; did you mean 'i'?
   20 |                 cin >> Ni[i];//高さ
      |                        ^~
      |                        i
Language: Java

import java.util.HashMap;
import java.util.*;
import java.util.Scanner;


public class C {
    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);
        Map <Integer,Integer> lightMap = new HashMap<>();
        Set<Integer> removeSet = new HashSet<>();

        int n = sc.nextInt();
        int m = sc.nextInt();

        for(int i = 0; i < n; i++){//n回繰り返し
            int lightNum = i + 1;
            int lightHeight = sc.nextInt();
            lightMap.put(lightNum,lightHeight); //灯台番号と高さの入ったリスト作る
        }

        for(int i = 0; i < m;i++){ //m回繰り返し
            int a = sc.nextInt();
            int b = sc.nextInt(); //道の両サイドの灯台のkey
            int aHeight = lightMap.get(a);
            int bHeight = lightMap.get(b);

            if(aHeight < bHeight){//高さが低い方をリストに入れる（良い展望台ではない）
                removeSet.add(a);
            }else if(aHeight > bHeight){
                removeSet.add(b);
            }else{
                removeSet.add(a);
                removeSet.add(b);
            }
        }
        System.out.print(n - removeSet.size());
    }
}


Compiler output:
Main.java:6: error: class C is public, should be declared in a file named C.java
public class C {
       ^
1 error
Language: C++

#include<iostream>
constexpr int N = 100005;
bool michi[N][N];
bool hikui[N];
int main(){
    using namespace std;
    int n,m;
    cin >> n  >> m;
    int h[N];
    for(int i=1; i<=n; i++) cin >> h[i];
    for(int i=0; i<m; i++) {
        int a,b;
        cin >> a >> b;
        if(!michi[a][b]){
            michi[a][b] = michi[b][a] = true;
            if(h[a]<h[b])  hikui[a] = true;
            if(h[a]==h[b]) hikui[a] = hikui[b] = true;
            if(h[a]>h[b])  hikui[b] = true;
        }
    }
    int ans = 0;
    for(int i=1; i<=n; i++){
        if(!hikui[i])ans++;
    }
    cout << ans << endl;
    return 0;
}

Compiler output:
/tmp/cceKBQcz.o: in function `main':
a.cc:(.text+0x175): relocation truncated to fit: R_X86_64_PC32 against symbol `hikui' defined in .bss section in /tmp/cceKBQcz.o
a.cc:(.text+0x1ab): relocation truncated to fit: R_X86_64_PC32 against symbol `hikui' defined in .bss section in /tmp/cceKBQcz.o
a.cc:(.text+0x1be): relocation truncated to fit: R_X86_64_PC32 against symbol `hikui' defined in .bss section in /tmp/cceKBQcz.o
a.cc:(.text+0x1cc): relocation truncated to fit: R_X86_64_PC32 against symbol `hikui' defined in .bss section in /tmp/cceKBQcz.o
a.cc:(.text+0x200): relocation truncated to fit: R_X86_64_PC32 against symbol `hikui' defined in .bss section in /tmp/cceKBQcz.o
a.cc:(.text+0x230): relocation truncated to fit: R_X86_64_PC32 against symbol `hikui' defined in .bss section in /tmp/cceKBQcz.o
collect2: error: ld returned 1 exit status
Language: C++

#include<iostream>
using namespace std;
int main(){
	int N,M,cou=0;
	cin>>N>>M;
	int H[N],A[M],B[M],G[(N+1)]={0];
	for(int i=0;i<N;i++)cin>>H[i];
	for(int i=0;i<M;i++){
		cin>>A[i];
		cin>>B[i];
		if(H[A[i]]>H[B[i]])G[B[i]]++;
		else G[A[i]]++;
	}
	for(int i=1;i<=N;i++)if(G[i]==0)cou++;
	cout<<cou<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:39: error: expected '}' before ']' token
    6 |         int H[N],A[M],B[M],G[(N+1)]={0];
      |                                     ~ ^
a.cc:6:39: error: expected ',' or ';' before ']' token
Language: C++

#include<bits/stdc++.h>
constexpr int N = 100005;
bool michi[N][N];
bool hikui[N];
int main(){
    using namespace std;
    int n,m;
    cin >> n  >> m;
    vector<int> h(n+1);
    for(int i=1; i<=n; i++) cin >> h[i];
    // int ans = n;
    for(int i=0; i<m; i++) {
        int a,b;
        cin >> a >> b;
        if(!michi[a][b]){
            michi[a][b] = michi[b][a] = true;
            if(h.at(a)<h.at(b))
                    hikui[a] = true;

            else if(h.at(a)==h.at(b)){
                    hikui[a] = true;
                    hikui[b] = true;
            }

            else
                    hikui[b] = true;

        }
    }
    int ans = 0;
    for(int i=1; i<=n; i++){
        if(!hikui[i])ans++;
    }
    cout << ans << endl;
    return 0;
}

Compiler output:
/tmp/ccvSrNiG.o: in function `main':
a.cc:(.text+0x1a1): relocation truncated to fit: R_X86_64_PC32 against symbol `hikui' defined in .bss section in /tmp/ccvSrNiG.o
a.cc:(.text+0x1ea): relocation truncated to fit: R_X86_64_PC32 against symbol `hikui' defined in .bss section in /tmp/ccvSrNiG.o
a.cc:(.text+0x1fa): relocation truncated to fit: R_X86_64_PC32 against symbol `hikui' defined in .bss section in /tmp/ccvSrNiG.o
a.cc:(.text+0x20c): relocation truncated to fit: R_X86_64_PC32 against symbol `hikui' defined in .bss section in /tmp/ccvSrNiG.o
a.cc:(.text+0x23c): relocation truncated to fit: R_X86_64_PC32 against symbol `hikui' defined in .bss section in /tmp/ccvSrNiG.o
collect2: error: ld returned 1 exit status
Language: C++

#include <iostream>
int HH[100010][100010];
int H[100010];
int main(void) {
	int N, M;
	scanf("%d %d\n", &N, &M);
	//printf("%d %d\n", N,M);
	int i = 0, j;
	for (; i < N; i++) {
		scanf("%d", &H[i]);
		//printf("%d ", H[i]);
	}
	scanf("\n");

	int A_j, B_j;

	for (i = 0; i < 10005; i++) {
		for (j = 0; j < 10005; j++) {
			HH[i][j] = 0;
		}
		//bri[i] = 0;
	}

	for (i = 0; i < M; i++) {
		scanf("%d ", &A_j);
		scanf("%d\n", &B_j);
		//printf("%d %d\n", A_j, B_j);
		HH[A_j - 1][B_j - 1] = 1;
		HH[B_j - 1][A_j - 1] = 1;
	}

	int sum = 0;
	int miniSum, flag;

	for (i = 0; i < N; i++) {
		miniSum = 0;
		flag = 0;
		for (j = 0; j < N; j++) {
			miniSum += HH[i][j];
			if (HH[i][j] == 1 && H[i] <= H[j]) flag = 1;
		}
		if (miniSum == 0 || flag == 0) {
			sum++;
		}
		//bri[i] = 0;
	}


	printf("%d\n", sum);
	return 0;
}

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

#include<bits/stdc++.h>
constexpr int N = 100005;
using namespace std;
bool michi[N][N];
bool hikui[N];
int main(){
    // std::fill(roadIsBelongsTo, roadIsBelongsTo+100004, -1);
    using namespace std;
    int n,m;
    cin >> n  >> m;
    std::vector<int> h(n+1);
    for(int i=1; i<=n; i++) cin >> h[i];
    // int ans = n;
    for(int i=0; i<m; i++) {
        int a,b;
        cin >> a >> b;
        if(!michi[a][b]){
            michi[a][b] = michi[b][a] = true;
            if(h.at(a)<h.at(b))
                    hikui[a] = true;

            else if(h.at(a)==h.at(b)){
                    hikui[a] = true;
                    hikui[b] = true;
            }

            else
                    hikui[b] = true;

        }
    }
    int ans = 0;
    for(int i=1; i<=n; i++){
        if(!hikui[i])ans++;
    }
    cout << ans << endl;
    return 0;
}

Compiler output:
/tmp/cctU7RnU.o: in function `main':
a.cc:(.text+0x1a1): relocation truncated to fit: R_X86_64_PC32 against symbol `hikui' defined in .bss section in /tmp/cctU7RnU.o
a.cc:(.text+0x1ea): relocation truncated to fit: R_X86_64_PC32 against symbol `hikui' defined in .bss section in /tmp/cctU7RnU.o
a.cc:(.text+0x1fa): relocation truncated to fit: R_X86_64_PC32 against symbol `hikui' defined in .bss section in /tmp/cctU7RnU.o
a.cc:(.text+0x20c): relocation truncated to fit: R_X86_64_PC32 against symbol `hikui' defined in .bss section in /tmp/cctU7RnU.o
a.cc:(.text+0x23c): relocation truncated to fit: R_X86_64_PC32 against symbol `hikui' defined in .bss section in /tmp/cctU7RnU.o
collect2: error: ld returned 1 exit status
Language: C++

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

int main(){
    long long N, M;
    cin >> N >> M;
    vector<long long> H(N+1);
    vector<int> X(N+1, 1);
    vector<long long> A(M+1);
    vector<long long> B(M+1);
    for (int i = 1; i <= N; ++i){
        cin >> H[i];
    }
    for (int i = 1; i <= M; ++i){
        cin >> A[i] >> B[i];
        if (H[A[i]] > H[B[i]]) X[B[i]] = 0;
        if (H[A[i]] < H[B[i]]) X[A[i]] = 0;
        else {
            X[A[i]]=0;
            X[B[i]]=0;
    }
    
    int ans = 0;
    for (int i = 1; i <= N; ++i){
        ans += X[i];
    }
    cout << ans << endl;
    return 0;
}


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

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

int main(){
  int n, m, h[100010], a, b, ans=0;
  vector<int> v[100010];
  cin >> n >> m;
  for(int i=0;i<n;i++)cin >> h[i+1];
  for(int i=0;i<m;i++){
    cin >> a >> b;
    v[a].push_back(b);
    v[b].push_back(a);
  }
  for(int i=1;i<=n;i++){
    bool f=true;
    for(int j=0;j<v[i].size();j++){
      if(h[i]<=h[v[i][j]]){
        f=false;
        break;
      }
    }
    if(f)ans++;
  }
  cout << ans << endl;
  return 0;
}


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