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

#include <bits/stdc++.h>
using namespace std;
int main()
{
  int n,k;
  cin>>n>>k;
  int a[n+1]={0}
  for(int i=0;i<k;i++)
  {
    int d;
    cin>>d;
    for(int j=0;j<d;j++)
    {
      int x;
      cin>>x;
      a[x]++;
    }
  }
  int ans=0;
  for(int i=1;i<=n;i++)
  {
    if(a[i]==0)
      ans++;
  }
  cout<<ans;
  return 0;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: expected ',' or ';' before 'for'
    8 |   for(int i=0;i<k;i++)
      |   ^~~
a.cc:8:15: error: 'i' was not declared in this scope
    8 |   for(int i=0;i<k;i++)
      |               ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  int  n, k, ans=0;
  cin >> n >> k;
  vector<bool> check(n);
  for(int i=0;i<n;i++){
    check[i]=0;
  }
  for(int i=0;i<k;i++){
    cin >> d;
    vector<int> a(d);
    for(int j=0;j<d;j++){
      cin >> a[j];
      if(check[a[j]] == 0){
        check[a[j]] =1;
      }
    }
  }
  for(int i=0;i<n;i++){
    if(check[i]==0){
      ans++;
    }
  }
  
  
  cout << ans <<endl;
}

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

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

typedef long long ll;
typedef vector<int> vi;

