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

#include <iostream>
#include <vector>

using namespace std;

bool pass[100010][100010];
int N, M;
int ans;

void dfs()
{
    for (int i = 0; i < M; i++)
    {
        for (int j = 0; j < M; j++)
        {
            if (pass[i][j])
            {
                ans++;
            }
            
        }
        
    }

    ans /= 2;
    
    return;
    
}

int main(int argc, char const *argv[])
{
    cin >> N >> M;
    int in;
    vector<int> H;
    for (int i = 0; i < N; i++)
    {
        cin >> in;
        H.emplace_back(in);
    }
    
    int inA, inB;
    for (int i = 0; i < M; i++)
    {
        cin >> inA >> inB;
        pass[inA - 1][inB - 1] = true;
        pass[inB - 1][inA - 1] = true;
    }
    
    dfs();

    cout << ans << endl;

    return 0;
}

Compiler output:
/tmp/cc8xOuPq.o: in function `dfs()':
a.cc:(.text+0x3e): relocation truncated to fit: R_X86_64_PC32 against symbol `ans' defined in .bss section in /tmp/cc8xOuPq.o
a.cc:(.text+0x47): relocation truncated to fit: R_X86_64_PC32 against symbol `ans' defined in .bss section in /tmp/cc8xOuPq.o
a.cc:(.text+0x51): relocation truncated to fit: R_X86_64_PC32 against symbol `M' defined in .bss section in /tmp/cc8xOuPq.o
a.cc:(.text+0x60): relocation truncated to fit: R_X86_64_PC32 against symbol `M' defined in .bss section in /tmp/cc8xOuPq.o
a.cc:(.text+0x6b): relocation truncated to fit: R_X86_64_PC32 against symbol `ans' defined in .bss section in /tmp/cc8xOuPq.o
a.cc:(.text+0x7a): relocation truncated to fit: R_X86_64_PC32 against symbol `ans' defined in .bss section in /tmp/cc8xOuPq.o
/tmp/cc8xOuPq.o: in function `main':
a.cc:(.text+0x94): relocation truncated to fit: R_X86_64_PC32 against symbol `N' defined in .bss section in /tmp/cc8xOuPq.o
a.cc:(.text+0xb0): relocation truncated to fit: R_X86_64_PC32 against symbol `M' defined in .bss section in /tmp/cc8xOuPq.o
a.cc:(.text+0x103): relocation truncated to fit: R_X86_64_PC32 against symbol `N' defined in .bss section in /tmp/cc8xOuPq.o
a.cc:(.text+0x193): relocation truncated to fit: R_X86_64_PC32 against symbol `M' defined in .bss section in /tmp/cc8xOuPq.o
a.cc:(.text+0x1a7): additional relocation overflows omitted from the output
collect2: error: ld returned 1 exit status
Language: C++

