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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:4:23: error: 'll' was not declared in this scope
    4 | #define rep(i,n) for (ll i = 0; i < (ll)(n); ++i)
      |                       ^~
a.cc:10:9: note: in expansion of macro 'rep'
   10 |         rep(i,n) {
      |         ^~~
a.cc:10:13: error: 'i' was not declared in this scope
   10 |         rep(i,n) {
      |             ^
a.cc:4:33: note: in definition of macro 'rep'
    4 | #define rep(i,n) for (ll i = 0; i < (ll)(n); ++i)
      |                                 ^
a.cc:4:23: error: 'll' was not declared in this scope
    4 | #define rep(i,n) for (ll i = 0; i < (ll)(n); ++i)
      |                       ^~
a.cc:14:9: note: in expansion of macro 'rep'
   14 |         rep(i,m) {
      |         ^~~
a.cc:14:13: error: 'i' was not declared in this scope
   14 |         rep(i,m) {
      |             ^
a.cc:4:33: note: in definition of macro 'rep'
    4 | #define rep(i,n) for (ll i = 0; i < (ll)(n); ++i)
      |                                 ^
a.cc:4:23: error: 'll' was not declared in this scope
    4 | #define rep(i,n) for (ll i = 0; i < (ll)(n); ++i)
      |                       ^~
a.cc:20:9: note: in expansion of macro 'rep'
   20 |         rep(i,n) {
      |         ^~~
a.cc:20:13: error: 'i' was not declared in this scope
   20 |         rep(i,n) {
      |             ^
a.cc:4:33: note: in definition of macro 'rep'
    4 | #define rep(i,n) for (ll i = 0; i < (ll)(n); ++i)
      |                                 ^
Language: C++

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

int main(){
    int N, M, ans = 0;
    cin >> N >> M;
    // 標高保持 H , MAiはその展望台から行ける展望台の標高の最大値を保持する
    vector<int> H(N, 0), MA(N, 0);
    // 標高を格納
    for(int i = 0; i < N; i++){
        cin >> H[i];
    }
    // A, B を受け取り、標高の最大値MAを更新する
    for(int i = 0; i < M; i++){
        int A, B;
        cin >> a >> b;
        // A側、B側それぞれお互いの標高が高ければ自分自身を更新する
        MA[A] = max(MA[A], H[B]);
        MA[B] = max(MA[B], H[A]);
    }

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

    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: 'vector' was not declared in this scope
    9 |     vector<int> H(N, 0), MA(N, 0);
      |     ^~~~~~
a.cc:3:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    2 | #include<algorithm>
  +++ |+#include <vector>
    3 | using namespace std;
a.cc:9:12: error: expected primary-expression before 'int'
    9 |     vector<int> H(N, 0), MA(N, 0);
      |            ^~~
a.cc:12:16: error: 'H' was not declared in this scope
   12 |         cin >> H[i];
      |                ^
a.cc:17:16: error: 'a' was not declared in this scope
   17 |         cin >> a >> b;
      |                ^
a.cc:17:21: error: 'b' was not declared in this scope
   17 |         cin >> a >> b;
      |                     ^
a.cc:19:9: error: 'MA' was not declared in this scope; did you mean 'A'?
   19 |         MA[A] = max(MA[A], H[B]);
      |         ^~
      |         A
a.cc:19:28: error: 'H' was not declared in this scope
   19 |         MA[A] = max(MA[A], H[B]);
      |                            ^
a.cc:24:16: error: 'H' was not declared in this scope
   24 |         ans += H[i] > MA[i];
      |                ^
a.cc:24:23: error: 'MA' was not declared in this scope; did you mean 'M'?
   24 |         ans += H[i] > MA[i];
      |                       ^~
      |                       M
Language: C++

#include <iostream>
#include <string>
#include <cmath>
#include <vector>
#include <map>
#include <algorithm>
#include <stdio.h>

int main(void)
{
  int n,m;
  bool fin=false;
  std::cout << ab.max_size();
  std::cin >> n >> m;
  std::vector<int> h(n);
  std::vector <std::vector<int>> ab(m, std::vector<int>(2));
  
  for(int i=0;i<n;i++){
    std::cin >> h[i];
  }
  for(int i=0;i<m;i++){
    std::cin >> ab[i][0];
    std::cin >> ab[i][1];
  }

  for(int i=0;i<m;i++){
    if(ab[i][0]<ab[i][1]){
      std::swap(ab[i][0],ab[i][1]);
    }
  }
  sort(ab.begin(),ab.end());
  
  int s=0,i=0;
  while(1){
    fin = false;
    if(h[ab[i][0]]<h[ab[i][1]]){
      while(1){
        if(ab[i][0]==ab[i+1][0]){
          i++;
        }else{
          i++;
          fin = true;
          break;
        }
      }
      continue;
    }
    if(ab[i][0]!=ab[i+1][0]){
      s++;
      i++;
    }
    if(i>=n){
      break;
    }
  }

  std::cout << s;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:16: error: 'ab' was not declared in this scope; did you mean 'abs'?
   13 |   std::cout << ab.max_size();
      |                ^~
      |                abs
a.cc:31:3: error: 'sort' was not declared in this scope; did you mean 'std::sort'?
   31 |   sort(ab.begin(),ab.end());
      |   ^~~~
      |   std::sort
In file included from /usr/include/c++/14/algorithm:86,
                 from a.cc:6:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: 'std::sort' declared here
  296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last);
      | ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
 int N, M;
  cin >> N >> M;
  vector<int> H(N);
  for (int i = 0; i < N; i++) {
    cin >> H.at(i);
  }
  vector<vector<int>> A(M, vector<int>(2));
  for (int i = 0; i < M; i++) {
    for (int j = 0; j < 2; j++) {
    cin >> A.at(i).at(j);
    }  
  }
  vector<vector<int>> A2(M, vector<int>(2));
  for (int i = 0; i < M; i++) {
    A2.at(i).at(0) = A.at(i).at(1);
    A2.at(i).at(1) = A.at(i).at(0);   
  }
  int count = 0;
  for (int i = 0; i < N; i++) {
    bool ans = true;
    for (int j = 0; j < M; j++) {
      if (A.at(j).at(0) == i + 1) { 
        if (H.at(A.at(j).at(0) - 1) =< H.at(A.at(j).at(1) - 1)) {
          ans = false;
          break;
        }
      }
    }
    for (int j = 0; j < M; j++) {
      if (A2.at(j).at(0) == i + 1) {
        if (H.at(A2.at(j).at(0) - 1) =< H.at(A.at(j).at(1) - 1)) {
          ans = false;
          break;
        }
      }
    } 
    cout << ans << endl;
    if (ans == true) {
      count++;
    }    
  }
  cout << count << endl;
}
          

Compiler output:
a.cc: In function 'int main()':
a.cc:27:38: error: expected primary-expression before '<' token
   27 |         if (H.at(A.at(j).at(0) - 1) =< H.at(A.at(j).at(1) - 1)) {
      |                                      ^
a.cc:35:39: error: expected primary-expression before '<' token
   35 |         if (H.at(A2.at(j).at(0) - 1) =< H.at(A.at(j).at(1) - 1)) {
      |                                       ^
Language: C++

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

int main(void){
 	int n, m, h[100001], ma[100001];
	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]);
    }
  	for(int i=1; i<=n; i++){ 
        ans += h[i] > ma[i];
    }
  	cout << ans << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   22 |         ans += h[i] > ma[i];
      |         ^~~
      |         abs
a.cc:24:17: error: 'ans' was not declared in this scope; did you mean 'abs'?
   24 |         cout << ans << endl;
      |                 ^~~
      |                 abs
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:15:13: error: 'i' was not declared in this scope
   15 |         for(i=0; i<m; i++){
      |             ^
a.cc:21:13: error: 'i' was not declared in this scope
   21 |         for(i=1; i<=n; i++){
      |             ^
a.cc:22:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   22 |         ans += h[i] > ma[i];
      |         ^~~
      |         abs
a.cc:24:17: error: 'ans' was not declared in this scope; did you mean 'abs'?
   24 |         cout << ans << endl;
      |                 ^~~
      |                 abs
Language: C++

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

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>A(M+1);
  vector<int>B(M+1);
  for(int i=1;i<=M;i++){
    cin >> A[i] >> B[i];
  }
  int ans=0;
  bool C=true;
  vector<int> wrong(N);
  for(int i=1;i<=N;i++){
    C=true;
    for(int j=1;j<=M;j++){
      if(i==wrong[j]){
        C=false;
        break;
      }
    }
    if(C==false){
      continue;
    }
    for(int j=1;j<=M;j++){
      if(A[j]==i){
        if(H[A[j]]<=H[B[j]]){
          C=false;
          break;
        }
        wrong[i]=B[j];
      }
      else if(B[j]==i){
        if(H[A[j]]>=H[B[j]]){
          C=false;
          break;
        }
        wrong=A[j];
      }
    }
    if(C==false){
      continue;
    }
    ans++;
  }
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:43:18: error: no match for 'operator=' (operand types are 'std::vector<int>' and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'})
   43 |         wrong=A[j];
      |                  ^
In file included from /usr/include/c++/14/vector:72,
                 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/vector.tcc:210:5: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = int; _Alloc = std::allocator<int>]'
  210 |     vector<_Tp, _Alloc>::
      |     ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/vector.tcc:211:42: note:   no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'} to 'const std::vector<int>&'
  211 |     operator=(const vector<_Tp, _Alloc>& __x)
      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
In file included from /usr/include/c++/14/vector:66:
/usr/include/c++/14/bits/stl_vector.h:766:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = int; _Alloc = std::allocator<int>]'
  766 |       operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:766:26: note:   no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'} to 'std::vector<int>&&'
  766 |       operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
      |                 ~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:788:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = int; _Alloc = std::allocator<int>]'
  788 |       operator=(initializer_list<value_type> __l)
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:788:46: note:   no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'} to 'std::initializer_list<int>'
  788 |       operator=(initializer_list<value_type> __l)
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N,M;
  int F=0;
  cin>>N>>M;
  vector<long long>vec(N);
  vector<bool>ve(N,true);
  vector<vector<int>> v(M, vector<int>(2));
  for(int X=0;X<N;X++){
    cin>>vec.at(X);
  }
  for(int X=0;X<M;X++){
    for(int Y=0;Y<2;Y++){
      cin>>v.at(X).at(Y);
    }
  }
  for(int X=0;X<M;X++){
    if(vec.at(v.at(X).at(0)-1)>=vec.at(v.at(X).at(1)-1)){
      ve.at(X).at(1)=false;
    }
    if(vec.at(v.at(X).at(0)-1)<=vec.at(v.at(X).at(1)-1)){
      ve.at(X).at(0)=false;
    }
  }
  for(int X=0;X<N;X++){
    if(ve.at(X)==true){
      F++;
    }
  }
  cout<<F<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:16: error: 'std::vector<bool>::reference' has no member named 'at'
   21 |       ve.at(X).at(1)=false;
      |                ^~
a.cc:24:16: error: 'std::vector<bool>::reference' has no member named 'at'
   24 |       ve.at(X).at(0)=false;
      |                ^~
Language: Java

import java.util.Scanner;
     
    public class Main {
     
    	public static void main(String[] args) {
    		Scanner sc = new Scanner(System.in);
    		int n = sc.nextInt();
    		int m = sc.nextInt();
    		int[] h = new int[n];
    		int[] m = new int[n];
    		for (int i = 0; i < n; i++) {
    			h[i] = sc.nextInt();
    			
    		}
    		int cnt = 0;
    		for (int i = 0; i < m; i++) {
    			int a = sc.nextInt();
    			int b = sc.nextInt();
    			m[a - 1] = Math.max(m[a - 1], h[b - 1]);
    			m[b - 1] = Math.max(m[b - 1], h[a - 1]);
    		}
    		for (int i = 0; i < n; i++) {
    			if (h[i] > m[i]) {
    				cnt++;
    			}
    		}
    		
    		System.out.println(cnt);
    	}
     
    }

Compiler output:
Main.java:10: error: variable m is already defined in method main(String[])
    		int[] m = new int[n];
    		      ^
Main.java:16: error: bad operand types for binary operator '<'
    		for (int i = 0; i < m; i++) {
    		                  ^
  first type:  int
  second type: int[]
2 errors
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  vector<int> adj[100005];
  int n,m;
  cin>>n>>m;
  
}
int h[n+1];
for(int i=1;i<=n;i++)
  cin>>h[i];

int a,b;
while(m--)
{
  cin>>a>>b;
  adj[a].push_back(b);
  adj[b].push_back(a);
                   
  
  
}
int z;
bool flag;
for(int i=1;i<=n;i++)
{
  flag=true;
  z=h[i];
  if(adj[i].empty())
    count++;
  else 
  {
    for(int j:adj[i])
    {
      if(h[j]>=z)
      {
        flag=false;
        break;
        
      }
    }
      
      
      
    }
    if(flag)
      count++;
    
    
  }
  cout<<count<<endl;
  
}


Compiler output:
a.cc:10:7: error: 'n' was not declared in this scope; did you mean 'yn'?
   10 | int h[n+1];
      |       ^
      |       yn
a.cc:11:1: error: expected unqualified-id before 'for'
   11 | for(int i=1;i<=n;i++)
      | ^~~
a.cc:11:13: error: 'i' does not name a type
   11 | for(int i=1;i<=n;i++)
      |             ^
a.cc:11:18: error: 'i' does not name a type
   11 | for(int i=1;i<=n;i++)
      |                  ^
a.cc:15:1: error: expected unqualified-id before 'while'
   15 | while(m--)
      | ^~~~~
a.cc:26:1: error: expected unqualified-id before 'for'
   26 | for(int i=1;i<=n;i++)
      | ^~~
a.cc:26:13: error: 'i' does not name a type
   26 | for(int i=1;i<=n;i++)
      |             ^
a.cc:26:18: error: 'i' does not name a type
   26 | for(int i=1;i<=n;i++)
      |                  ^
a.cc:52:3: error: 'cout' does not name a type
   52 |   cout<<count<<endl;
      |   ^~~~
a.cc:54:1: error: expected declaration before '}' token
   54 | }
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  vector<int> adj[100005];
  int n,m;
  cin>>n>>m;
  
}
int h[n+1];
for(int i=1;i<=n;i++)
  cin>>h[i];

int a,b;
while(m--)
{
  cin>>a>>b;
  adj[a].push_back(b);
                   
  
  
}
int z;
bool flag;
for(int i=1;i<=n;i++)
{
  flag=true;
  z=h[i];
  if(adj[i].empty())
    count++;
  else 
  {
    for(int j:adj[i])
    {
      if(h[j]>=z)
      {
        flag=false;
        break;
        
      }
    }
      
      
      
    }
    if(flag)
      count++;
    
    
  }
  cout<<count<<endl;
  
}

Compiler output:
a.cc:10:7: error: 'n' was not declared in this scope; did you mean 'yn'?
   10 | int h[n+1];
      |       ^
      |       yn
a.cc:11:1: error: expected unqualified-id before 'for'
   11 | for(int i=1;i<=n;i++)
      | ^~~
a.cc:11:13: error: 'i' does not name a type
   11 | for(int i=1;i<=n;i++)
      |             ^
a.cc:11:18: error: 'i' does not name a type
   11 | for(int i=1;i<=n;i++)
      |                  ^
a.cc:15:1: error: expected unqualified-id before 'while'
   15 | while(m--)
      | ^~~~~
a.cc:25:1: error: expected unqualified-id before 'for'
   25 | for(int i=1;i<=n;i++)
      | ^~~
a.cc:25:13: error: 'i' does not name a type
   25 | for(int i=1;i<=n;i++)
      |             ^
a.cc:25:18: error: 'i' does not name a type
   25 | for(int i=1;i<=n;i++)
      |                  ^
a.cc:51:3: error: 'cout' does not name a type
   51 |   cout<<count<<endl;
      |   ^~~~
a.cc:53:1: error: expected declaration before '}' token
   53 | }
      | ^
Language: C++

#include<iostream>
#include<vector>

using namespace std;

int main(void)
{
    int N, M;
    vector<int> H(N);
    cin >> N >> M;
    for(int i = 0; i < N; ++i){
        cin >> H[i];
    }

    vector<int> good(N, 1);
    for (int i = 0; i < M; ++i){
      	int A, B;
        cin >> A >> B;
        if(H[A-1]>H[B-1]){
            good[B-1] = 0;
        }
        else if (H[A-1]<H[B-1]){
            good[A-1] = 0;
        }
      	else{
          good[A-1] = 0;
          good[B-1] = 0;
        }
    }
    cout << count(good.begin(), good.end(), 1) << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:13: error: 'count' was not declared in this scope
   30 |     cout << count(good.begin(), good.end(), 1) << endl;
      |             ^~~~~
Language: C++

#include <bits/stdc++.h>
#define lli long long int 
#define N 2e5 + 5
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
using namespace std;

int n,m;

int main(){
	IOS;
cin>>n>>m;
vector<int> h(n);
vector< vector <int> > adj(n);
for(int i=0;i<n;i++)
{
	int a;
	cin>>a;
	h.push_back(a);
}
for(int i=0;i<m;i++)
{
	int a,b;
	cin>>a>>b;
	adj[a].push_back(b);
	adj[b].push_back(a);
}
int ans=0;
for(int i=0;i<n;i++){
	int c=0;
	for(auto &j:adj[i]){
		if(h[j]>=h[i]){
		c++;
			
		}
		
	}
	and+=(c==0);
}


cout<<ans<<endl;
}
	


Compiler output:
a.cc: In function 'int main()':
a.cc:37:12: error: expected identifier before '+=' token
   37 |         and+=(c==0);
      |            ^~
Language: C++

#include <bits/stdc++.h>
#define lli long long int 
#define N 2e5 + 5
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
using namespace std;

int n,m;

int main(){
	IOS;
cin>>n>>m;
vector<int> h(n);
vector< vector <int> > adj(n);
for(int i=0;i<n;i++)
{
	int a;
	cin>>a;
	h.push_back(a);
}
for(int i=0;i<m;i++)
{
	int a,b;
	cin>>a>>b;
	adj[a].push_back(b);
	adj[b].push_back(a);
}
int c=0;
for(int i=0;i<n;i++){
	int flag=1;
	for(auto j:adj[i]){
		if(h[j]>h[i]){
			flag=0;
			break;
		}
		
	}
	if(flag)
	c++;
}


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

include<bits/stdc++.h>
using namespace std ;
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> g[n+1] ;
  for (int i = 1 ; i <= m ; ++i) {
    int u , v ;
    cin >> u >> v ;
    g[u].push_back(v) ;
    g[v].push_back(u) ;
  }
  int cnt = 0 ;
  for (int i = 1 ; i <= n ; ++i) {
    if (h[i] > *max_element(g[i].begin() , g[i].end())) {
      ++cnt ;
    }
  }
  cout << cnt ;
  return 0 ;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin >> n >> m ;
      |   ^~~
a.cc:6:3: error: 'vector' was not declared in this scope
    6 |   vector<int> h(n+1) ;
      |   ^~~~~~
a.cc:6:10: error: expected primary-expression before 'int'
    6 |   vector<int> h(n+1) ;
      |          ^~~
a.cc:8:12: error: 'h' was not declared in this scope
    8 |     cin >> h[i] ;
      |            ^
a.cc:10:10: error: expected primary-expression before 'int'
   10 |   vector<int> g[n+1] ;
      |          ^~~
a.cc:14:5: error: 'g' was not declared in this scope
   14 |     g[u].push_back(v) ;
      |     ^
a.cc:19:9: error: 'h' was not declared in this scope
   19 |     if (h[i] > *max_element(g[i].begin() , g[i].end())) {
      |         ^
a.cc:19:29: error: 'g' was not declared in this scope
   19 |     if (h[i] > *max_element(g[i].begin() , g[i].end())) {
      |                             ^
a.cc:19:17: error: 'max_element' was not declared in this scope
   19 |     if (h[i] > *max_element(g[i].begin() , g[i].end())) {
      |                 ^~~~~~~~~~~
a.cc:23:3: error: 'cout' was not declared in this scope
   23 |   cout << cnt ;
      |   ^~~~
Language: C++

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

bool checked[100010]={false};
int h[100010],a[100010], b[100010];
int ans=0;

bool highest(int i,int m){
  checked[i]=true;
  int max=h[i];
  
  rep(j,m){
    if(a[j]==i+1 && checked[b[j]-1]==fasle){
      if(max<=h[b[j]-1]){
	return false;
      }else checked[b[j]-1]=true;
    }else if(b[j]==i+1 && checked[a[j]-1]==false){
      if(max<=h[a[j]-1]){
	return false;
      }else checked[a[j]-1]=true;
    }
  }
  return true;
}
  
int main(){
  int n,m;
  cin >> n >> m;
  rep(i,n)cin >> h[i];
  rep(j,m)cin >> a[j] >> b[j];

  rep(i,n){
    if(checked[i]==false){
      if(highest(i,m))ans++;
    }
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'bool highest(int, int)':
a.cc:14:38: error: 'fasle' was not declared in this scope
   14 |     if(a[j]==i+1 && checked[b[j]-1]==fasle){
      |                                      ^~~~~
Language: C++

#include<bits/stdc++.h>
#define ll long long
#define ull unsigned long long
#define mod 1000000007
using namespace std;
ll binpow(ll x,ll y)/* (x^y)%p in O(log y) */{ll res=1;while (y > 0){if(y&1)res=(res*x);y = y>>1;x=(x*x);}return res;}
ll binpowmod(ll x,ll y,ll p)/* (x^y)%p in O(log y) */{ll res=1;x=x%p;while (y > 0){if(y&1)res=(res*x)%p;y = y>>1;x=(x*x)%p;}return res;}
ll mod_inverse(ll n,ll p)/* Returns n^(-1) mod p */{return binpowmod(n,p-2,p);}
ull gcd(ull x,ull y)
{
    if(y==0)
        return x;
    return gcd(y,x%y);
}
bool comp(pair<ll,ll> x,pair<ll,ll> y)
{
    if(x.first<y.second)
        return true;
    else if(x.first==y.second)
        return x.second<y.second;
    else
        return false;
}
bool comp_pairs_by_s(pair<ll,ll> &x ,pair<ll,ll> &y)
{
    return x.second<y.second;
}
bool isPowerOfTwo (ll x)  
{  
    /* First x in the below expression is for the case when x is 0 */
    return x && (!(x&(x-1)));  
}

class cmp      //comparator for priority_queue 
{               //declaration: priority_queue<int,vector<int>,cmp>
public:         
    bool operator()(pair<int,int> A,pair<int,int> B)
    {
        if(abs(A.first-A.second)==abs(B.first-B.second))
            return A.first>B.first;
        return abs(A.first-A.second)<abs(B.first-B.second);
    }
};
// int prime[100005]={0};
// void sieve(void)
// {
//  int i,j;
//  for(i=0;i<100005;i++)
//         prime[i]=1;
//  prime[0]=0,prime[1]=0;
//  for(i=2;i<=sqrt(100005);i++){
//      if(prime[i]){
//          for(j=i*i;j<100005;j+=i){
//              prime[j]=0;
//          }
//      }
//  }
    
// }
void swap(int &x,int &y){
    int temp=x;
    x=y;
    y=temp;
}
vector<int> g[100001];
int vis[100001];
vector<int> ans(100001,1);

void dfs(int node,vector<int> h)
{
    vis[node]=1;
    for(int to: g[node])
    {
        if(vis[to])
            if(h[node]<=h[to])
                ans[node]=0;
        else
        {
            if(h[node]<=h[to])
                ans[node]=0;
            dfs(to,h);
        }
    }
}

void solve()
{   
    int n,m;
    cin>>n>>m;
    vector<ll> h(n+1);
    for(int i=1;i<=n;i++)
        cin>>h[i];
    for(int i=0;i<m;i++){
        int x,y;
        cin>>x>>y;
        g[x].push_back(y);
        g[y].push_back(x);
    }
    for(int i=1;i<=n;i++){
        if(!vis[i])
            dfs(i,h);
    }
    int cnt=0;
    for(int i=1;i<=n;i++)
        if(ans[i])
            cnt++;
    cout<<cnt;
    
}
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    solve();
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:101:19: error: could not convert 'h' from 'vector<long long int>' to 'vector<int>'
  101 |             dfs(i,h);
      |                   ^
      |                   |
      |                   vector<long long int>
Language: Java

import java.util.Scanner;

public class Main2 {

    public static void main(String args []) {

        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        int m = sc.nextInt();
        int h[] = new int[n];
        int ma[] = new int[n];

        for (int i = 1; i<=n; i++ ) {
            h[i] = sc.nextInt();
            ma[i] = 0;
        }

        for (int j= 1; j <= m; j++ ) {
            int a, b;
            a = sc.nextInt();
            b = sc.nextInt();
            ma[a] = Math.max(ma[a], h[b]);
            ma[b] = Math.max(ma[b], h[a]);
        }

        int count = 0;

        for (int k= 1; k<=n; k++ ) {
            if (h[k] > ma[k]) {
                count++;
            }
        }
        System.out.println(count);

    }
}


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

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

int main(){
  int n,m; cin >> n >> m;
  int ans=n;
  vector<int> data1(n);
  for(int i=0; i<n; i++) cin >> data1.at(i);
  vector<int> data2(m),data3(m);
  for(int i=0; i<m; i++) cin >> data2.at(i) >> data3.at(i);
  //入力
  for(int i=1; i<=n; i++){
      int height = data1.at(i-1);
      for(int j=0; j<m; j++){
          if(data2.at(j)=i && data1(data3.at(j)-1)>hegiht){
              ans -= 1; break;
          }
          if(data3.at(j)=i && data1(data2.at(j)-1)>hegiht){
              ans -= 1; break;
          }
      }
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:36: error: no match for call to '(std::vector<int>) (__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type)'
   15 |           if(data2.at(j)=i && data1(data3.at(j)-1)>hegiht){
      |                               ~~~~~^~~~~~~~~~~~~~~
a.cc:15:52: error: 'hegiht' was not declared in this scope; did you mean 'height'?
   15 |           if(data2.at(j)=i && data1(data3.at(j)-1)>hegiht){
      |                                                    ^~~~~~
      |                                                    height
a.cc:18:36: error: no match for call to '(std::vector<int>) (__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type)'
   18 |           if(data3.at(j)=i && data1(data2.at(j)-1)>hegiht){
      |                               ~~~~~^~~~~~~~~~~~~~~
a.cc:18:52: error: 'hegiht' was not declared in this scope; did you mean 'height'?
   18 |           if(data3.at(j)=i && data1(data2.at(j)-1)>hegiht){
      |                                                    ^~~~~~
      |                                                    height
Language: C++

#include <bits/stdc++.h>
using namespace std;
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> ma(n+1);
	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 res = 0;
	for (int i = 1; i <= N; ++i){
		res += h[i] > ma[i];
	}
	cout<<res<<endl;
	return 0; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:30: error: 'N' was not declared in this scope
   18 |         for (int i = 1; i <= N; ++i){
      |                              ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
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> ma(n+1);
	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 res = 0;
	for (int i = 1; i <= N; ++i){
		res += h[i] > ma[i];
	}
	cout<<res<<endl;
	return 0; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:40: error: expected ';' before 'ma'
   14 |                 ma[a] = max(ma[a],h[b])
      |                                        ^
      |                                        ;
   15 |                 ma[b] = max(ma[b],h[a]);
      |                 ~~                      
a.cc:18:30: error: 'N' was not declared in this scope
   18 |         for (int i = 1; i <= N; ++i){
      |                              ^
Language: C++

#include "iostream"
using namespace std;
int main()
{
    int n,m;
    cin>>n>>m;
    bool good[n+1];
    memset(good, false, sizeof(bool));
    int h[n+1];
    for(int i=1;i<=n;i++)
    {
        cin>>h[i];
    }
    
    int x,y;
    int count=0;
    for(int i=0;i<m;i++)
    {
        cin>>x>>y;
        
        if(h[x]>h[y])
        {
            good[x]=true;
        }
        else
            if(h[y]>h[x])
            {
                good[y]=true;
            }
        
        
    }
    
    
    for(int i=1;i<=n;i++)
    {
        if(good[i]==true) count++;
    }
    
    
    cout<<count<<endl;
}


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

#include  <bits/stdc++.h>
using namespace std;
int main()
{
   int n,m;
   cin>>n>>m;
   int h[n],ma[n]
   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: In function 'int main()':
a.cc:8:4: error: expected initializer before 'for'
    8 |    for(int i=1;i<=n;i++)
      |    ^~~
a.cc:8:16: error: 'i' was not declared in this scope
    8 |    for(int i=1;i<=n;i++)
      |                ^
a.cc:18:11: error: 'ma' was not declared in this scope; did you mean 'a'?
   18 |           ma[a]=max(ma[a],h[b]);
      |           ^~
      |           a
a.cc:25:19: error: 'ma' was not declared in this scope; did you mean 'm'?
   25 |       ans += h[i]>ma[i];
      |                   ^~
      |                   m
Language: C++

#include  <bits/stdc++.h>
using namespace std;
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: In function 'int main()':
a.cc:5:14: error: 'N' was not declared in this scope
    5 |    int n,m,h[N],ma[N];
      |              ^
a.cc:10:12: error: 'h' was not declared in this scope
   10 |       cin>>h[i];
      |            ^
a.cc:11:11: error: 'ma' was not declared in this scope; did you mean 'm'?
   11 |           ma[i]=0;
      |           ^~
      |           m
a.cc:18:11: error: 'ma' was not declared in this scope; did you mean 'a'?
   18 |           ma[a]=max(ma[a],h[b]);
      |           ^~
      |           a
a.cc:18:27: error: 'h' was not declared in this scope
   18 |           ma[a]=max(ma[a],h[b]);
      |                           ^
a.cc:25:14: error: 'h' was not declared in this scope
   25 |       ans += h[i]>ma[i];
      |              ^
a.cc:25:19: error: 'ma' was not declared in this scope; did you mean 'm'?
   25 |       ans += h[i]>ma[i];
      |                   ^~
      |                   m
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
	int n,m,i,x,y,a=0,e;
	cin>>n>>m;
	int h[n];
	for(i=0;i<n;i++)cin>>h[i];
	vector<int>z[n];
	for(i=0;i<m;i++)
	{
		cin>>x>>y;
		z[--x].push_back(--y);
		z[y].push_back(x);
	}
	for(i=0;i<n;i++)
	{
		if(z[i].size()==0)
		{
			a++;
			continue;
		}
		bool g=true;
		for(e:z[i])
			g&=h[i]>h[e];
		if(g)a++;
	}
	cout<<a;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:22: error: found ':' in nested-name-specifier, expected '::'
   24 |                 for(e:z[i])
      |                      ^
      |                      ::
a.cc:24:21: error: 'e' is not a class, namespace, or enumeration
   24 |                 for(e:z[i])
      |                     ^
a.cc:26:17: error: expected primary-expression before 'if'
   26 |                 if(g)a++;
      |                 ^~
a.cc:25:38: error: expected ';' before 'if'
   25 |                         g&=h[i]>h[e];
      |                                      ^
      |                                      ;
   26 |                 if(g)a++;
      |                 ~~                    
a.cc:26:17: error: expected primary-expression before 'if'
   26 |                 if(g)a++;
      |                 ^~
a.cc:25:38: error: expected ')' before 'if'
   25 |                         g&=h[i]>h[e];
      |                                      ^
      |                                      )
   26 |                 if(g)a++;
      |                 ~~                    
a.cc:24:20: note: to match this '('
   24 |                 for(e:z[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;  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:1:22: warning: extra tokens at end of #include directive
    1 |  #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];  } cout<<ans<<endl;  }
      |                      ^
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

1 #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:1:3: error: stray '#' in program
    1 | 1 #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 }
      |   ^
a.cc:1:24: error: stray '#' in program
    1 | 1 #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 }
      |                        ^
a.cc:1:69: error: stray '#' in program
    1 | 1 #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 }
      |                                                                     ^
a.cc:1:1: error: expected unqualified-id before numeric constant
    1 | 1 #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 }
      | ^
a.cc:1:67: error: expected unqualified-id before numeric constant
    1 | 1 #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 }
      |                                                                   ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
typedef long long ll;
#define _GLIBCXX_DEBUG
typedef vector<int> vec;
typedef vector<ll> lvec;
typedef vector<char>cvec;
typedef pair<ll, ll> LP;
typedef tuple<ll, ll, ll> LT;
typedef pair<int, int> P;
typedef tuple<int, int, int> T;
int main()	{
  int n,m;
  cin>>n>>m;
  vector<int>h(n),d(n),a(m),b(m);
  rep(i,n) {
    cin>>h[i];
    d[i]++;
  }
  rep(i,m){
    cin>>a[i]>>b[i];
    a[i]--;
    b[i]--;
    if(h[a[i]]<h[b[i]])
      d[a[i]]=0;
    else if(h[a[i]>h[b[i]])
      d[b[i]]=0;
    else{
      d[a[i]]=0;d[b[i]]=0;
    }
  }
  int ans=0;
  rep(i,n){
    if(d[i])
      ans++;
  }
  cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:27: error: expected ']' before ')' token
   29 |     else if(h[a[i]>h[b[i]])
      |                           ^
      |                           ]
Language: C++

#include<iostream>
#include<vector>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++);
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:10:16: error: macro "rep" passed 3 arguments, but takes just 2
   10 |     rep(i, 0, N) cin >> H[i];
      |                ^
a.cc:4:9: note: macro "rep" defined here
    4 | #define rep(i,n) for(int i=0;i<n;i++);
      |         ^~~
a.cc:11:16: error: macro "rep" passed 3 arguments, but takes just 2
   11 |     rep(i, 0, M) {
      |                ^
a.cc:4:9: note: macro "rep" defined here
    4 | #define rep(i,n) for(int i=0;i<n;i++);
      |         ^~~
a.cc:19:17: error: macro "rep" passed 3 arguments, but takes just 2
   19 |     rep(cu, 0, N) {
      |                 ^
a.cc:4:9: note: macro "rep" defined here
    4 | #define rep(i,n) for(int i=0;i<n;i++);
      |         ^~~
a.cc: In function 'void _main()':
a.cc:10:5: error: 'rep' was not declared in this scope
   10 |     rep(i, 0, N) cin >> H[i];
      |     ^~~
a.cc:11:8: error: expected ';' before '{' token
   11 |     rep(i, 0, M) {
      |        ^         ~
      |        ;
a.cc:19:8: error: expected ';' before '{' token
   19 |     rep(cu, 0, N) {
      |        ^          ~
      |        ;
Language: C++

#include<iostream>
#include<vector>
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:10:9: error: 'i' was not declared in this scope
   10 |     rep(i, 0, N) cin >> H[i];
      |         ^
a.cc:10:5: error: 'rep' was not declared in this scope
   10 |     rep(i, 0, N) cin >> H[i];
      |     ^~~
a.cc:19:9: error: 'cu' was not declared in this scope
   19 |     rep(cu, 0, N) {
      |         ^~
Language: Java

ort java.util.*;

public class Main {
    public static void main(String[] args) {
        //コード
        Scanner scanner = new Scanner(System.in);
        Integer N = Integer.parseInt(scanner.next());
        Integer M = Integer.parseInt(scanner.next());
        Map<Integer, Integer> H = new HashMap<Integer, Integer>();


        for (int i = 0; i < N; i++) {
            H.put(i, Integer.parseInt(scanner.next()));
        }

        boolean[] I = new boolean[N];
        boolean[] C = new boolean[N];
        Arrays.fill(I, true);
        for (int i = 0; i < M; i++) {
            Integer A1 = Integer.parseInt(scanner.next())-1;
            Integer A2 = Integer.parseInt(scanner.next())-1;
            if(H.get(A1) > H.get(A2)) I[A2] = false;
            if(H.get(A2) > H.get(A1)) I[A1] = false;
            if(H.get(A2) == H.get(A1)) {
                I[A1] = false;
                I[A2] = false;
            }
        }

        Integer count = 0;
        for (boolean i : I) if (i) count += 1;
        System.out.println(count);
    }
}


Compiler output:
Main.java:1: error: class, interface, enum, or record expected
ort java.util.*;
^
1 error
Language: Java


import java.util.*;
import java.util.stream.Stream;

public class Main2 {
    public static void main(String[] args) {
        //コード
        Scanner scanner = new Scanner(System.in);
        Integer N = Integer.parseInt(scanner.next());
        Integer M = Integer.parseInt(scanner.next());
        Map<Integer, Integer> H = new HashMap<Integer, Integer>();


        for (int i = 0; i < N; i++) {
            H.put(i, Integer.parseInt(scanner.next()));
        }

        Integer[] I = new Integer[N];
        boolean[] C = new boolean[N];
        Arrays.fill(I, 0);
        //Arrays.fill(C, false);
        for (int i = 0; i < M; i++) {
            Integer A1 = Integer.parseInt(scanner.next())-1;
            Integer A2 = Integer.parseInt(scanner.next())-1;
            if(H.get(A1) > H.get(A2)) I[A1] += 1;
            if(H.get(A2) > H.get(A1)) I[A2] += 1;
            //C[A1] = true; C[A2] = true;
        }

        //for (int i = 0; i < N; i++) if(!C[i]) I[i] += 1;

        System.out.println(Stream.of(I).mapToInt(Integer::intValue).sum());
    }
}

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

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  int n, m, h[200010], ma[200010];
  cin >> n >> m;
  for(int i=1; i<=n; i++) {
    ll height;
    cin >> takasa;
    h[i] = takasa;
    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++) {
    if (h[i] > ma[i]) {
      ans++;
    }
  }
  cout<<ans<<endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:9:12: error: 'takasa' was not declared in this scope
    9 |     cin >> takasa;
      |            ^~~~~~
Language: C

#include <iostream>
#include <string>
#include <array>
#include <cmath>
#include <algorithm>
#include <iomanip>
#include <vector>
#include <queue>

using namespace std;

struct edge
{
	long long to;
};

int main(void)
{
	cin.tie(0);
	ios::sync_with_stdio(false);
	long long N, M;
	cin >> N >> M;
	vector<long long> tower(N);
	vector<edge> graph[N];
	long long a, b;
	for (long long i = 0; i < N; i++)
	{
		cin >> tower[i];
	}
	for (long long i = 0; i < M; i++)
	{
		cin >> a >> b;
		edge e1 = {b - 1};
		edge e2 = {a - 1};
		graph[a - 1].push_back(e1);
		graph[b - 1].push_back(e2);
	}
	long long count, result;
	result = 0;
	for (long long i = 0; i < N; i++)
	{
		count = 0;
		for (long long j = 0; j < graph[i].size(); j++)
		{
			if (tower[i] > tower[graph[i][j].to])
				count++;
		}
		if (count == graph[i].size())
			result++;
	}
	cout << result;
	return 0;
}


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;
#define rep(i,n) for(int i=0;i<(n);i++)
int N, M;
vector<int> to[];
vector<int> H(N);

int main()
{
	cin >> N >> M;
	rep(i, N)cin >> H[i];
	rep(i, M)
	{
		int A, B;
		cin >> A >> B;
		--A; --B;
		to[A].push_back(B);
		to[B].push_back(A);
	}
	int count = 0;
	rep(i, N)
	{
		int d = to[i].size();
		if (d == 0)  count++;
		else
		{
			bool highest = true;
			for (int u : to[i])
			{
				if (H[i] <= H[u]) highest = false;				
			}
			if (highest == true) count++;
		}
	}
	cout << count << endl;
	return 0;
}

Compiler output:
a.cc:5:13: error: array size missing in 'to'
    5 | vector<int> to[];
      |             ^~
Language: C

#include <bits/stdc++.h>

template <typename InputIterator>
typename InputIterator::value_type summation(InputIterator first,
                                             InputIterator last) {
  return std::accumulate(first, last, typename InputIterator::value_type());
}
template <typename T>
std::istream &operator>>(std::istream &stream, std::vector<T> &v);
template <typename T1, typename T2>
std::istream &operator>>(std::istream &stream, std::pair<T1, T2> &p);
template <typename T>
std::istream &operator>>(std::istream &stream, std::vector<T> &v) {
  for (auto &i : v) {
    stream >> i;
  }
  return stream;
}
template <typename T1, typename T2>
std::istream &operator>>(std::istream &stream, std::pair<T1, T2> &p) {
  stream >> p.first >> p.second;
  return stream;
}

int main() {
  int64_t n, m;
  std::cin >> n >> m;
  std::vector<int64_t> h(n);
  std::cin >> h;

  std::vector<bool> f(n, true);

  for (int64_t i = 0; i < m; i++) {
    int64_t a, b;
    std::cin >> a >> b;
    a--;
    b--;

    if (h[a] <= h[b]) {
      f[a] = false;
    }
    if (h[b] <= h[a]) {
      f[b] = false;
    }
  }

  std::cout << std::count(f.cbegin(), f.cend(), true) << std::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.