int main()
{
	int n, k;
	cin >> n >> k;

	vi snuke(n, 0);

	for (int i = 0; i < k; i++) {
		int d;
		cin >> d;
		for (int j = 0; j < d; j++) {
			int a;
			cin >> a;
			snuke[a - 1]++;
		}
	}

	int sum = 0;

	for (int i = 0; i < n; i++) {
		if (snuke[i] == 0) {
			sum++;
		}
	}

	cout << sum << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: 'cin' was not declared in this scope
   11 |         cin >> n >> k;
      |         ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include <algorithm>
  +++ |+#include <iostream>
    3 | using namespace std;
a.cc:33:9: error: 'cout' was not declared in this scope
   33 |         cout << sum << endl;
      |         ^~~~
a.cc:33:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:33:24: error: 'endl' was not declared in this scope
   33 |         cout << sum << endl;
      |                        ^~~~
a.cc:3:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    2 | #include <algorithm>
  +++ |+#include <ostream>
    3 | using namespace std;
Language: C++

#include <iostream>

using namespace std;

int main(void) {

  int n, k;
  cin >> n >> k;
  
  vector<int> okashi(n);
  
  int tmp;
  
  for (int i = 0;i < k;i++) {
    int d;
    cin >> d;
    for (int j = 0;j < d;j++) {
      cin >> tmp;
      okashi[tmp]++;
    }
  }
  
  int ans = 0;
  for (int i = 0;i < n;i++) {
    if (okashi[i] == 0) ans++;
  }
  
  cout << ans << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: 'vector' was not declared in this scope
   10 |   vector<int> okashi(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 | 
a.cc:10:10: error: expected primary-expression before 'int'
   10 |   vector<int> okashi(n);
      |          ^~~
a.cc:19:7: error: 'okashi' was not declared in this scope
   19 |       okashi[tmp]++;
      |       ^~~~~~
a.cc:25:9: error: 'okashi' was not declared in this scope
   25 |     if (okashi[i] == 0) ans++;
      |         ^~~~~~
Language: Java

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.HashSet;
import java.util.StringTokenizer;
import java.util.Set;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author koneko096
 */
public class Main {
  public static void main(String[] args) {
    InputStream inputStream = System.in;
    OutputStream outputStream = System.out;
    InputReader in = new InputReader(inputStream);
    PrintWriter out = new PrintWriter(outputStream);
    BTrickOrTreat solver = new BTrickOrTreat();
    solver.solve(1, in, out);
    out.close();
  }

  static class BTrickOrTreat {
    public void solve(int testNumber, InputReader in, PrintWriter out) {
      Set<Integer> S = new HashSet<>();

      int n = in.nextInt(), k = in.nextInt();
      for (int i = 0; i < k; i++) {
        int d = in.nextInt();
        for (int j = 0; j < d; j++) {
          S.add(in.nextInt());
        }
      }

      out.println(n - S.size());
    }

  }


  static class InputReader {
    private BufferedReader reader;
    private StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
      reader = new BufferedReader(new InputStreamReader(stream), 32768);
      tokenizer = null;
    }

    public String next() {
      while (tokenizer == null || !tokenizer.hasMoreTokens()) {


Compiler output:
Main.java:58: error: reached end of file while parsing
      while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                                                               ^
1 error
Language: C++

using namespace std;

signed main() {
  int n, k;
  cin >> n >> k;
  bool sunuke[100] = {0};
  int count = n;
  for(int i = 0; i < k; i++){
    int d;
    cin >> d;
    for(int j = 0; j < d; j++){
      int a;
      cin >> a;
      if(!sunuke[a]){
        count--;
        sunuke[a] = true;
      }
    }
  }

  cout << count << endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin >> n >> k;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:21:3: error: 'cout' was not declared in this scope
   21 |   cout << count << endl;
      |   ^~~~
a.cc:21:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:21:20: error: 'endl' was not declared in this scope
   21 |   cout << count << endl;
      |                    ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
Language: C++

#include <bits/stdc++.h>
using ll = long long;
using namespace std;
#define rep(i,n) for(int i=0, i##_len=(int)(n); i<i##_len; i++)
#define reps(i,n) for(int i=1 , i##_len=(int)(n);i<=i##_len;i++)
#define rrep(i,n) for(int i=((int)(n)-1);i>=0;i--)
#define rreps(i,n) for(int i=((int)(n));i>0;i--)
#define all(x) (x).begin(), (x).end()
#define F first
#define S second
#define mp make_pair
#define pb push_back
#define solve(a) ((a)?"Yes":"No")
typedef vector<long long> V;
typedef vector<V> VV;
typedef pair<long long , long long> P;
typedef vector<P> VP;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1;} return 0;}
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1;} return 0;}
const long long INFLL = 1LL<<62;
const int INF = 1<<30;
const double PI=acos(-1);
int main(){
	int n,k;
	cin >>n>>k;
	set<int>ans;
	int ansv=0;
	int d;
	int bef;
//	vector<vector<int>>a(k);
	rep(i,k){
		cin>>d;
		rep(i,d){
			cin>>bef;
			//a[i].push_back(bef);
			ans.insert(bef);
		}
	}
	for(int i=1;i<=n;i++){
		if()
			if (ans.lower_bound(i) ==ans.end() or *ans.lower_bound(i) != i)
			{
				ansv++;
			}
	}
	cout<<ansv<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:40:20: error: expected primary-expression before ')' token
   40 |                 if()
      |                    ^
Language: C++

#include<bits\stdc++.h>
using namespace std;
int main(){
 int n,k;
  cin>>n>>k;
  int a[n+1]={0};
  for(int i=0;i<k;i++){
   int d;
    cin>>d;
    for(int i=0;i<d;i++){
     int x;
      cin>>x;
      a[x]++;
    }
  }
   int count=0;
  for(int i=1;i<=n;i++)
  {
    if(a[i]==0)
      count++;
  }
  cout<<count<<"\n";
}

Compiler output:
a.cc:1:9: fatal error: bits\stdc++.h: No such file or directory
    1 | #include<bits\stdc++.h>
      |         ^~~~~~~~~~~~~~~
compilation terminated.
Language: C

#include <iostream>
#include <algorithm>
#include <cmath>
#include <vector>
#include <queue>
#include <set>
#include <map>

#define rep(i,n) for(int i=0;i<n;i++)
#define ll long long int
#define MAX 1000000007

using namespace std;

struct UnionFind{
  vector<int> par,num;

  UnionFind(int N) : par(N),num(N){
    for(int i=0;i<N;i++){
      par[i] = i;
      num[i] = 1;
    }
  }

  int root(int x){
    if(par[x] == x) return x;
    return par[x] = root(par[x]);
  }

  void unite(int x, int y){
    int rx = root(x);
    int ry = root(y);
    if(rx == ry) return;
    par[rx] = ry;
    num[ry] = num[ry]+num[rx]; 
  }

  int get_num(int x){
    int rx = root(x);
    return num[rx];
  }

  bool same(int x, int y){
    int rx = root(x);
    int ry = root(y);
    return rx == ry;
  }
};


int main(void){
  int n,k;
  cin >> n >> k;
  int flag[n+1];

  rep(i,n){
    flag[i+1] = false;
  }

  rep(i,k){
    int d;
    cin >> d;
    rep(j,d){
      int work;
      cin >> work;
      flag[work] = true;
    }
  }

  int cnt = 0;
  rep(i,n){
    if(flag[i+1] == false)cnt++;
  }

  cout << cnt << endl;
  return 0;
}


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

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n,k;
  cin>>n>>K;
  vector<int>a(n);
  for(int i=0;i<n;i++){
    a[i]=0;
  }
  for(int i=0;i<k;i++){
    int d;
    cin>>d;
    for(int j=0;j<d;j++){
      int o;
      cin>>o;
      a[o-1]++;
    }
  }
  int s=-3;
  for(int i=0;i<n;i++){
if(a[i]==0){
  s=i;
  break;
}
  }
  if(s>-3){
    cout<<s+1;
  }
  else{
    cout<<0;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:11: error: 'K' was not declared in this scope
    5 |   cin>>n>>K;
      |           ^
Language: C++

#include <bits/stdc++.h>
#define REP(i, n) for(int i=0; i<(int)(n); i++)
#define REP1(i,a,b) for(int i=a; i<=(int)(b); i++)
#define ALL(x) begin(x),end(x)
#define PB push_back
using namespace std;
typedef int64_t LL;
typedef vector<int> VI;
typedef pair<int,int> PII;

template<class T> inline bool chmax( T &a, const T &b ) { return b>a ? a=b,true : false; }
template<class T> inline bool chmin( T &a, const T &b ) { return b<a ? a=b,true : false; }
template<class T> using MaxHeap = priority_queue<T>;
template<class T> using MinHeap = priority_queue<T, vector<T>, greater<T>>;
template<class T, class F=less<T>> void sort_uniq( vector<T> &v, F f=F() ) {
    sort(begin(v),end(v),f);
    v.resize(unique(begin(v),end(v))-begin(v));
}

int main() {
    ios::sync_with_stdio(0);
    cin.tie(0);
    
    int n, k;
    vector<bool> a(n);
    for ( int i=0; i<k; i++ ) {
        int d;
        cin >> d;
        for ( int j=0; j<d; j++ ) {
            int b;
            cin >> b;
            a[b]=1;
        }
    }
    int ans=0;
    REP(i,n) {
        if ( a[i]==0-) ans++;
    }
    cout << ans << '\n';
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:37:22: error: expected primary-expression before ')' token
   37 |         if ( a[i]==0-) ans++;
      |                      ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define se second
#define fi first
#define ll long long
#define ld long double
#define pll pair<ll ,ll >
#define plll pair<ll,pll>
#define ppll pair<pll, pll>
#define pii pair<int, int> 
#define pb push_back
#define mod 1000000007
#define N 2000007
ll power(ll a,ll b){
    ll res=1ll;
    while(b>0){
        if(b%2!=0) res=(res*a)%mod;
        a=(a*a)%mod;
        b/=2;
    }
    return res%mod;
}
ll ncr(ll n,ll k){
    if(k>n-k) k=n-k;
    ll pro=1;
    for(ll i=0;i<k;i++){
        pro=(pro*(n-i))%mod;
        pro/=(i+1);
    }
    return (pro)%mod;
}

void swap(ll *a,ll *b) {
    ll temp=*a;
    *a=*b;
    *b=temp;
}
vector<ll> prime;
void seive(){
    vector<bool > isprime(1000001,true);
    for(int i=2;i*i<=1000000;i++){
        if(isprime[i]){
            for(int j=i*i;j<=1000000;j+=i){
                isprime[j]=false;
            }
        }
    }
    for(int i=2;i<=1000000;i++){
        if(isprime[i]) prime.push_back(i);
    }
}
vector<ll> parent;
ll find(ll p) {
    if(parent[p]==p) return parent[p];
    return parent[p]=find(parent[p]); 
}
void unun(ll a,ll b) {
    ll r1=find(a);
    ll r2=find(b);
    if(r1!=r2) parent[r2]=r1;
}
void solve() {
    ll n,k,a;
    cin>>n>>k;
    vector<ll> freq(n+1);
    for(int i=0;i<k;i++) {
        cin>>x;
        for(int i=0;i<x;i++) {
            cin>>a;
            freq[a]++;
        }
    }
    ll ans=0;
    for(int i=1;i<=n;i++) {
        if(freq[i]==0) ans++;
    }
    cout<<ans;
}   


int main(void){
    ios_base::sync_with_stdio(false); 
    cin.tie(NULL);
    cout.tie(NULL);
    int t;
    t=1;
    // cin>>t;
    while(t--) {
        solve();
        // cout<<endl;
    }
    return 0; 

}


Compiler output:
a.cc: In function 'void solve()':
a.cc:67:14: error: 'x' was not declared in this scope
   67 |         cin>>x;
      |              ^
Language: C

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

typedef long long ll;
typedef pair<int,int> pii;

long long MOD = 1000000000 + 7;

int main(){
  cout << setprecision(10);
  int N,K;
  cin >> N >> K;
  map<int, int> m;
  for(int i = 1; i <= N; i++){
    m[i] = 0;
  }
  for(int i = 0; i < K; i++){
    int tmp;
    cin >> tmp;
    for(int j = 0; j < tmp; j++){
      int tmp2;
      cin >> tmp2;
      m[tmp2]++;
    }
  }

  int ans = 0;
  for(auto x: m){
    if(x.second == 0) ans++;
  }
  cout << ans << endl;

}


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

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

int arr[maxn];
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

void solve()
{
	cin >> a >> b;
	int cnt[a + 50] = {0};
	for(int i=0; i<b; i++)
	{
		int t; cin >> t;
		for(int j=0; j<t; j++)
		{
			int tt; cin >> tt;
			cnt[tt] ++;
		}
	}
	int ans = 0;
	for(int i=1; i<=a; i++)
	{
		if(cnt[i] == 0) 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: C++

#include<iostream>
#include<algorithm>
#include<vector>
#include<cmath>
#include<utility>
#include<cstdio>
#include<set>
#include<string>
#include<map>
#include<queue>
#include<stack>
#include <bitset>
using namespace std;
const int mod=1e9+7;
#define rep(i,n) for(int i=0;i<n;i++)
#define rep2(i,x,n) for(int i= x;i<n;i++)
#define all(v) v.begin(), v.end()
#define nepe(v) next_permutation(all(v))
#define F first 
#define S second
#define PB push_back 
#define MP make_pair
using ll = long long;
using vi = vector<int>; 
using vvi = vector<vi>;
using vl=vector<long long>;
using vp =vector<pair<int,int>>;

typedef pair<int,int> P;
string s;
int k; 
ll INF = 10000000000000000;

int main(){
    int N,K;
    cin >>N>>K;
    vi su(N,0);
    rep(i,K){
        int d;
        cin >>d;
        rep(i,d){
            int A;
            cin >>A;
            su[A-1]=1;
        }
    }
    int ans=0;
    rep(i,N){
        if(su[i]==0) ans++;
    }
    cout <<ans<<endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:51:22: error: expected '}' at end of input
   51 |     cout <<ans<<endl;
      |                      ^
a.cc:34:11: note: to match this '{'
   34 | int main(){
      |           ^
Language: C++

#include <bits/stdc++.h>
#define REP(i, n) for(int i=0; i<(int)(n); i++)
#define REP1(i,a,b) for(int i=a; i<=(int)(b); i++)
#define ALL(x) begin(x),end(x)
#define PB push_back
using namespace std;
typedef int64_t LL;
typedef vector<int> VI;
typedef pair<int,int> PII;

template<class T> inline bool chmax( T &a, const T &b ) { return b>a ? a=b,true : false; }
template<class T> inline bool chmin( T &a, const T &b ) { return b<a ? a=b,true : false; }
template<class T> using MaxHeap = priority_queue<T>;
template<class T> using MinHeap = priority_queue<T, vector<T>, greater<T>>;
template<class T, class F=less<T>> void sort_uniq( vector<T> &v, F f=F() ) {
    sort(begin(v),end(v),f);
    v.resize(unique(begin(v),end(v))-begin(v));
}

int main() {
    ios::sync_with_stdio(0);
    cin.tie(0);
    
    int n, k;
    vector<bool> a(n);
    for ( int i=0; i<k; i++ ) {
        int d;
        cin >> d;
        for ( int j=0; j<d; j++ ) {
            int b;
            cin >> b;
            a[b]=1;
        }
    }
    int ans=0;
    REP(i,n) {
        if ( a[i]==0- ) ans++;
    }
    cout << ans << '\n';
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:37:23: error: expected primary-expression before ')' token
   37 |         if ( a[i]==0- ) ans++;
      |                       ^
Language: Java

import java.util.Scanner;

import javafx.scene.media.Media;

public class Main{
    public static Scanner scan  = new Scanner(System.in);
    public static void main(String[]args){
        int n,k,d;
        n=nextInt();
        k=nextInt();
        d=nextInt();
        print(n-d);
    }



    public static int nextInt(){
        return Integer.parseInt(scan.next());
    }
    public static long nextLong(){
        return Long.parseLong(scan.next());
    }
    public static String next(){
        return scan.next();
    }
    public static double nextDouble(){
        return Double.parseDouble(scan.next());
    }
    public static float nextFloat(){
        return Float.parseFloat(scan.next());
    }

    //Yes or No
    public static void yesNo(boolean flag){
        if(flag) System.out.println("Yes");
        else System.out.println("No");
    }
    public static void print(Object a){
        System.out.println(a);
    }
}

Compiler output:
Main.java:3: error: package javafx.scene.media does not exist
import javafx.scene.media.Media;
                         ^
1 error
Language: C++

#include <bits/stdc++.h>

using namespace std;
using ll = long long;

int main() {
    int n;
    int k;
    cin>>n>>k;
    vector<bool> ans(n,false);
    for(int i = 0;i < k;++i) {
        cin>>d;
        for(int j = 0;j < d;++j) {
            int a;
            cin>>a;
            --a;
            ans[a]=true;
        }
    }
    int a=0;
    for(int i = 0;i < n;++i) {
        if(!ans[i])++a;
    }
    cout<<a<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:14: error: 'd' was not declared in this scope
   12 |         cin>>d;
      |              ^
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.at(i);
  vector<bool> good(N+1,true);
  int count=N;
  for(int j=0;j<M;j++){
    int a,b;cin>>a>>b;
    if(H.at(a)>=H.at(b) && good.at(b)){
      good.at(b)=false;
      count--;
    }
    if(H.at(a)<=H.at(b) && good.at(a)){
      good.at(a)=false;
      count--;
    }
  }
  cout<<count<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:21: error: expected primary-expression before ')' token
    6 |   vector<int> H(N+1,);
      |                     ^
Language: C++

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

int main(){
 int n,m,a,b,count=0;
 cin >> n >> m;
 vector<int> h(n);
 cin >> h[i];
 vector<bool> ok(n,true);
 rep(i,m){
  cin >> a >> b;
  if(h[a]<h[b]) ok[a]=false;
  else ok[b]=false;
 }
  rep(i,n) if(ok[i]==true) count++;
  cout << count << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:11: error: 'i' was not declared in this scope
   10 |  cin >> h[i];
      |           ^
Language: C++

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

int main(){
 int n,m,a,b,count=0;
 cin >> n >> m;
 vector<int> h(n);
 vector<bool> ok(n,true);
 rep(i,m){
  cin >> a >> b;
  if(h[a]<h[b]) ok[a]=false;
  else ok[b]=false
 }
  rep(i,n) if(ok[i]==true) count++;
  cout << count << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:19: error: expected ';' before '}' token
   14 |   else ok[b]=false
      |                   ^
      |                   ;
   15 |  }
      |  ~
Language: C++

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

int main(){
 int n,m,a,b,count=0;
 cin >> n >> m;
 vector<int> h(n);
 vector<bool> ok(n,true);
 rep(i,m){
  cin >> a >> b;
  if(h[a]<h[b]) ok(a)=false;
  else ok(b)=false
 }
  rep(i,n) if(ok(i)==true) count++;
  cout << count << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:19: error: no match for call to '(std::vector<bool>) (int&)'
   13 |   if(h[a]<h[b]) ok(a)=false;
      |                 ~~^~~
a.cc:14:10: error: no match for call to '(std::vector<bool>) (int&)'
   14 |   else ok(b)=false
      |        ~~^~~
a.cc:16:17: error: no match for call to '(std::vector<bool>) (int&)'
   16 |   rep(i,n) if(ok(i)==true) count++;
      |               ~~^~~
Language: C++

#include<iostream>
#include<stdio.h>
using namespace std;
using ll=long long;
#include<algorithm>
#include<set>
#include<vector>
#define rep(i,n) for(int i=0;i<(n);i++)
using P=pair<int,int>;
const int mod=1000000007;

int main(){
  int n,m,a,b,h[n];
cin>>n>>m;
rep(i,n)cin>>h[i];
rep(i,m){
  cin>>a>>b;
  if(h[a]>h[b]) h[b]=0;
  if(h[b]>h[a]) h[a]=0;
}
int sum=0;
rep(i,n){
  if(h[i]>0)sum++
}
cout<<sum<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:18: error: expected ';' before '}' token
   23 |   if(h[i]>0)sum++
      |                  ^
      |                  ;
   24 | }
      | ~
Language: C++

int main()
{
  printf("3\n);
         }

Compiler output:
a.cc:3:10: warning: missing terminating " character
    3 |   printf("3\n);
      |          ^
a.cc:3:10: error: missing terminating " character
    3 |   printf("3\n);
      |          ^~~~~~
a.cc: In function 'int main()':
a.cc:4:10: error: expected primary-expression before '}' token
    4 |          }
      |          ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(void){
    [[maybe_unused]] long long int n,m,i=0,j,c=0,h[100010],a[100010],b[100010],x[100010],ans=0;
    cin >> n >> m;
    for(i=0;i<n;i++)
    {
        cin >> h[i];
        x[i]=0;
    }
    for(i=0;i<m;i++)
    {
        cin >> a[i] >> b[i];
        if(h[a[i]-1]>h[b[i]-1])
        {
            x[b[i]-1]=1;
        }
        if(h[a[i]-1]<h[b[i]-1])
        {
            x[a[i]-1]=1;
        }        
        else
        {
            x[a[i]-1]=1;
            x[b[i]-1]=1;
        }
    }
    for(i=0;i<n;i++)
    {
        if(x[i]==0)
        {
            ans++;
        }
    }
    cout << ans << endl;
 
    return 0;

}
#include <bits/stdc++.h>
using namespace std;
int main(void){
    [[maybe_unused]] long long int n,m,i=0,j,c=0,h[100010],a[100010],b[100010],x[100010],ans=0;
    cin >> n >> m;
    for(i=0;i<n;i++)
    {
        cin >> h[i];
        x[i]=0;
    }
    for(i=0;i<m;i++)
    {
        cin >> a[i] >> b[i];
        if(h[a[i]-1]>h[b[i]-1])
        {
            x[b[i]-1]=1;
        }
        if(h[a[i]-1]<h[b[i]-1])
        {
            x[a[i]-1]=1;
        }        
        else
        {
            x[a[i]-1]=1;
            x[b[i]-1]=1;
        }
    }
    for(i=0;i<n;i++)
    {
        if(x[i]==0)
        {
            ans++;
        }
    }
    cout << ans << endl;
 
    return 0;

}


Compiler output:
a.cc:42:5: error: redefinition of 'int main()'
   42 | int main(void){
      |     ^~~~
a.cc:3:5: note: 'int main()' previously defined here
    3 | int main(void){
      |     ^~~~
Language: C++

#include<iostream>
#include<vector>
#include<math.h>
#include<algorithm>
using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:17:8: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   17 |     max[a] = max(ma[a],h[b]);
      |        ^
a.cc:18:8: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   18 |     max[b] = max(ma[b],h[a]);
      |        ^
a.cc:24:11: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   24 |     if(max[i]<h[i]){
      |           ^
Language: C++

#include<iostream>
#include<vector>
#include<math.h>
using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:16:8: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   16 |     max[a] = max(ma[a],h[b]);
      |        ^
a.cc:17:8: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   17 |     max[b] = max(ma[b],h[a]);
      |        ^
a.cc:23:11: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   23 |     if(max[i]<h[i]){
      |           ^
Language: C++

#include<iostream>
#include<vector>
#include<math.h>
using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:16:17: error: 'max' cannot be used as a function
   16 |     max[a] = max(max[a],h[b]);
      |              ~~~^~~~~~~~~~~~~
a.cc:17:17: error: 'max' cannot be used as a function
   17 |     max[b] = max(max[b],h[a]);
      |              ~~~^~~~~~~~~~~~~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:15:17: error: 'max' cannot be used as a function
   15 |     max[a] = max(max[a],h[b]);
      |              ~~~^~~~~~~~~~~~~
a.cc:16:17: error: 'max' cannot be used as a function
   16 |     max[b] = max(max[b],h[a]);
      |              ~~~^~~~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
#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() {
    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;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:17: error: 'N' was not declared in this scope
    8 |     int n, m, h[N], ma[N];
      |                 ^
a.cc:11:16: error: 'h' was not declared in this scope
   11 |         cin >> h[i];
      |                ^
a.cc:12:9: error: 'ma' was not declared in this scope; did you mean 'm'?
   12 |         ma[i] = 0;
      |         ^~
      |         m
a.cc:17:9: error: 'ma' was not declared in this scope; did you mean 'a'?
   17 |         ma[a] = max(ma[a], h[b]);
      |         ^~
      |         a
a.cc:17:28: error: 'h' was not declared in this scope
   17 |         ma[a] = max(ma[a], h[b]);
      |                            ^
a.cc:22:16: error: 'h' was not declared in this scope
   22 |         ans += h[i] > ma[i];
      |                ^
a.cc:22:23: error: 'ma' was not declared in this scope; did you mean 'm'?
   22 |         ans += h[i] > ma[i];
      |                       ^~
      |                       m
Language: C++

#include<iostream>

using namespace std;

int main(){
  int n,m;
  cin >> n >> m;
  int h(n);
  int a(n),b(n);
  for(int i=0;i<m;i++){
    cin >> a[i] >> b[i];
  }
  
  bool flag;
  int count=0;
  
  for(int i=0;i<n;i++){
    flag = true;
    for(int j=0;j<m;j++){
      if(i+1 == a[j]){
        cout << h[i] << endl;
        if(h[i] < h[b[j]-1]){
          flag = false;
          break;
        }
      }if(i+1 == b[j]){
        if(h[i] < h[a[j]-1]){
          flag = false;
          break;
        }
      }
    }
    if(flag) count++;
  }
  
  cout << count << endl;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:13: error: invalid types 'int[int]' for array subscript
   11 |     cin >> a[i] >> b[i];
      |             ^
a.cc:11:21: error: invalid types 'int[int]' for array subscript
   11 |     cin >> a[i] >> b[i];
      |                     ^
a.cc:20:18: error: invalid types 'int[int]' for array subscript
   20 |       if(i+1 == a[j]){
      |                  ^
a.cc:21:18: error: invalid types 'int[int]' for array subscript
   21 |         cout << h[i] << endl;
      |                  ^
a.cc:22:13: error: invalid types 'int[int]' for array subscript
   22 |         if(h[i] < h[b[j]-1]){
      |             ^
a.cc:22:22: error: invalid types 'int[int]' for array subscript
   22 |         if(h[i] < h[b[j]-1]){
      |                      ^
a.cc:26:19: error: invalid types 'int[int]' for array subscript
   26 |       }if(i+1 == b[j]){
      |                   ^
a.cc:27:13: error: invalid types 'int[int]' for array subscript
   27 |         if(h[i] < h[a[j]-1]){
      |             ^
a.cc:27:22: error: invalid types 'int[int]' for array subscript
   27 |         if(h[i] < h[a[j]-1]){
      |                      ^
Language: C++

n,m=map(int,input().split())
way=[[] for i in range(n)]
H = list(map(int,input().split()))
for i in range(m):
    a,b=map(int,input().split())
    way[a-1].append(b-1)
    way[b-1].append(a-1)

for i in range(n):
    way[i]=list(set(way[i]))

ans=0
for i in range(n):
    high=True
    for j in way[i]:
        if H[i]<=H[j]:
            high=0
            break
    if high:
        ans+=1
print(ans)

Compiler output:
a.cc:1:1: error: 'n' does not name a type
    1 | n,m=map(int,input().split())
      | ^
Language: C

#include<stdio.h>
int main(){
	int n,m,i,a,b,ans;
	scanf("%d %d",&n,&m);
	int h[n];
	int count[n];
	for(i=1;i<=n;i++){
	scanf("%d",&h[i]);
	count[i]=1;
	}
	for(i=1;i<=m;i++){
		scanf("%d %d",&a,&b);
		if(h[a]>=h[b]){
			count[b]=0;
		}
		if(h[a]<=h[b])
		count[a]=0;
	}
	int count=0;
	for(i=1,ans=0;i<=n;i++){
		if(count[i]==1)
		ans++;
	}
	printf("%d",ans);
}


Compiler output:
main.c: In function 'main':
main.c:19:13: error: conflicting types for 'count'; have 'int'
   19 |         int count=0;
      |             ^~~~~
main.c:6:13: note: previous declaration of 'count' with type 'int[n]'
    6 |         int count[n];
      |             ^~~~~
Language: C

#include<stdio.h>
int main(void){
  int n,m,i,ans;
  scanf("%d %d",&n,&m);
  int h[n+1],count[n+1],a,b;
  for(i=1;i<n+1;i++)scanf("%d",&h[i]);count[i]=1;
  for(i=1;i<m+1;i++){
    scanf("%d %d",&,&b);
    if(h[a]>h[b])count[b]=0;
    if(h[a]==h[b])count[b]=0;count[a]=0;
    if(h[a]<h[b]) count[a]=0;
  }
  for(i=1,ans=0;i<n+1;i++)ans=ans+count[i];
  printf("%d\n",ans);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:8:20: error: expected expression before ',' token
    8 |     scanf("%d %d",&,&b);
      |                    ^
Language: C

#include<stdio.h>
int main(void){
  int n,m,i,ans;
  scanf("%d %d",&n,&m);
  int h[n+1],count[n+1],a,b;
  for(i=1;i<n+1;i++)scanf("%d",&h[i]);count[i]=1;
  for(i=1;i<m+1;i++){
    scanf("%d %d",&,&b);
    if(h[a]>h[b])count[b]=0;
    if(h[a]==h[b])count[b]=0;count[a]=0;
    if(h[a]<h[b]) count[a]=0;
  }
  for(i=1,ans=0;i<n+1;i++)ans=ans+count[i];
  printf("%d",ans);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:8:20: error: expected expression before ',' token
    8 |     scanf("%d %d",&,&b);
      |                    ^
Language: C

#include<stdio.h>
int main(void){
  int n,m,i,ans;
  scanf("%d %d",&n,&m);
  int h[n+1],count[n+1],a[m+1],b[m+1];
  for(i=1;i<n+1;i++)scanf("%d",&h[i]);count[i]=1;
  for(i=1;i<m+1;i++){
    scanf("%d %d",&a[i],&b[i]);
    if(h[a[i]]>h[b[i]])count[b[i]]=0;
    else if(h[a[i]]==h[b[i]])count[b[i]]=0;count[a[i]]=0;
    else if(h[a[i]]<h[b[i]]) count[a[i]]=0;
  }
  for(i=1,ans=0;i<n+1;i++)ans=ans+count[i];
  printf("%d",ans);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:11:5: error: 'else' without a previous 'if'
   11 |     else if(h[a[i]]<h[b[i]]) count[a[i]]=0;
      |     ^~~~
Language: C

#include<stdio.h>
int main(void){
  int n,m,i,ans;
  scanf("%d %d",&n,&m);
  int h[n+1],count[n+1],a[m+1],b[m+1];
  for(i=1;i<n+1;i++)scanf("%d",&h[i]);count[i]=1;
  for(i=1;i<m+1;i++){
    scanf("%d %d",&a[i],&b[i]);
    if(h[a[i]]>h[b[i]])count[b[i]]=0;
    else if(h[a[i]]==h[b[i]])count[b[i]]=0;count[a[i]]=0;
    else count[a[i]]=0;
  }
  for(i=1,ans=0;i<n+1;i++)ans=ans+count[i];
  printf("%d",ans);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:5: error: 'else' without a previous 'if'
   11 |     else count[a[i]]=0;
      |     ^~~~
Language: C++

N, M=map(int, input().split())
peaks=list(map(int, input().split()))
flag=[1]*N
a=0
b=0
for i in range(M):
  a,b=map(int,input().split())
  a-=1
  b-=1
  if peaks[a]<=peaks[b]:
     flag[a]=0
  if peaks[a]>=peaks[b]:
     flag[a]=0
ans=0
for i in flag:
  ans+=flag[i]
print(ans)

Compiler output:
a.cc:1:1: error: 'N' does not name a type
    1 | N, M=map(int, input().split())
      | ^
Language: C++

N,M=map(int, input().split())
peaks=list(map(int, input().split()))
flag=[1]*N
a=0
b=0
for i in range(M):
  a,b=map(int,input().split())
  a-=1
  b-=1
  if peaks[a]<=peaks[b]:
     flag[a]=0
  if peaks[a]>=peaks[b]:
     flag[a]=0
ans=0
for i in flag:
  ans+=flag[i]
print(ans)
  
  


Compiler output:
a.cc:1:1: error: 'N' does not name a type
    1 | N,M=map(int, input().split())
      | ^
Language: Java


import com.sun.xml.internal.ws.policy.privateutil.PolicyUtils;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Collections;
import java.util.HashMap;
import java.util.PriorityQueue;
import java.util.StringTokenizer;

public class Main {

    public static void main(String[] args) throws IOException {
        Scanner s = new Scanner(System.in);
        int n = s.nextInt(),m=s.nextInt();
        int height[] = new int[n+1];
        for(int i=0;i<n;i++)height[i+1]=s.nextInt();
        HashMap<Integer, PriorityQueue<Integer>>hm = new HashMap<>();
        PriorityQueue<Integer>priorityQueue;
        for(int i=0;i<n;i++){
            priorityQueue = new PriorityQueue<>(Collections.reverseOrder());
            hm.put(i+1,priorityQueue);
        }
        for(int i=0;i<m;i++){
            int u = s.nextInt(),v=s.nextInt();
            priorityQueue = hm.get(u);
            priorityQueue.add(height[v]);
            hm.put(u,priorityQueue);
            priorityQueue = hm.get(v);
            priorityQueue.add(height[u]);
            hm.put(v,priorityQueue);

        }
        int cnt=0;

        for(int i=1;i<=n;i++){
            priorityQueue = hm.get(i);
            if(priorityQueue.isEmpty())cnt++;
            else if(priorityQueue.peek()<height[i])cnt++;
        }

        System.out.println(cnt);


    }
}




class Scanner
{
    StringTokenizer st;
    BufferedReader br;

    public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}

    public String next() throws IOException
    {
        while (st == null || !st.hasMoreTokens())
            st = new StringTokenizer(br.readLine());
        return st.nextToken();
    }

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

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

    public String nextLine() throws IOException {return br.readLine();}

    public double nextDouble() throws IOException
    {
        String x = next();
        StringBuilder sb = new StringBuilder("0");
        double res = 0, f = 1;
        boolean dec = false, neg = false;
        int start = 0;
        if(x.charAt(0) == '-')
        {
            neg = true;
            start++;
        }
        for(int i = start; i < x.length(); i++)
            if(x.charAt(i) == '.')
            {
                res = Long.parseLong(sb.toString());
                sb = new StringBuilder("0");
                dec = true;
            }
            else
            {
                sb.append(x.charAt(i));
                if(dec)
                    f *= 10;
            }
        res += Long.parseLong(sb.toString()) / f;
        return res * (neg?-1:1);
    }

    public boolean ready() throws IOException {return br.ready();}


}

Compiler output:
Main.java:2: error: package com.sun.xml.internal.ws.policy.privateutil does not exist
import com.sun.xml.internal.ws.policy.privateutil.PolicyUtils;
                                                 ^
1 error
Language: C

#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#include<string.h>
//if(strcmp(s[i],"AC")==0)
//if(s[l]=='#')
/*小文字判定
if((moji>= 'a') && (moji<='z')){
    printf("a\n");
    return 0;
  }
  */

int W_Length(char *str){
	int length = 0;
	while(*str++ != '\0')
		length++;
	return length;
}

void swap(long long int *a, long long int *b){
  int temp;
  temp=*a;
  *a=*b;
  *b=temp;
}
//swap(&a, &b)

double deg(double theta){//deg to theta
return theta*(2*3.14159265359)/360;
}

long long int cmp( const void *p, const void *q ) {
    return *(long long int*)p - *(long long int*)q;
}//ちいさい順
//qsort(a,n,sizeof(long long int),cmp);


int cmp_s(const void * left, const void * right)
{
	char *left_char = (char *)left;
  char *right_char = (char *)right;
  return strcmp(left_char, right_char);
}
//qsort(s,n,sizeof(s[0]),cmp_s);
//char s[n][11]

long long int GCD(long long int a, long long int b){
  long long int L=a,S=b;
  while(1){
    if(S>L){
      L=S+L;
      S=L-S;
      L=L-S;
    }
    if(L%S==0){
      return S;
    }
    L=L%S;
  }
  
}

long long int LCM(long long int a, long long int b){
  return a*b/(GCD(a,b));
}

int main (void)
{
	long long int p[5005],b,c,n,i,min,k,h[210000],max,j=1,flag[210000]={0},count=0;
scanf("%lld",&n);
for(i=1;i<=n;i++){
  scanf("%lld",&h[i]);
}  
  for(i=1;i<=m;i++){
    scanf("%lld %lld",&b,&c);
    if(h[b]>=h[c]){
      flag[c]=1;
    }
    if(h[c]>=h[b]){
      flag[b]=1;
    }
  }
  for(i=1;i<=n;i++){
    if(flag[i]==0){
      count++;
    }
  }
  
  printf("%lld",count);
return 0;
}


Compiler output:
main.c: In function 'main':
main.c:75:14: error: 'm' undeclared (first use in this function)
   75 |   for(i=1;i<=m;i++){
      |              ^
main.c:75:14: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#include<string.h>
//if(strcmp(s[i],"AC")==0)
//if(s[l]=='#')
/*小文字判定
if((moji>= 'a') && (moji<='z')){
    printf("a\n");
    return 0;
  }
  */

int W_Length(char *str){
	int length = 0;
	while(*str++ != '\0')
		length++;
	return length;
}

void swap(long long int *a, long long int *b){
  int temp;
  temp=*a;
  *a=*b;
  *b=temp;
}
//swap(&a, &b)

double deg(double theta){//deg to theta
return theta*(2*3.14159265359)/360;
}

long long int cmp( const void *p, const void *q ) {
    return *(long long int*)p - *(long long int*)q;
}//ちいさい順
//qsort(a,n,sizeof(long long int),cmp);


int cmp_s(const void * left, const void * right)
{
	char *left_char = (char *)left;
  char *right_char = (char *)right;
  return strcmp(left_char, right_char);
}
//qsort(s,n,sizeof(s[0]),cmp_s);
//char s[n][11]

long long int GCD(long long int a, long long int b){
  long long int L=a,S=b;
  while(1){
    if(S>L){
      L=S+L;
      S=L-S;
      L=L-S;
    }
    if(L%S==0){
      return S;
    }
    L=L%S;
  }
  
}

long long int LCM(long long int a, long long int b){
  return a*b/(GCD(a,b));
}

int main (void)
{
	long long int p[5005],b,c,n,i,min,k,h[210000],max,j=1,flag[210000]={0},count=0;
scanf("%lld",&n);
for(i=1;i<=n;i++){
  scanf("%lld",&h[i]);
}  
  for(i=1;i<=m.i++){
    scanf("%lld %lld",&b,&c);
    if(h[b]>=h[c]){
      flag[c]=1;
    }
    if(h[c]>=h[b]){
      flag[b]=1;
    }
  }
  for(i=1;i<=n;i++){
    if(flag[i]==0){
      count++;
    }
  }
  
  printf("%lld",count);
return 0;
}


Compiler output:
main.c: In function 'main':
main.c:75:14: error: 'm' undeclared (first use in this function)
   75 |   for(i=1;i<=m.i++){
      |              ^
main.c:75:14: note: each undeclared identifier is reported only once for each function it appears in
main.c:75:19: error: expected ';' before ')' token
   75 |   for(i=1;i<=m.i++){
      |                   ^
      |                   ;
Language: C++

#include <iostream>
#define N 100010
using namespace std;
int main(void){
    int n,m,h[N],ma[N];
    cin >> n >> m;
    for(int i = 1;i <= n;i++){
          cin >> c[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[b]);
    }
    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:18: error: 'c' was not declared in this scope
    8 |           cin >> c[i];
      |                  ^
Language: C++

#include <bits/stdc++.h>
#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(){
	int n,m;
	cin >> n >> ;
	vector<int> h(n);
	vector<bool> ok(n, true);
	rep(i,n) cin >> h.at(i);
	rep(i,m){
		int a, b;
		cin >> a >> b;
		a--; b--;
		if(h[a] <= h[b]) ok[a] = false;
		if(h[b] <= h[a]) ok[b] = false;
	}
	int ans = 0;
	rep(i,n) if(ok[i]) ans++;
	cout << ans << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:21: error: expected primary-expression before ';' token
    9 |         cin >> n >> ;
      |                     ^
Language: C

#include<stdio.h>
#include<stdlib.h>
#define rep(i,n) for(i=0;i<n;i++)
int main(){
    long int i,n,m;
    scanf("%ld%ld",&n,&m);
    int h[100010],ma[100010];
    for(i=1;i<=n;i++){
        scanf("%d",&h[i]);
        ma[i]=0; //n個の0
    }
    rep(i,m){
        int a,b;
        scanf("%d%d",&a,&b);
        ma[a]=max(ma[a],h[b]);//展望台aに繋がる展望台の最大値が残る
        ma[b]=max(ma[b],h[a]);
    }
    int ans=0;
    for(i=1;i<=n;i++){
        if(ma[i]<h[i]) ans++;
    }
    printf("%d",ans);
}

Compiler output:
main.c: In function 'main':
main.c:15:15: error: implicit declaration of function 'max' [-Wimplicit-function-declaration]
   15 |         ma[a]=max(ma[a],h[b]);//展望台aに繋がる展望台の最大値が残る
      |               ^~~
Language: Java

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = 100010;
        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 i = 0; i < m; i++) {
            int a = sc.nextInt();
            int b = sc.nextInt();
            ma[a] = Math.max(ma[a], h[b]);
            ma[b] = Math.max(ma[b], h[a]);
        }

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


Compiler output:
Main.java:3: error: cannot find symbol
        Scanner sc = new Scanner(System.in);
        ^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
        Scanner sc = new Scanner(System.in);
                         ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: C++

#pragma GCC optimize("Ofast")
#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i,n) for(int i=0;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define rep2(i,n) for(int i=0;i<=n;i++)
#define repr(i,a,n) for(int i=a;i<n;i++)
#define all(a) a.begin(),a.end()
#define P pair<long long,long long>
#define uni(e) e.erase(unique(e.begin(),e.end()),e.end())
#define double long double
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
int INF=1e10;
int MOD=1e9+7;
template<class T> void out(T a){cout<<a<<'\n';}
template<class T> void yesno(T b){if(b)out("yes");else out("no");}
template<class T> void YesNo(T b){if(b)out("Yes");else out("No");}
template<class T> void YESNO(T b){if(b)out("YES");else out("NO");}
template<class T> void noyes(T b){if(b)out("no");else out("yes");}
template<class T> void NoYes(T b){if(b)out("No");else out("Yes");}
template<class T> void NOYES(T b){if(b)out("NO");else out("YES");}
int keta(int a){
  double b=a;
  b=log10(b);
  int c=b;
  return c+1;
}
int kurai(int a,int b){
  int m=pow(10,b),n=pow(10,b-1);
  return (a%m)/n;
}
int ketawa(int a){
  int k=0;
  rep(i,keta(a)){
  k+=kurai(a,i+1);
  }
  return k;
}
int gcd(int a,int b){
  if(a%b==0)
    return b;
  return gcd(b,a%b);
}
int lcm(int a,int b){
    return a/gcd(a,b)*b;
}
int mid(int a,int b,int c){
  vector<int> k(3);
  k[0]=a;k[1]=b;k[2]=c;
  sort(all(k));
  return k[1];
}
bool sosuu(int a){
  bool b=1;
  if(a<=1)
    return 0;
  else{
  rep1(i,sqrt(a)-1){
  if(a%(i+1)==0)
  b=0;
  }
  return b;
  }
}
int modpow(int a,int b,int m=MOD){
 if(!b)return 1; if(b&1)return modpow(a,b-1,m)*a%m;
 int memo = modpow(a,b>>1,m);
 return memo*memo%m;
}
int fact_mod(int n) {
    int f=1; 
for(int i=2;i<n+1;i++) f=f*(i%MOD)% MOD;
    return f;
}
int mod_pow(int x,int n) {
    int res=1;
    while(n>0){
        if(n&1) res=(res*x)%MOD; 
        x=(x*x)%MOD;        
n>>=1; 
    }
    return res;
}
int c_mod(int n, int r) {
    if(r>n-r) r=n-r;
    if(r==0) return 1;
    int a=1;
    rep(i,r) 
a=a*((n-i)%MOD)%MOD;
    int b=mod_pow(fact_mod(r), MOD-2);
    return (a%MOD)*(b%MOD)%MOD;
}
signed main(){
  int a,b;
  cin>>a>>b;
  vector<int> c(a),d(b),e(b),f(a,1);
  rep(i,a)
    cin>>c[i]
    rep(i,b)
    cin>>d[i]>>e[i];
  rep(i,b){
  if(c[d[i-1]]<=c[e[i-1]])
    f[d[i-1]]=0;
  if(c[e[i-1]]<=c[d[i-1]])
    f[e[i-1]]=0;

  }
  int h=0;
  rep(i,a){
  if(f[i])
    h++;
  }
  out(h);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:101:14: error: expected ';' before 'for'
  101 |     cin>>c[i]
      |              ^
      |              ;
a.cc:102:9: error: 'i' was not declared in this scope
  102 |     rep(i,b)
      |         ^
a.cc:6:30: note: in definition of macro 'rep'
    6 | #define rep(i,n) for(int i=0;i<n;i++)
      |                              ^