#include <iostream>
using namespace std;
#define pb push_back
int main(){
  int n,k;
  cin>>n>>k;
  vector<int> adj[n];
  int h[n];
  for(int i=0;i<n;++i) cin>>h[i];
  while(k--) {
    int a,b;
    cin>>a>>b;
    a--; b--;
    adj[a].pb(b); adj[b].pb(a);
  }
  int a =0;
  for(int i=0;i<n;++i){
    bool st = 0;
    for(auto j:adj[i]){
      if(h[j]>=h[i]) {st = 1; break;}
    }
    if(!st) a++;
  }
  cout<<a;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'vector' was not declared in this scope
    7 |   vector<int> adj[n];
      |   ^~~~~~
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:7:10: error: expected primary-expression before 'int'
    7 |   vector<int> adj[n];
      |          ^~~
a.cc:14:5: error: 'adj' was not declared in this scope
   14 |     adj[a].pb(b); adj[b].pb(a);
      |     ^~~
a.cc:19:16: error: 'adj' was not declared in this scope
   19 |     for(auto j:adj[i]){
      |                ^~~
Language: C++

#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<set>
#include<queue>
#include<cmath>
#include<map>
#include<stack>
#define ll long long
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
static const int MAXN = 100000;
static const int MAX = 1000000000;

class UnionFind {
public:
    vector <ll> par; // 各元の親を表す配列
    vector <ll> siz; // 素集合のサイズを表す配列(1 で初期化)

    // Constructor
    UnionFind(ll sz_): par(sz_), siz(sz_, 1LL) {
        for (ll i = 0; i < sz_; ++i) par[i] = i; // 初期では親は自分自身
    }
    void init(ll sz_) {
        par.resize(sz_);
        siz.assign(sz_, 1LL);  // resize だとなぜか初期化されなかった
        for (ll i = 0; i < sz_; ++i) par[i] = i; // 初期では親は自分自身
    }

    // Member Function
    // Find
    ll root(ll x) { // 根の検索
        while (par[x] != x) {
            x = par[x] = par[par[x]]; // x の親の親を x の親とする
        }
        return x;
    }

    // Union(Unite, Merge)
    bool merge(ll x, ll y) {
        x = root(x);
        y = root(y);
        if (x == y) return false;
        // merge technique（データ構造をマージするテク．小を大にくっつける）
        if (siz[x] < siz[y]) swap(x, y);
        siz[x] += siz[y];
        par[y] = x;
        return true;
    }

    bool issame(ll x, ll y) { // 連結判定
        return root(x) == root(y);
    }

    ll size(ll x) { // 素集合のサイズ
        return siz[root(x)];
    }
};

int N, M;
int H[MAX], A[MAX], B[MAX], C[MAX];

int main(){
    cin >> N >> M;
    int ans = N;
    UnionFind UF(N);
    rep(i,N){
        cin >> H[i];
    }
    rep(i,M){
        cin >> A[i] >> B[i];
        A[i]--; B[i]--;
        if( !UF.issame(A[i], B[i]) ){
            UF.merge(A[i], B[i]);
            ans--;
        }
    }
    
    cout << ans << endl;

    return 0;
}

Compiler output:
/tmp/ccnHIE9K.o: in function `main':
a.cc:(.text+0xb5): relocation truncated to fit: R_X86_64_PC32 against symbol `A' defined in .bss section in /tmp/ccnHIE9K.o
a.cc:(.text+0xe1): relocation truncated to fit: R_X86_64_PC32 against symbol `B' defined in .bss section in /tmp/ccnHIE9K.o
a.cc:(.text+0x103): relocation truncated to fit: R_X86_64_PC32 against symbol `A' defined in .bss section in /tmp/ccnHIE9K.o
a.cc:(.text+0x11d): relocation truncated to fit: R_X86_64_PC32 against symbol `A' defined in .bss section in /tmp/ccnHIE9K.o
a.cc:(.text+0x134): relocation truncated to fit: R_X86_64_PC32 against symbol `B' defined in .bss section in /tmp/ccnHIE9K.o
a.cc:(.text+0x14e): relocation truncated to fit: R_X86_64_PC32 against symbol `B' defined in .bss section in /tmp/ccnHIE9K.o
a.cc:(.text+0x165): relocation truncated to fit: R_X86_64_PC32 against symbol `B' defined in .bss section in /tmp/ccnHIE9K.o
a.cc:(.text+0x17f): relocation truncated to fit: R_X86_64_PC32 against symbol `A' defined in .bss section in /tmp/ccnHIE9K.o
a.cc:(.text+0x1af): relocation truncated to fit: R_X86_64_PC32 against symbol `B' defined in .bss section in /tmp/ccnHIE9K.o
a.cc:(.text+0x1c9): relocation truncated to fit: R_X86_64_PC32 against symbol `A' defined in .bss section in /tmp/ccnHIE9K.o
collect2: error: ld returned 1 exit status
Language: C++

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

typedef long long ll;

int main()
{
	ll n, m;
  	cin >> l >> m;
  	ll tall[n];
  	for(int i = 0; i < n; i++)
    {
    	cin >> tall[i];
    }
  	int a[m];
  	int b[m];
  	for(int i = 0; i < m; i++)
    {
    	cin >> a[i] >> b[i];
    }
  	int good[n];
  	for(int i = 0; i < n; i++)
    {
    	good[i] = 0;
    }
  	for(int i = 0; i < m; i++)
    {
    	if(tall[a[i]] > tall[b[i]])
        {
        	good[b[i]]++; 
        }
      	else if(tall[a[i]] < tall[b[i]])
        {
        	good[a[i]]++;
        }
      	else if(tall[a[i]] == tall[b[i]])
        {
        	good[a[i]]++;
          	good[b[i]]++;
        }
    }
  	int ans = 0;
  	for(int i = 0; i < n; i++)
    {
    	if(good[i] == 0)
        {
        	ans++;
        }
    }
  	cout << ans << endl;
}

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

#include<bits/stdc++.h>
using namespace std;
#define ll long long int
int main()
{
	ll n,m;
	cin>>n>>m;
	vector<ll> vec(n+1,0);
	for(ll i=1;i<=n;i++){
		cin>>vec[i];
	}
	vector<vector<ll> > vec2(n+1);
	map<ll,ll> map;
	for(ll i=1;i<=m;i++){
		ll u,v;
		cin>>u>>v;
		vec2[u].push_back(v);
		vec2[v].push_back(u);
	}
	
	for(ll i=1;i<=n;i++){
		sort(vec2[i].begin(),vec2[i].end());
		reverse(vec2[i].begin(),vec2[i].end());
	}
	
	for(ll i=1;i<=n;i++){
		if(vece[i].size()==0||vec[i]>vec[i][0]){
			map[i]=1;
		}
	}
	cout<<map.size()<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:20: error: 'vece' was not declared in this scope; did you mean 'vec2'?
   27 |                 if(vece[i].size()==0||vec[i]>vec[i][0]){
      |                    ^~~~
      |                    vec2
a.cc:27:52: error: invalid types '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type {aka long long int}[int]' for array subscript
   27 |                 if(vece[i].size()==0||vec[i]>vec[i][0]){
      |                                                    ^
Language: C++

#include<iostream>
using namespace std;
int main(){
  int n,m;cin>>n>>m;
  int* h=new int[n];
  int* a=new int[m];
  int* b=new int[m];
  for(int i=0;i<n;i++) cin>>h[i];
  for(int i=0;i<m;i++){
    cin>>a[i]>>b[i];
  }
  int c=0;
  for(int i=0;i<n;i++){
    h[i]
    bool f=true;
    for(int j=0;j<m;j++){
      if(a[j]==i){
        if(h[i]<=h[b[j]]){f=false;break;}
      }else if(b[j]==i){
        if(h[i]<=h[a[j]]){f=false;break;}
      }
    }
    if(f)c++;
  }
  cout<<c<<endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:9: error: expected ';' before 'bool'
   14 |     h[i]
      |         ^
      |         ;
   15 |     bool f=true;
      |     ~~~~ 
a.cc:18:27: error: 'f' was not declared in this scope
   18 |         if(h[i]<=h[b[j]]){f=false;break;}
      |                           ^
a.cc:20:27: error: 'f' was not declared in this scope
   20 |         if(h[i]<=h[a[j]]){f=false;break;}
      |                           ^
a.cc:23:8: error: 'f' was not declared in this scope
   23 |     if(f)c++;
      |        ^
Language: Java

import java.io.*;
import java.util.*;


public class main {

    public static void main(String[] args) {
        new main().run();
    }

    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));;
    PrintWriter out = new PrintWriter(System.out);
    StringTokenizer tok = new StringTokenizer("");

    void run() {
        try {
            long timeStart = System.currentTimeMillis();
            solve();

            out.close();

            long timeEnd = System.currentTimeMillis();
            System.err.println("Time = " + (timeEnd - timeStart));
        } catch (Exception e) {
            e.printStackTrace();
            System.exit(-1);
        }
    }

    String readLine() throws IOException {
        return in.readLine();
    }

    String delimiter = " ";

    String readString() throws IOException {
        while (!tok.hasMoreTokens()) {
            String nextLine = readLine();
            if (null == nextLine) return null;

            tok = new StringTokenizer(nextLine);
        }

        return tok.nextToken(delimiter);
    }

    int readInt() throws IOException {
        return Integer.parseInt(readString());
    }

    long readLong() throws IOException {
        return Long.parseLong(readString());
    }


    void solve() throws IOException {
        int n = readInt(), m = readInt(), from, to, s;
        int[] h = new int[n];
        for (int i = 0; i < n; i++)
            h[i] = readInt();
        List<Integer>[] g;
        g = new List[n];
        for (int v = 0; v < n; ++v)
            g[v] = new ArrayList<>();
        for (int e = 0; e < m; ++e){
            from = readInt() - 1;
            to = readInt() - 1;
            g[from].add(to);
            g[to].add(from);
        }
        s = 0;
        boolean f;
        for (int i = 0; i < n; i++){
            f = true;
            for (int j:g[i]){
                if (h[j] >= h[i]){
                    f = false;
                    break;
                }
            }
            if (f)
                s++;
        }
        out.println(s);

    }
}

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

#include <bits/stdc++.h>
#include <algorithm>
#define _GLIBCXX_DEBUG
#define rep(i,n) for(int i=0;i<(n);++i)
#define all(x) (x).begin(), (x).end()
#define PB(x) push_back(x)
#define MP(x,y) make_pair(x,y)
using namespace std;
typedef long long ll;
typedef pair<int, int> P;


int main() {
    
    int n,m;
    cin >> n >> m;
    vector<int> h(n);
    rep(i,n)    cin >> h[i];
    vector<vector<int>> v(n);
    rep(i,m) {
        int a,b;
        cin >> a >> b;
        a--;
        b--;
        v[a].push_back(b);
        v[b].push_back(a);
    }

    int ans = 0;
    rep(i,n) {
        rep(j,v[i].size()) {
            if(v[i].size() == 0)    break;
            if(h[i] =< h[v[i][j]])     break;
            if(j+1 >= v[i].size())    ans++; 
        }
    }

    cout<< ans<< endl;

 return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:33:22: error: expected primary-expression before '<' token
   33 |             if(h[i] =< h[v[i][j]])     break;
      |                      ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int n,m,a,b,ans;
set<int> AL[100005];
int h[100005];
int visit[100005];
 
void dfs(int u){
	if(visited[u] == 1) return;
  	visited[u] = 1;
  	bool good = true;
  	for(int v: AL[u]){
    	if(h[u] < h[v]) good = false;
      	dfs(v);
    }
  	if(good) ++ans;
}
 
int main(){
	cin >> n >> m;
  	for(int i=0;i<n;++i) cin >> h[i];
  	for(int i=0;i<m;++i){
    	cin >> a >> b;
     	--a; --b;
     	AL[a].insert(b);
      	AL[b].insert(a);
    }
  	for(int i=0;i<n;++i){
    	if(visited[i] == 0) dfs(i);
    }
  	cout << ans;
}

Compiler output:
a.cc: In function 'void dfs(int)':
a.cc:10:12: error: 'visited' was not declared in this scope; did you mean 'visit'?
   10 |         if(visited[u] == 1) return;
      |            ^~~~~~~
      |            visit
a.cc:11:9: error: 'visited' was not declared in this scope; did you mean 'visit'?
   11 |         visited[u] = 1;
      |         ^~~~~~~
      |         visit
a.cc: In function 'int main()':
a.cc:30:12: error: 'visited' was not declared in this scope; did you mean 'visit'?
   30 |         if(visited[i] == 0) dfs(i);
      |            ^~~~~~~
      |            visit
Language: C++

#include<iostream>
#include <algorithm>
#include<cstdio>
#include<string>
#include<math.h>
#include<vector>
#include <queue>
#include <bits/stdc++.h>
#include <map>
#define rep(i,n) for(int i = 0; i < (n); i++)
#define srep(i,s,t) for (int i = s; i < t; i++)
#define drep(i,n) for(int i = (n)-1; i >= 0; i--)
using namespace std;
typedef vector<vector<char>> field_t;

typedef pair<int, int> point_t;
int main()
{
    long  long N,M,i,ans;
    cin >> N >> M;
	vector<int> H(N),A(M),B(M),L(N);
	rep(i,N){
		cin >> H[i];
		L[i]=1;
	}
	rep(i,N){
		cin >> A[i] >> B[i];
		if(H[A[i]-1]>H[B[i]-1]){
			L[B[i]-1]=0;
		}else{
			if(H[A[i]-1]<H[B[i]-1]){
				L[A[i]-1]=0;
			}else{
				L[B[i]-1]=0;
				L[A[i]-1]=0;
			}
		}
	}
	ans=0
	rep(i,N){
		if(L[i]){
			ans++;
		}
	}
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:39:14: error: expected ';' before 'for'
   39 |         ans=0
      |              ^
      |              ;
a.cc:10:45: error: expected ';' before ')' token
   10 | #define rep(i,n) for(int i = 0; i < (n); i++)
      |                                             ^
a.cc:40:9: note: in expansion of macro 'rep'
   40 |         rep(i,N){
      |         ^~~
Language: C++

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

int n,m,a,b,ans;
set<int> AL[100005];
int h[100005];
int visit[100005];

void dfs(int u){
	if(visit[u] == 1) return;
  	visit[u] = 1;
  	bool good = true;
  	for(int v: AL[u]){
    	if(h[u] < h[v]) good = false;
      	dfs(v);
    }
  	if(good) ++ans;
}

int main(){
	cin >> n >> m;
  	for(int i=0;i<n;++i) cin >> h[i];
  	for(int i=0;i<m;++i){
    	cin >> a >> b;
     	--a; --b;
     	AL[a].insert(b);
      	AL[b].insert(a);
    }
  	for(int i=0;i<n;++i){
    	if(visited[i] == 0) dfs(i);
    }
  	cout << ans;
}

Compiler output:
a.cc: In function 'void dfs(int)':
a.cc:10:12: error: reference to 'visit' is ambiguous
   10 |         if(visit[u] == 1) return;
      |            ^~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:80,
                 from a.cc:1:
/usr/include/c++/14/variant:1855:5: note: candidates are: 'template<class _Visitor, class ... _Variants> constexpr std::__detail::__variant::__visit_result_t<_Visitor, _Variants ...> std::visit(_Visitor&&, _Variants&& ...)'
 1855 |     visit(_Visitor&& __visitor, _Variants&&... __variants)
      |     ^~~~~
a.cc:7:5: note:                 'int visit [100005]'
    7 | int visit[100005];
      |     ^~~~~
a.cc:11:9: error: reference to 'visit' is ambiguous
   11 |         visit[u] = 1;
      |         ^~~~~
/usr/include/c++/14/variant:1855:5: note: candidates are: 'template<class _Visitor, class ... _Variants> constexpr std::__detail::__variant::__visit_result_t<_Visitor, _Variants ...> std::visit(_Visitor&&, _Variants&& ...)'
 1855 |     visit(_Visitor&& __visitor, _Variants&&... __variants)
      |     ^~~~~
a.cc:7:5: note:                 'int visit [100005]'
    7 | int visit[100005];
      |     ^~~~~
a.cc: In function 'int main()':
a.cc:30:12: error: 'visited' was not declared in this scope; did you mean 'visit'?
   30 |         if(visited[i] == 0) dfs(i);
      |            ^~~~~~~
      |            visit
Language: C++

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

int main() {
  int N;
  cin >> N;
  vector<int> adj(N);
  int height[N];
  for (int i = 0; i < N; ++i) {
    cin >> height[i]; 
  }
  for (int i = 0; i < N-1; ++i) {
    int u, v;
    cin >> u >> v;
    --u, --v;
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  int ans = 0;
  for (int i = 0; i < N; ++i) {
    bool allHigher = true;
    for (auto &it : adj[i]) {
      allHigher &= height[i] > height[it];
    }
    ans += allHigher;
  }
  cout << ans << '\n';
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:12: error: request for member 'push_back' in 'adj.std::vector<int>::operator[](((std::vector<int>::size_type)u))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
   16 |     adj[u].push_back(v);
      |            ^~~~~~~~~
a.cc:17:12: error: request for member 'push_back' in 'adj.std::vector<int>::operator[](((std::vector<int>::size_type)v))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
   17 |     adj[v].push_back(u);
      |            ^~~~~~~~~
a.cc:22:26: error: 'begin' was not declared in this scope
   22 |     for (auto &it : adj[i]) {
      |                          ^
a.cc:22:26: note: suggested alternatives:
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:166,
                 from a.cc:1:
/usr/include/c++/14/valarray:1238:5: note:   'std::begin'
 1238 |     begin(const valarray<_Tp>& __va) noexcept
      |     ^~~~~
In file included from /usr/include/c++/14/filesystem:53,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:200:
/usr/include/c++/14/bits/fs_dir.h:608:3: note:   'std::filesystem::__cxx11::begin'
  608 |   begin(recursive_directory_iterator __iter) noexcept
      |   ^~~~~
a.cc:22:26: error: 'end' was not declared in this scope
   22 |     for (auto &it : adj[i]) {
      |                          ^
a.cc:22:26: note: suggested alternatives:
/usr/include/c++/14/valarray:1265:5: note:   'std::end'
 1265 |     end(const valarray<_Tp>& __va) noexcept
      |     ^~~
/usr/include/c++/14/bits/fs_dir.h:613:3: note:   'std::filesystem::__cxx11::end'
  613 |   end(recursive_directory_iterator) noexcept
      |   ^~~
Language: C++

#include<cstdio>
#include<cstring>
#include<algorithm>
#include<queue>
#include<cmath>
#include<iostream>
#include<cstring>
using namespace std;
template<class _T>inline void read(_T &_a)
{
    bool f=0; char _c=getchar(); _a=0;
    while(_c<'0'||_c>'9'){ if(_c=='-') f=1; _c=getchar(); }
    while(_c>='0'&&_c<='9'){ _a=(_a<<3)+(_a<<1)-'0'+_c; _c=getchar(); }
    if(f) _a=-_a;
}

const int MAXN=200005;
int n,m,h[MAXN],ans;
bool vis[MAXN];

int main()
{
    read(n);
    read(m);
    for (register int i=1;i<=n;++i) read(h[i]);
    for (register int i=1;i<=n;++i) fa[i]=i;
    ans=n;
    while(m--)
    {
        int a,b;
        read(a);
        read(b);
        if(h[a]>h[b])
        {
            if(!vis[b])
            {
                vis[b]=true;
                --ans;
            }
        } else if (h[a]<h[b])
        {
            if(!vis[a])
            {
                vis[a]=true;
                --ans;
            }
        } else {
            if(!vis[a])
            {
                vis[a]=true;
                --ans;
            }
            if(!vis[b])
            {
                vis[b]=true;
                --ans;
            }
        }
    }
    printf("%d",n-ans);
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:23: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   25 |     for (register int i=1;i<=n;++i) read(h[i]);
      |                       ^
a.cc:26:23: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   26 |     for (register int i=1;i<=n;++i) fa[i]=i;
      |                       ^
a.cc:26:37: error: 'fa' was not declared in this scope; did you mean 'fma'?
   26 |     for (register int i=1;i<=n;++i) fa[i]=i;
      |                                     ^~
      |                                     fma
Language: Java

import java.util.*;
public class Peaks {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int N = in.nextInt(), M = in.nextInt();
        int[] arr = new int[N];
        for (int i = 0; i < N; i++) {
            arr[i] = in.nextInt();
        }
        boolean[] good = new boolean[N];
        for (int i = 0; i < N; i++) {
            good[i] = true;
        }
        for (int i = 0; i < M; i++) {
            int u = in.nextInt() - 1, v = in.nextInt() - 1;
            if (arr[u] <= arr[v]) {
                good[u] = false;
            }
            if (arr[u] >= arr[v]) {
                good[v] = false;
            }
        }
        int res = 0;
        for (boolean b : good) {
            if (b) {
                res++;
            }
        }
        System.out.println(res);
    }
}


Compiler output:
Main.java:2: 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;

int n,m,a,b,ans;
vector<int> AL[100005];
int h[100005];
int visit[100005];

void dfs(int u){
	if(visit[u] == 1) return;
  	visit[u] = 1;
  	bool good = true;
  	for(int v: AL[u]){
    	if(h[u] < h[v]) good = false;
      	dfs(v);
    }
  	if(good) ++ans;
}

int main(){
	cin >> n >> m;
  	for(int i=0;i<n;++i) cin >> h[i];
  	for(int i=0;i<m;++i){
    	cin >> a >> b;
     	--a; --b;
     	AL[a].push_back(b);
      	AL[b].push_back(a);
    }
  	dfs(0);
  	cout << ans;
}

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

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

inline int readint(){
	int x; scanf("%d",&x); return x;
}

const int MaxN = 200005;
int a[MaxN]; bool bad[MaxN];

int main(){
	int n = readint(), m = readint();
	for(int i=1; i<=n; ++i)
		a[i] = readint();
	for(int x,y; m; --m){
		x = readint(), y = readint();
		if(h[x] <= h[y])
			bad[x] = true;
		if(h[x] >= h[y])
			bad[y] = true;
	}
	int ans = 0;
	for(int i=1; i<=n; ++i)
		if(not bad[i])
			++ ans;
	printf("%d\n",ans);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:20: error: 'h' was not declared in this scope
   19 |                 if(h[x] <= h[y])
      |                    ^
a.cc:21:20: error: 'h' was not declared in this scope
   21 |                 if(h[x] >= h[y])
      |                    ^
Language: C++

#include <iostream>
using namespace std;
char a[100000][100000];
int h[100000];
int main(){
  int n, m, i;
  cin>>n>>m;
  for(i=0; i<n; i++)
    cin>>h[i];
  for(i=0; i<m; i++){
    int x, y;
    cin>>x>>y;
    x--;
    y--;
    a[x][y]=a[y][x]=1;
  }
  int ans=0;
  for(i=0; i<n; i++){
    int stg=1;
    for(int j=0; j<n; j++){
      if(a[i][j]==1 && h[i]<h[j])
        stg=0;
    }
    ans+=stg;
  }
  cout<<ans;
  return 0;
}

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

#include<bits/stdc++.h>
using namespace std;
typedef long long lli;
const int maxn = 5e5 + 50;
typedef pair<int, int> P;

int a, b, c, d, e, f, g;
void solve();
int main()
{
	int t = 1;
//	cin >> t;
	for(int i=0; i<t; i++)
	{
		solve();
	}
	return 0;
}

// type below
vector<int> V[200050];
void solve()
{
	cin >> a >> b;
	int arr[a + 50];
	for(int i=1; i<=a; i++)
		cin >> arr[i];
	for(int i=0; i<b; i++)
	{
		int x, y; cin >> x >> y;
		V[x].push_back(y);
		V[y].push_back(x);
	}
	bool check[a + 50] = {0};
	int ans = 0;
	for(int i=1; i<=a; i++)
	{
		if(check[i]) continue;
		bool yes = true;
		for(int x : V[i])
		{
			if(arr[x] >= arr[i])
			{
				yes = false;
			}
			else
			{
				check[x] = true;
			}
		}
		if(yes) ans ++;
	}
	cout << ans << '\n';
}

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

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.Queue;
import java.util.StringTokenizer;



public class Solution
{
    static class FastReader
    {
        BufferedReader br;
        StringTokenizer st;

        public FastReader()
        {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        }

        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        long nextLong()
        {
            return Long.parseLong(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }

    static int gcd(int a,int b)
	{
		if(a == 0) return b;
		if(b == 0) return a;
		
		return gcd(b,a%b);
	}


    public static void main(String[] args)
    {
        OutputStream outputStream = System.out;
        FastReader sc = new FastReader();
        PrintWriter out = new PrintWriter(outputStream);
       
        
        
        int n = sc.nextInt();
        int m = sc.nextInt();
        
        int a[] = new int[n];
        
        for(int i = 0; i < n; i++)
        {
        	a[i] = sc.nextInt();
        }
        
        int map[] = new int[n];
        
        for(int i = 0; i < m; i++)
        {
        	int x = sc.nextInt()-1;
        	int y = sc.nextInt()-1;
        	
        	if(a[x] > a[y])
        	{
        		map[y] = -1;
        	}
        	else if(a[x] < a[y])
        	{
        		map[x] = -1;
        	}
        	else
        	{
        		map[x] = -1;
        		map[y] = -1;
        	}
        }
        
        int cnt = 0;
        for(int i = 0; i < n; i++)
        {
        	if(map[i] == 0) cnt++;
        }
        
        out.println(cnt);
        out.close();
    }

}

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

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

# define C continue;
# define R return

# define D double
# define I insert
# define ll long long
# define ld long double

# define ull unsigned long long
# define ui unsigned int

# define pb push_back
# define pf push_front

# define vi vector < int >
# define vc vector < char >
# define vs vector < string >
# define vb vector < bool >
# define vd vector < D >
# define vll vector < ll >
# define vull vector < ull >
# define vld vector < ld >
# define PQ priority_queue

# define vvi vector < vector < int > >
# define vvb vector < vector < bool > >
# define vvc vector < vector < char > >
# define vvs vector < vs >
# define vvll vector < vector < ll > >
# define vvd vector < vector < D > >
# define vvld vector < vector < ld > >

# define all(v) (v).begin() , (v).end()
# define allrev(v) (v).rbegin() , (v).rend()
# define allcomp(v) v.begin() , v.end() , comp
# define allrevcomp(v) v.rbegin() , v.rend() , comp

# define pii pair < int , int >
# define pll pair < ll , ll >
# define pld pair < ld , ld >
# define pDD pair < D , D >

# define vpld vector < pld >
# define vpii vector < pii >
# define vpll vector < pll >
# define vpDD vector < pDD >

# define vvpii vector < vector < pii > >
# define F first
# define S second
# define mp make_pair

# define dist(a,b,p,q) sqrt((p-a)*(p-a) + (q-b)*(q-b))

# define pp(n) printf("%.10Lf",n);
# define line cout<<"\n";
# define fast ios_base::sync_with_stdio(false) ; cin.tie(0) ; cout.tie(0);

string vow = "aeiou";
int month[] = {-1, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};

const int dxhorse[] = {-2, -2, -1, -1, 1, 1, 2, 2};
const int dyhorse[] = {1, -1, 2, -2, 2, -2, 1, -1};

const int dx[] = { -1 , 0 , 1 , 0 } ;
const int dy[] = { 0 , 1 , 0 , -1 } ;

const ld pie = 3.1415926535897932384626 ;
const ll mod = 1e9 + 7 ;

/// Tip : If a and b are positive integers ; we may say - ceil (a/b) = 1 + floor ( (a-1)/b ) .

void solve ( int test_case )
{
    int n , m ;
    cin >> n >> m ;

    vi h ( n + 1 ) ;

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

    vvi v ( n + 1 ) ;

    for ( int i = 1 ; i <= m ; i ++ )
    {
        int a , b ;
        cin >> a >> b ;

        g[a].pb ( b ) ;
        g[b].pb ( a ) ;
    }

    int ans = 0 ;

    for ( int i = 1 ; i <= n ; i ++ )
    {
        bool ok = 1 ;

        for ( auto &j : g[i] )
        {
            if ( h[i] > h[j] ) C ;

            ok = false ;
            break ;
        }

        if ( ok ) ans ++ ;
    }

    cout << ans ; line ;
}

int main()
{fast
    int t = 1;
    // cin >> t;

    for ( int i = 1 ; i <= t ; i ++ )
    {
        solve ( i ) ;
    }

    return 0;
}


Compiler output:
a.cc: In function 'void solve(int)':
a.cc:95:9: error: 'g' was not declared in this scope
   95 |         g[a].pb ( b ) ;
      |         ^
a.cc:105:25: error: 'g' was not declared in this scope
  105 |         for ( auto &j : g[i] )
      |                         ^
Language: C++

#include <bits/stdc++.h>
#include "../lib/data_structure/union_find.hpp"

using namespace std;

#define SZ(x) (int)(x.size())
#define REP(i, n) for(int i=0;i<(n);++i)
#define FOR(i, a, b) for(int i=(a);i<(b);++i)
#define RREP(i, n) for(int i=(int)(n);i>=0;--i)
#define RFOR(i, a, b) for(int i=(int)(a);i>=(int)(b);--i)
#define ALL(a) (a).begin(),(a).end()
#define DUMP(x) cerr<<#x<<" = "<<(x)<<endl
#define DEBUG(x) cerr<<#x<<" = "<<(x)<<" (L"<<__LINE__<<")"<< endl;

using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vll = vector<ll>;
using vvll = vector<vll>;
using P = pair<int, int>;

const double eps = 1e-8;
const ll MOD = 1000000007;
const int INF = INT_MAX / 2;
const ll LINF = LLONG_MAX / 2;

template <typename T1, typename T2>
bool chmax(T1 &a, const T2 &b) {
  if(a < b) {a = b; return true;}
  return false;
}

template <typename T1, typename T2>
bool chmin(T1 &a, const T2 &b) {
  if(a > b) {a = b; return true;}
  return false;
}

template<typename T1, typename T2>
ostream& operator<<(ostream &os, const pair<T1, T2> p) {
  os << p.first << ":" << p.second;
  return os;
}

template<class T>
ostream &operator<<(ostream &os, const vector<T> &v) {
  REP(i, SZ(v)) {
    if(i) os << " ";
    os << v[i];
  }
  return os;
}

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout << fixed << setprecision(10);

  int n, m; cin >> n >> m;
  vi h(n);
  REP(i, n) {
    cin >> h[i];
  }

  vvi g(n);
  REP(i, m) {
    int a, b; cin >> a >> b;
    a--; b--;
    g[a].push_back(b);
    g[b].push_back(a);
  }

  int cnt = 0;
  REP(i, n) {
    int ma = 0;
    REP(j, SZ(g[i])) {
      chmax(ma, h[g[i][j]]);
    }
    cnt += ma < h[i];
  }
  cout << cnt << endl;


}
























Compiler output:
a.cc:2:10: fatal error: ../lib/data_structure/union_find.hpp: No such file or directory
    2 | #include "../lib/data_structure/union_find.hpp"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>

using namespace std;
typedef long long ll;

int main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    int n,m;
    cin >> n >> m;
    vector<int> h(n+1,0);
    for(int i=1;i<=n;i++) cin >> h[i];
    vector<int> v[n+1];
    for(int i=0;i<m;i++)
    {
        int a,b;
        cin >> a >> b;
        v[a].push_back(b);
        v[b].push_back(a);
    }
    int res=0;
    for(int i=1;i<=n;i++)
    {
        bool ok=1;
        for(int to:v[i]) if(h[to]>=h[a]) ok=0;
        res+=ok;
    }
    cout << res << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:26:38: error: 'a' was not declared in this scope
   26 |         for(int to:v[i]) if(h[to]>=h[a]) ok=0;
      |                                      ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define rep(i,j,n) for(int i=(int)(j);i<(int)(n);i++)
#define REP(i,j,n) for(int i=(int)(j);i<=(int)(n);i++)
#define per(i,j,n) for(int i=(int)(j);(int)(n)<=i;i--)
#define int long long
#define ll long long
#define ALL(a) (a).begin(),(a).end()
#define pb push_back
#define mp make_pair
#define endl "\n"
const int MOD=1e9+7;
//const int MOD=998244353;
const int INF=(1ll<<62)-1;
signed main(){
  int N,M; cin>>N>>M;
  vi A(N);
  rep(i,0,N) cin>>A[i];
  vector<bool> F(N,1);
  rep(i,0,M){
    int X,Y; cin>>X>>Y;
    if(A[X-1]>A[Y-1]) swap(X,Y);
    F[X-1]=0;
  }
  int ans=0;
  rep(i,0,N){
    if(F[i]) ans++;
  }
  cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:3: error: 'vi' was not declared in this scope
   17 |   vi A(N);
      |   ^~
a.cc:18:19: error: 'A' was not declared in this scope
   18 |   rep(i,0,N) cin>>A[i];
      |                   ^
a.cc:22:8: error: 'A' was not declared in this scope
   22 |     if(A[X-1]>A[Y-1]) swap(X,Y);
      |        ^
Language: C++

#include<bits/stdc++.h>

using namespace std;
typedef long long ll;
int main(){
    ll n;cin>>n;
    for(int i=-120;i<=120;i++){
        for(int j=-120;j<=120;j++){
            if(x==(i*i*i*i*i)-(j*j*j*j*j)){
                cout << i <<" "<<j<<endl;
                return 0;
            }
        }
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:16: error: 'x' was not declared in this scope
    9 |             if(x==(i*i*i*i*i)-(j*j*j*j*j)){
      |                ^
Language: C++

#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp> 
#include <ext/pb_ds/tree_policy.hpp> 
#define ll long long int
#define MOD 1000000007
#define oo 1000000000000000000
#define forr(i,n) for(ll i=0;i<n;i++)
#define fastio ios_base::sync_with_stdio(false); cin.tie(0) ; cout.tie(0);
#define all(x) x.begin(),x.end()
#define eb emplace_back
#define pb push_back
#define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update> 
 
using namespace __gnu_pbds; 
using namespace std;

ll valueOfIndex(ordered_set&s , ll i){ return *(s.find_by_order(i)); }
ll indexOfValue(ordered_set&s , ll x){ return s.order_of_key(x); }
ll add(ll a, ll b,ll p=MOD) { a%=p; b%=p; return (a+b + p)%p;}
ll mul(ll a, ll b,ll p=MOD) { a%=p; b%=p; return (a*b + p)%p;} // __int128
ll power(ll x,ll n,ll p=MOD){ if(x==0) return 0; if(n==0 || x==1) return 1LL;
    ll r = (power(x,n/2,p))%p; if(n&1) return mul(mul(r,r,p) , x,p); else return mul(r,r,p);
}
ll inv(ll x){return power(x,MOD-2);}


void __sol(){

    ll x; cin >> x;
    vector<int> v;
    for(ll i=0;;i++){
        if( i*i*i*i>x ) break;
        else v.eb(i*i*i*i*i);
    }
    int n = v.size();
    forr(i,n){
        forr(j,n){
            if(v[i]+v[j]==x){
                cout << i << " " << j;
                return;
            }
            else if(v[i]-v[j]==x){
                cout << i << " " << -j;
                return;
            }
            else if(-v[i]+v[j]==x){
                cout << -i << " " << j;
                return;
            }
            else if(-v[i]-v[j]==x){
                cout << -i << " " << -j;
                return;
            }
        }
    }
    cout << "-1 -1";r
    return;
}


int main(){
    fastio
    ll tc=1; //cin >> tc;
    while(tc--) __sol();
    return 0;
}

Compiler output:
a.cc: In function 'void __sol()':
a.cc:56:21: error: 'r' was not declared in this scope
   56 |     cout << "-1 -1";r
      |                     ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef long double ld;
#define rep(i,n) for(ll i=0;i<(n);i++)
#define init(a,i) for(int k=0;k<(i);k++)(a)[k]=0
#define in(a,i) for(int k=0;k<(i);k++)cin>>(a)[k]
#define all(a)  (a).begin(),(a).end()
#define mod 1000000007
#define inf 2147483647
#define range(x,a,b) (a)<=x&&x<=(b)
ll pow5(ll a)return a*a*a*a*a;
int main(){
	int x;
	cin>>x;
	ll a,b,remainder=1;
	while(1){
		a=1;
		b=a-remainder;
		while(pow5(a)-pow5(b)<=x){
			if(pow5(a)-pow5(b)==x){
				cout<<a<<" "<<b;
				return 0;
			}
			a++;
			b++;
		}
		remainder++;
	}
	return 0;
}

Compiler output:
a.cc: In function 'll pow5(ll)':
a.cc:12:14: error: named return values are no longer supported
   12 | ll pow5(ll a)return a*a*a*a*a;
      |              ^~~~~~
a.cc:16:12: error: declaration of 'll a' shadows a parameter
   16 |         ll a,b,remainder=1;
      |            ^
a.cc:12:12: note: 'll a' previously declared here
   12 | ll pow5(ll a)return a*a*a*a*a;
      |         ~~~^
Language: C++

ll A[100];
ll x;



int main(){
  ll x;
  cin >> x;
  for(int i=0;i<1000;i++){
    A[i] = i*i*i*i*i;
  }
  for(int i=0;i<100;i++){
    for(int j=0;j<100;j++){
      ll num = A[i] + A[j];
      if(num==x){
        cout <<  i << " " << -j << endl;
        return 0;
      }
      num = A[i] - A[j];
      if(num==x){
        cout <<  i << " " << j << endl;
        return 0;
      }
    }
  } 
}

Compiler output:
a.cc:1:1: error: 'll' does not name a type
    1 | ll A[100];
      | ^~
a.cc:2:1: error: 'll' does not name a type
    2 | ll x;
      | ^~
a.cc: In function 'int main()':
a.cc:7:3: error: 'll' was not declared in this scope
    7 |   ll x;
      |   ^~
a.cc:8:3: error: 'cin' was not declared in this scope
    8 |   cin >> x;
      |   ^~~
a.cc:8:10: error: 'x' was not declared in this scope
    8 |   cin >> x;
      |          ^
a.cc:10:5: error: 'A' was not declared in this scope
   10 |     A[i] = i*i*i*i*i;
      |     ^
a.cc:14:9: error: expected ';' before 'num'
   14 |       ll num = A[i] + A[j];
      |         ^~~~
      |         ;
a.cc:15:10: error: 'num' was not declared in this scope; did you mean 'enum'?
   15 |       if(num==x){
      |          ^~~
      |          enum
a.cc:16:9: error: 'cout' was not declared in this scope
   16 |         cout <<  i << " " << -j << endl;
      |         ^~~~
a.cc:16:36: error: 'endl' was not declared in this scope
   16 |         cout <<  i << " " << -j << endl;
      |                                    ^~~~
a.cc:19:7: error: 'num' was not declared in this scope; did you mean 'enum'?
   19 |       num = A[i] - A[j];
      |       ^~~
      |       enum
a.cc:19:13: error: 'A' was not declared in this scope
   19 |       num = A[i] - A[j];
      |             ^
a.cc:21:9: error: 'cout' was not declared in this scope
   21 |         cout <<  i << " " << j << endl;
      |         ^~~~
a.cc:21:35: error: 'endl' was not declared in this scope
   21 |         cout <<  i << " " << j << endl;
      |                                   ^~~~
Language: C++

#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#define rep(i,n) for(int i=0;i<n;i++)
using namespace std;
typedef long long ll;
const ll mod = 1000000007;
const int INF = 1001001001;

ll pow_mod(ll x, ll y) {
	ll res = 1;
	rep(i, y) res = res * x % mod;
	return res;
}

int main() {
	ll x;
	cin >> x;
	for (int a = -120; a < 120; a++) {
		for (int b = a - 30; b < a; b++) {
			if (pow(a, 5) - pow(b, 5) == x) {
				cout << a << " " << b << endl;
				return 0;
			}
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:29: error: 'pow' was not declared in this scope
   22 |                         if (pow(a, 5) - pow(b, 5) == x) {
      |                             ^~~
Language: C++

x = int(input())
for i in range(1000):
    for j in range(i):
        if i ** 5 - j ** 5 == x:
            print(i, j)
            exit()
        if i ** 5 + j ** 5 == x:
            print(i, -j)
            exit()


Compiler output:
a.cc:1:1: error: 'x' does not name a type
    1 | x = int(input())
      | ^
Language: C++

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

int main(){

    ll x;
    cin>>x;
    for(ll i=0;;i++){
        float num = pow(x+pow(i,5),0.2);
        //ll res = pow(x-pow(i,5),0.2)/1;
        if(floor(num) == num){
            cout<<num<<" "<<i;
            break;
        }
        float num2 = pow(x+pow(-i,5),0.2);
        //ll res2 = pow(x-pow(-i,5),(1/5))/1;
        if(floor(num2) == num2){
            cout<<num2<<" "<<-i;
            break;
        }
    }
    return 0;


Compiler output:
a.cc: In function 'int main()':
a.cc:23:14: error: expected '}' at end of input
   23 |     return 0;
      |              ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: C++

int main() {
    ll X;
    cin >> X;
    for (ll a = 0; a <= 120; a++) {
        for (ll b = -120; b < a; b++) {
            if ((a * a * a * a * a - b * b * b * b * b) == X) {
                cout << a << " " << b << endl;
                return 0;
            }
        }
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:2:5: error: 'll' was not declared in this scope
    2 |     ll X;
      |     ^~
a.cc:3:5: error: 'cin' was not declared in this scope
    3 |     cin >> X;
      |     ^~~
a.cc:3:12: error: 'X' was not declared in this scope
    3 |     cin >> X;
      |            ^
a.cc:4:12: error: expected ';' before 'a'
    4 |     for (ll a = 0; a <= 120; a++) {
      |            ^~
      |            ;
a.cc:4:20: error: 'a' was not declared in this scope
    4 |     for (ll a = 0; a <= 120; a++) {
      |                    ^
a.cc:5:16: error: expected ';' before 'b'
    5 |         for (ll b = -120; b < a; b++) {
      |                ^~
      |                ;
a.cc:5:27: error: 'b' was not declared in this scope
    5 |         for (ll b = -120; b < a; b++) {
      |                           ^
a.cc:7:17: error: 'cout' was not declared in this scope
    7 |                 cout << a << " " << b << endl;
      |                 ^~~~
a.cc:7:42: error: 'endl' was not declared in this scope
    7 |                 cout << a << " " << b << endl;
      |                                          ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll = int64_t;
int main() {
    ll X;
    cin >> X;
    for (ll a = 0; a <= 120; a++) {
        for (ll b = -120; b <= a; b++) {
            if (calc(a, b) == X) {
                cout << a << " " << b << endl;
                return 0;
            }
        }
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:17: error: 'calc' was not declared in this scope
    9 |             if (calc(a, b) == X) {
      |                 ^~~~
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(long long i=0; i<n; i++)
#define Rep(i,n) for(long long i=1; i<n; i++)
#define ll long long
#include <math.h>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <numeric>
#include <queue>
#include <set>
#include <vector>


using namespace std;
#define PI acos(-1)
using P =pair<int,int>;

ll f(ll x,ll c,ll d){
    ll res =x;
    res -=x/c;
    res -=x/d;
    res+= x/lcm(c,d);
    return res;
}

int main(){
  ll x;
  cin>>x;
  Rep(i,10000){
      for(ll j=-10000;j<10000;j++){
               if(pow(i,5)-pow(j,5)==x){
                   cout<<i<<" "<<j<<endl;
                   return 0;
               }
      }
     
      
  }
   　
}


Compiler output:
a.cc:40:4: error: extended character 　 is not valid in an identifier
   40 |    　
      |    ^
a.cc: In function 'int main()':
a.cc:40:4: error: '\U00003000' was not declared in this scope
   40 |    　
      |    ^~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
    long long int x;
    cin >> x;
    for (int i = -500; i <= 500; i++)
    {
        for (int j = -500; j <= 500; j++)
        {
            if (pow(i, 5) -pow( j,5)) == x)
            {
                cout << i << " " << j << endl;
                return 0;
            }
        }
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:39: error: expected primary-expression before '==' token
   11 |             if (pow(i, 5) -pow( j,5)) == x)
      |                                       ^~
Language: Java

import java.util.Scanner;
 
public class Main {
	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int N = s.nextInt();
		solve(N);
	}
	public void solve(int N) {
		for (int i = -120; i <120 ; i++) {
			for (int j = -120; j < 120; j++) {
				long ans = i*i*i*i*i - j*j*j*j*j;
				if (ans == N) {
					System.out.println(i +" " + j);
					return;
				}
			}
		}
		return;
	}
}

Compiler output:
Main.java:7: error: non-static method solve(int) cannot be referenced from a static context
		solve(N);
		^
1 error