criyle/codenet-compile-errors huggingface dataset:
Language: Java

import java.util.Scanner;

pulbic class Main{
  pubic static void main(String[] args){
    Scanner sc.new Scanner(System.in);
    int n=sc.nextInt();
    int h=sc.nextInt();
    int[] a=new int[n];
    
    int res=0;
    for(int i=0;i<n;i++){
     a[i]=sc.nextInt();
      res+=a[i]>=h?1:0;
    }
    System.out.print(res);
  }
}

Compiler output:
Main.java:3: error: class, interface, enum, or record expected
pulbic class Main{
^
Main.java:4: error: <identifier> expected
  pubic static void main(String[] args){
       ^
Main.java:5: error: ';' expected
    Scanner sc.new Scanner(System.in);
              ^
3 errors
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  int n,kcnt=0;
  cin>>n>>k;
  int arr[n];
  for(int i=0;i<n;i++)
  { 
    cin>>arr[i];
    if(arr[i]>=k)
    cnt++;
  }
  cout<<cnt;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:11: error: 'k' was not declared in this scope
    6 |   cin>>n>>k;
      |           ^
a.cc:12:5: error: 'cnt' was not declared in this scope; did you mean 'kcnt'?
   12 |     cnt++;
      |     ^~~
      |     kcnt
a.cc:14:9: error: 'cnt' was not declared in this scope; did you mean 'kcnt'?
   14 |   cout<<cnt;
      |         ^~~
      |         kcnt
Language: C++

n , k = map(int,input().split())
h = list(map(int,input().split()))
count = 0
i = 0

while i in range(n):
  if (h[i] >= k):
    count += 1
    i += 1
    
  else:
    i +=1
  
print(count)

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

#include <bits/stdc++.h>
using namespace std;
int main(){
  int N,K;
  cin >> N >> K;
  vector<int> vec(N);
  for(int i=0; i < N; i++) cin >> vec(i);
  int n=0;
  for(int i=0; i < N; i++){
    if(vec.at(i)>=K) n++;
  }
  cout << n << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:38: error: no match for call to '(std::vector<int>) (int&)'
    7 |   for(int i=0; i < N; i++) cin >> vec(i);
      |                                   ~~~^~~
Language: C++

#include <stdio.h>
int main(int argc, char const *argv[])
{
 int num1,num2,height,count,i;
 scanf("%d", &num1);
 scanf("%d",&num2);
 for(i<num1){
 	scanf("%d",&height);
 	i++
 	if(height<num2){
 	}
 	else{
 		count++;
 	}
 }
 printf("%d",count);
  return (0);
}

Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:7:12: error: expected ';' before ')' token
    7 |  for(i<num1){
      |            ^
      |            ;
a.cc:17:3: error: expected primary-expression before 'return'
   17 |   return (0);
      |   ^~~~~~
a.cc:16:21: error: expected ')' before 'return'
   16 |  printf("%d",count);
      |                     ^
      |                     )
   17 |   return (0);
      |   ~~~~~~             
a.cc:7:5: note: to match this '('
    7 |  for(i<num1){
      |     ^
Language: C++

#include<stdio.h>
int main(void)
{
	long long int n,k,h[100000],i,cnt;
	scanf("%d",&n);
	scanf("%d",&k);
	for(i=1;i<=n;i++){
		scanf("%d",&h[i]);
	}
	for(i=1;i<=n;i++){
		if(k<=h[i]){
			cnt++;
		}
	}
	printf("%d\n",cut);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:23: error: 'cut' was not declared in this scope; did you mean 'cnt'?
   15 |         printf("%d\n",cut);
      |                       ^~~
      |                       cnt
Language: C++

#include<stdio.h>
int main(void)
{
	long long int n,k,h[100000],i,cnt;
	scanf("%d",&n);
	scanf("%d",&k);
	for(i=0;i<n;i++){
		scanf("%d",&h[i]);
	}
	for(i=0;i<n;i++){
		if(k<=h[i]){
			cnt++;
		}
	}
	printf("%d\n",cut);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:23: error: 'cut' was not declared in this scope; did you mean 'cnt'?
   15 |         printf("%d\n",cut);
      |                       ^~~
      |                       cnt
Language: C++

#include<stdio.h>
int main(void)
{
	int n,k,h[100000],i,cnt;
	scanf("%d",&n);
	scanf("%d",&k);
	for(i=0;i<n;i++){
		scanf("%d",&h[i]);
	}
	for(i=0;i<n;i++){
		if(k<=h[i]){
			cnt++;
		}
	}
	printf("%d\n",cut);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:23: error: 'cut' was not declared in this scope; did you mean 'cnt'?
   15 |         printf("%d\n",cut);
      |                       ^~~
      |                       cnt
Language: C++

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

int main(){
  int N,K;
  int sum;
  cin>>N>>K;
  vector<int> A;
  
  for(i=0; i<N; i++){
    cin>>A.at(0);
  }
  
  for(i=0; i<N; i++){
    if(A.at(i)>=K){
      sum++
    }
  }
  cout<sum<<endl;
}

    

Compiler output:
a.cc: In function 'int main()':
a.cc:10:7: error: 'i' was not declared in this scope
   10 |   for(i=0; i<N; i++){
      |       ^
a.cc:14:7: error: 'i' was not declared in this scope
   14 |   for(i=0; i<N; i++){
      |       ^
a.cc:16:12: error: expected ';' before '}' token
   16 |       sum++
      |            ^
      |            ;
   17 |     }
      |     ~       
a.cc:19:11: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
   19 |   cout<sum<<endl;
      |        ~~~^~~~~~
Language: C++

int main()
{
	using namespace std;
	int N, K;
	cin >> N >> K;
	int ans = 0;
	for (int i = 0; i < N; i++) {
		int temp;
		cin >> temp;
		if (temp >= K)
			ans++;
	}

	cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: 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 | int main()
a.cc:14:9: error: 'cout' was not declared in this scope
   14 |         cout << ans << endl;
      |         ^~~~
a.cc:14:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:14:24: error: 'endl' was not declared in this scope
   14 |         cout << ans << endl;
      |                        ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | int main()
Language: Java

import java.util.*;
public class Main{
	public static void main(String[] args){
   		Scanner sc=new Scanner(System.in);
    	int n=sc.nextInt();
    	int k=sc.nextInt();
        int a=1;
      	int c=0;
        while(a<=n){
            int h=sc.nextInt();
        	if(h>=k){
            	c++;
            }
          	int h=0;
          	a++;
        }
      System.out.println(c);
    }
}

Compiler output:
Main.java:14: error: variable h is already defined in method main(String[])
          	int h=0;
          	    ^
1 error
Language: Java

import java.util.*;
public class Main{
	public static void main(String[] args){
   		Scanner sc=new Scanner(System.in);
    	int n=sc.nextInt();
    	int k=sc.nextInt();
        int a=1;
      	int c=0;
        while(a<=n){
            int h=sc.nextInt();
        	if(h>=k){
            	c++;
            }
          	int h=0;
          	a++;
        }
      System.out.println(c);
    }
}
import java.util.*;
public class Main{
	public static void main(String[] args){
   		Scanner sc=new Scanner(System.in);
    	int n=sc.nextInt();
    	int k=sc.nextInt();
        int a=1;
      	int c=0;
        while(a<=n){
            int h=sc.nextInt();
        	if(h>=k){
            	c++;
            }
          	h=0;
          	a++;
        }
      System.out.println(c);
    }
}

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

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


Compiler output:
main.c: In function 'main':
main.c:4:11: error: expected identifier or '(' before ';' token
    4 |   int N,K,;
      |           ^
Language: C

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


Compiler output:
main.c: In function 'main':
main.c:8:18: error: subscripted value is neither array nor pointer nor vector
    8 |     scanf("%d",&h[i]);
      |                  ^
main.c:9:10: error: subscripted value is neither array nor pointer nor vector
    9 |     if (h[i]>=K)
      |          ^
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:6:8: error: 'i' undeclared (first use in this function)
    6 |   for (i=1;i<=N;i++)
      |        ^
main.c:6:8: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:7: error: 'h' undeclared (first use in this function)
    8 |   if (h[i]>=K)
      |       ^
Language: Java

package roller;
import java.util.Scanner;
public class Roller{
    public static void main(String[]args){
        Scanner sc=new Scanner(System.in);
        System.out.println("How many of you : ");
        int N=sc.nextInt();
        int m=0; //numbers of people allowed to ride
        //tall requirement
        System.out.println("To ride the most popular roller coaster,you must be at least (centimeters) : ");
        int K=sc.nextInt();
        for(int i=1;i<=N;i++){
            System.out.println("The "+i+" friend's height : ");
            int h=sc.nextInt();
            if(h>=K){
              m++;
            }
        }
        System.out.println(m);
}
}



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

import java.util.*;

public class Test {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N, K;
        N = sc.nextInt(); K = sc.nextInt();
        int h, cont = 0;
        for (int i=0; i<N; i++){
            h = sc.nextInt();
            if (h >= K) cont++;
        }
        System.out.println(cont);
    }
}


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

#include <stdio.h>
int main()
{
  int n, k;
  scanf("%d %d", &n, &k);
  for (int i = 0; i < n; ++i) {
  scanf("%d", & a[i]);
  printf("%lf\n", a[i]);
  }
}

Compiler output:
main.c: In function 'main':
main.c:7:17: error: 'a' undeclared (first use in this function)
    7 |   scanf("%d", & a[i]);
      |                 ^
main.c:7:17: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<iostream>
using namespace std;

int main(void){
  int N,K;
  std::cin >> N >> K;
  
  int h[N];
  
  for(int idxh=0; idxh<N; idxh++) std::cin >> h[idxh];
  
  int n=0;//乗れる人数
  
  for(int idxh=0; idxh<N; idxh++) if(h[idxh] >= K) n++;
  
  std::cout << n << std::endl;
}

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

#include<iostream>
using namespace std;

int main()
{
int N,K,cnt=0;
vector<int> v;
cin>>N>>K;
for(int i=0;i<N;i++)
{
  v.push_back(i);
   if(v[i]>=K)
   {
     cnt++;
   }
}
cout<<cnt;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:1: error: 'vector' was not declared in this scope
    7 | vector<int> v;
      | ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include<iostream>
  +++ |+#include <vector>
    2 | using namespace std;
a.cc:7:8: error: expected primary-expression before 'int'
    7 | vector<int> v;
      |        ^~~
a.cc:11:3: error: 'v' was not declared in this scope
   11 |   v.push_back(i);
      |   ^
Language: C++

#include <iostream>
#include <vector>

using namespace std;

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

  int cnt = 0;
  for (int i = 0; i < N; i++) {
    cin >> h;
    if (h >= K) cnt++;
  }

  cout << cnt << endl;
}


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

#include<iostream>

using namespace std;

int main(){
  int N,K,ans=0;
  cin>>N>>K;
  for(int i=0;i<N;++i){
    int x;
    cin>>x;
    if(x>=k)ans++;
  }
  
  cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:11: error: 'k' was not declared in this scope
   11 |     if(x>=k)ans++;
      |           ^
Language: Java

import java.util.*;

public class Main{
  public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
    int K = sc.nextInt();
    int N = sc.nextInt();
    int h[] = new int[N];
    int s = 0;
    for(int i = 0; i < 500; i++){
      h[i] = sc.nextInt();
    }
    for(int j = 0; j < 500; j++){
      if(h[i] > K){
        s += s;
      }
    }
  }
}
        

Compiler output:
Main.java:14: error: cannot find symbol
      if(h[i] > K){
           ^
  symbol:   variable i
  location: class Main
1 error
Language: C

#include <stdio.h>

int main() {
	int N;
	int Ni[10000g0];
	int i;
	int K;
	int count = 0;

	scanf("%d %d", &N, &K);

	for (i = 0; i < N; i++) {
		scanf("%d", &Ni[i]);

	}

	for (i = 0; i < N; i++) {
		if (Ni[i] >= K) {
			count++;
		}
	}
	printf("%d\n", count);
	return 0;
}h

Compiler output:
main.c: In function 'main':
main.c:5:16: error: invalid suffix "g0" on integer constant
    5 |         int Ni[10000g0];
      |                ^~~~~~~
main.c: At top level:
main.c:24:1: error: expected '=', ',', ';', 'asm' or '__attribute__' at end of input
   24 | }h
      | ^
Language: C++

#include "pch.h"
#include <iostream>
#include <cstdio>
#include <string>
#include <algorithm>
#include <math.h>
#include <stdio.h>
#include <vector>
using namespace std;
typedef long long ll;
int main(){
	int N, K;
	cin >> N >> K;
	int H;
	int R = 0;
	for (int i = 0; i < N; i++) {
		cin >> H;
		if (H >= K)R++;
	}
	cout << R << endl;
	return 0;
}



Compiler output:
a.cc:1:10: fatal error: pch.h: No such file or directory
    1 | #include "pch.h"
      |          ^~~~~~~
compilation terminated.
Language: Java

import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
        int k = sc.nextInt();
        int count = 0;
        
        for (int i=0; i<n; i++) {
            int x=sc.nextInt()
            if (x<k) {
                count+=1;
            }
        }
        
        System.out.println(count);

}

Compiler output:
Main.java:11: error: ';' expected
            int x=sc.nextInt()
                              ^
Main.java:19: error: reached end of file while parsing
}
 ^
2 errors
Language: C++

#include <iostream>

using namespace std;

int main() {
        int N, K;
        int cnt = 0;

        cin >> N >> K;

        int h[N];

        for (int i = 0; i < N; i++) {
                cin >> h[i];
                if (h[i] >= K) {
                        cnt += 1;
                }
        }
        cout << cnt << endl;

        return 0;
}
~                                                                                                                                                                                                           
~    

Compiler output:
a.cc:24:1: error: expected class-name before '~' token
   24 | ~
      | ^
Language: C++

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

int main() {
	int n, k;
	cin >> n >> k;
  	int ans = 0;
	for(int i = 0; i < n; i++) {
    	int x;
      	cin >> x;
     	if(x >= k) {
        	ans++;
        }
    }
	cout << ans << endl;
 	return 0;
}

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

#include<iostream>
using namespace std;
int main(){
  int n, x, h;
  cint >> n >> x;
  int cnt = 0;
  for(int i=0; i< n; i++){
    cin >> h;
    if(h >= x)cnt++;
  }
  cout << cnt << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'cint' was not declared in this scope; did you mean 'uint'?
    5 |   cint >> n >> x;
      |   ^~~~
      |   uint
Language: C

#include<stdio.h>

int main(){
  
  int N,M;
  int R[500];
  int c=0;
  
  scanf("%d %d",%N,&M);
  
  for(int t = 0; t<N ;t++){
    scanf("%S",R[t]);
    if(M<=R[t]){
      c=c+1;
    }
  }
  
  printf("%d",&c);
  
  return 0;
  
}

Compiler output:
main.c: In function 'main':
main.c:9:17: error: expected expression before '%' token
    9 |   scanf("%d %d",%N,&M);
      |                 ^
Language: Java

//package FirstDay;

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



    public class CodeForces
    {
        public static void main(String args[]) {
            Scanner in = new Scanner(System.in);
            int n = in.nextInt();
            int k = in.nextInt();
            int a[] = new int[n];
            int count = 0;
            for(int i = 0; i < n; i++) {
                a[i] = in.nextInt();
                if(a[i] >= k) count++;
            }
            System.out.println(count);
        }
    }



Compiler output:
Main.java:8: error: class CodeForces is public, should be declared in a file named CodeForces.java
    public class CodeForces
           ^
1 error
Language: Java

import java.util.Scanner;

public class Main{
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        n=Integer.parseInt(sc.next());
        k=Integer.parseInt(sc.next());
        int res=0;
        for(int i=0; i<n; i++){
            if(Integer.parseInt(sc.next())>=k){
                res++;
            }
        }
        System.out.println(res);
        sc.close();
    }
}

Compiler output:
Main.java:6: error: cannot find symbol
        n=Integer.parseInt(sc.next());
        ^
  symbol:   variable n
  location: class Main
Main.java:7: error: cannot find symbol
        k=Integer.parseInt(sc.next());
        ^
  symbol:   variable k
  location: class Main
Main.java:9: error: cannot find symbol
        for(int i=0; i<n; i++){
                       ^
  symbol:   variable n
  location: class Main
Main.java:10: error: cannot find symbol
            if(Integer.parseInt(sc.next())>=k){
                                            ^
  symbol:   variable k
  location: class Main
4 errors
Language: C++

#include <iostream>
#include <algorithm>
using namespace std;
int main(){
  int N, K, contY = 0, h[100];
 
  cin >> N; cin >> K;
 
  for(int i = 0; i <= N; i++)
  {
    cin >> h[i];
    rep(i, 0, N) if (K <= H[i])
    contY++;
}
}
  cout << contY;
  return 0;
}

using namespace std;
int main(){
  int N, K, contY = 0, h[100];
 
  cin >> N; cin >> K;
 
  for(int i = 0; i <= N; i++)
  {
    cin >> h[i];
    rep(i, 0, N) if (K <= H[i])
    contY++;
}
}
  cout << contY;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:5: error: 'rep' was not declared in this scope
   12 |     rep(i, 0, N) if (K <= H[i])
      |     ^~~
a.cc: At global scope:
a.cc:16:3: error: 'cout' does not name a type
   16 |   cout << contY;
      |   ^~~~
a.cc:17:3: error: expected unqualified-id before 'return'
   17 |   return 0;
      |   ^~~~~~
a.cc:18:1: error: expected declaration before '}' token
   18 | }
      | ^
a.cc:21:5: error: redefinition of 'int main()'
   21 | int main(){
      |     ^~~~
a.cc:4:5: note: 'int main()' previously defined here
    4 | int main(){
      |     ^~~~
a.cc: In function 'int main()':
a.cc:29:5: error: 'rep' was not declared in this scope
   29 |     rep(i, 0, N) if (K <= H[i])
      |     ^~~
a.cc: At global scope:
a.cc:33:3: error: 'cout' does not name a type
   33 |   cout << contY;
      |   ^~~~
a.cc:34:3: error: expected unqualified-id before 'return'
   34 |   return 0;
      |   ^~~~~~
a.cc:35:1: error: expected declaration before '}' token
   35 | }
      | ^
Language: C++

#include <iostream>
#include <algorithm>
#include <Rcpp.h>
using namespace std;
int main(){
  int N, K, contY = 0, h[100];
 
  cin >> N; cin >> K;
 
  for(int i = 0; i <= N; i++)
  {
    cin >> h[i];
    rep(i, 0, N) if (K <= H[i])
    contY++;
}
}
  cout << contY;
  return 0;
}

using namespace std;
int main(){
  int N, K, contY = 0, h[100];
 
  cin >> N; cin >> K;
 
  for(int i = 0; i <= N; i++)
  {
    cin >> h[i];
    rep(i, 0, N) if (K <= H[i])
    contY++;
}
}
  cout << contY;
  return 0;
}


Compiler output:
a.cc:3:10: fatal error: Rcpp.h: No such file or directory
    3 | #include <Rcpp.h>
      |          ^~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
using namespace std;
int main(){
  int N, K, contY = 0, h[100];
 
  cin >> N; cin >> K;
 
  for(int i = 0; i <= N; i++)
  {
    cin >> h[i];
    rep(i, 0, N) if (K <= H[i])
    contY++;
}
}
  cout << contY;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: 'rep' was not declared in this scope
   11 |     rep(i, 0, N) if (K <= H[i])
      |     ^~~
a.cc: At global scope:
a.cc:15:3: error: 'cout' does not name a type
   15 |   cout << contY;
      |   ^~~~
a.cc:16:3: error: expected unqualified-id before 'return'
   16 |   return 0;
      |   ^~~~~~
a.cc:17:1: error: expected declaration before '}' token
   17 | }
      | ^
Language: C++

using namespace std;
int main(){
  int N, K, contY = 0, h[100];
 
  cin >> N; cin >> K;
 
  for(int i = 0; i <= N; i++)
  {
    cin >> h[i];
    for(int j = 0; j <= h[i]; j++){
    if(K <= h[i]){
    contY++;
}
}
}
  cout << contY;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin >> N; cin >> 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:16:3: error: 'cout' was not declared in this scope
   16 |   cout << contY;
      |   ^~~~
a.cc:16:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

int main(){
  int N, K, contY = 0, h[100];
 
  cin >> N; cin >> K;
 
  for(int i = 0; i <= N; i++)
  {
    cin >> h[i];
    for(int j = 0; j <= h[i]; j++){
    if(K <= h[i]){
    contY++;
}
}
}
  cout << contY;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'cin' was not declared in this scope
    4 |   cin >> N; cin >> K;
      |   ^~~
a.cc:15:3: error: 'cout' was not declared in this scope
   15 |   cout << contY;
      |   ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define rep(i,n) for(int i=0;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define mp make_pair
#define F first
#define S second
#define IOS ios_base::sync_with_stdio(0); cin.tie(0)
#define INF 0x3f3f3f3f
typedef long long ll;
typedef pair<ll,ll> pii;
typedef pair<double,double> pdd;
ll n,m,k;
int main()
{
    //IOS;
    while(cin>>n>>k)
    {
        ll sum=0
        rep(i,n)
        {
            ll tmp;
            cin>>tmp;
            if(tmp>=k) sum++;
        }
        cout<<sum<<'\n';
    }
        

    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:4:18: error: expected ',' or ';' before 'for'
    4 | #define rep(i,n) for(int i=0;i<n;i++)
      |                  ^~~
a.cc:21:9: note: in expansion of macro 'rep'
   21 |         rep(i,n)
      |         ^~~
a.cc:21:13: error: 'i' was not declared in this scope
   21 |         rep(i,n)
      |             ^
a.cc:4:30: note: in definition of macro 'rep'
    4 | #define rep(i,n) for(int i=0;i<n;i++)
      |                              ^
Language: C++

#include <iostream>
using namespce std;
int main(){
  int n,k;
  cin >> n >> k;
  int cnt =0;
  int a;
  for(int i=0;i<n;i++){
    cin >> a;
    if(a>=k) cnt++;
  }
  cout << cnt << endl;
  return 0;
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namespce'
    2 | using namespce std;
      |       ^~~~~~~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |   cin >> n >> k;
      |   ^~~
      |   std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:12:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   12 |   cout << cnt << endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:12:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   12 |   cout << cnt << endl;
      |                  ^~~~
      |                  std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

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

    int main() {
        int n,k;
        cin >> n >> k;
        vector<int> h(n);
        rep(i,n) cin >> h[i];

        int ans=0; // ジェットコースターに乗ることができる人数（出力する値）
        rep(i,n) if(h[i] >= k) ++ans;
        cout << ans << endl; // 答えを出力する
        return 0;
    }

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

{
    int n, k, r=0,h;
    cin>>n>>k ;

  for (int i=1; i<=n;i++){
       cin>>h;
       if (h>=k){
          r++;

       }

  }
  cout <<r;
    return 0;
}

Compiler output:
a.cc:1:1: error: expected unqualified-id before '{' token
    1 | {
      | ^
Language: C++

#include <iostream>

using namespace std;

int main()
{
    int h[100000+10];
    int n, k, nr=0;
    cin>>n>>k;
    for (int i=1; i<=n; i++)
    {
        cin >> h[i];
        if(h[i]>=k)
        {
            nr++;
        }
    }
    cout<<nr;
    return 0;
}
#include <iostream>

using namespace std;

int main()
{
    int h[100000+10];
    int n, k, nr=0;
    cin>>n>>k;
    for (int i=1; i<=n; i++)
    {
        cin >> h[i];
        if(h[i]>=k)
        {
            nr++;
        }
    }
    cout<<nr;
    return 0;
}


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


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

int main(){
    int N;
    int h,K;
    cin>>N;
    cin>>K;
    int a[N];
    
    if ((N>=1) && (N>=pow(10,5)){    
        if ((K>=1) && (K<= 500)){

            for (int i=0;i<N;i++){
                cin>>h;
                if (h>=1 && h<=500)
                    a[i]=h;
            }        

            int c=0;
            for (int j=0 ;j<N;j++){
                if (a[j]>=K){
                    c++;
                    cout<<c<<endl;}
            
            }   
        }

    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:33: error: expected ';' before '{' token
   13 |     if ((N>=1) && (N>=pow(10,5)){
      |                                 ^
      |                                 ;
a.cc:32:5: error: expected primary-expression before 'return'
   32 |     return 0;
      |     ^~~~~~
a.cc:31:6: error: expected ')' before 'return'
   31 |     }
      |      ^
      |      )
   32 |     return 0;
      |     ~~~~~~
a.cc:13:8: note: to match this '('
   13 |     if ((N>=1) && (N>=pow(10,5)){
      |        ^
Language: C++

#include <iostream> 
using namespace std;

int main(){
    long N;
    int h,K;
    cin>>N;
    cin>>K;
    int a[N];
    
    
    if (((K>=1) && (K<= 500)){

        for (int i=0;i<N;i++){
            cin>>h;
            if (h>=1 && h<=500)
                a[i]=h;
        }        

        int c=0;
        for (int j=0 ;j<N;j++){
            if (a[j]>=K)
                c++;
                cout<<c<<endl;
        }   
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:30: error: expected ';' before '{' token
   12 |     if (((K>=1) && (K<= 500)){
      |                              ^
      |                              ;
a.cc:27:5: error: expected primary-expression before 'return'
   27 |     return 0;
      |     ^~~~~~
a.cc:26:6: error: expected ')' before 'return'
   26 |     }
      |      ^
      |      )
   27 |     return 0;
      |     ~~~~~~
a.cc:12:8: note: to match this '('
   12 |     if (((K>=1) && (K<= 500)){
      |        ^
Language: C++

#include <iostream> 
using namespace std;

int main(){
    long N;
    int h,K;
    cin>>N;
    cin>>K;
    int a[N];
    
    
    if (((K>=1) && (K<= 500)){

        for (int i=0;i<N;i++){
            cin>>h;
            if (h>=1 && h<=500)
                a[i]=h;
        }        

        int c=0;
        for (int j=0 ;j<N;j++)
            if (a[j]>=K)
                c++;
                cout<<c<<endl;
        }   
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:30: error: expected ';' before '{' token
   12 |     if (((K>=1) && (K<= 500)){
      |                              ^
      |                              ;
a.cc:26:5: error: expected primary-expression before 'return'
   26 |     return 0;
      |     ^~~~~~
a.cc:25:10: error: expected ')' before 'return'
   25 |         }
      |          ^
      |          )
   26 |     return 0;
      |     ~~~~~~
a.cc:12:8: note: to match this '('
   12 |     if (((K>=1) && (K<= 500)){
      |        ^
Language: C++

#include <iostream> 
using namespace std;

int main(){
    long N;
    int h,K;
    cin>>N;
    cin>>K;
    int a[N];
    
    
    if (((N>=1) && (N<=pow(10,5)) && ((K>=1) && (K<= 500))){

        for (int i=0;i<N;i++){
            cin>>h;
            if (h>=1 && h<=500)
                a[i]=h;
        }        

        int c=0;
        for (int j=0 ;j<N;j++)
            if (a[j]>=K)
                c++;
                cout<<c<<endl;
        }   
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:24: error: 'pow' was not declared in this scope
   12 |     if (((N>=1) && (N<=pow(10,5)) && ((K>=1) && (K<= 500))){
      |                        ^~~
a.cc:26:5: error: expected primary-expression before 'return'
   26 |     return 0;
      |     ^~~~~~
a.cc:25:10: error: expected ')' before 'return'
   25 |         }
      |          ^
      |          )
   26 |     return 0;
      |     ~~~~~~
a.cc:12:8: note: to match this '('
   12 |     if (((N>=1) && (N<=pow(10,5)) && ((K>=1) && (K<= 500))){
      |        ^
Language: C

#include <stdio.h>

int main(void)
{
  int N, K;
  scanf("%d %d", &N, &K);
  ans = 0;
  for(int i = 0; i < N; i++){
    int h;
    scanf("%d", &h);
    if(K <= h)
    	ans++;
  }
  printf("%d", ans);
}


Compiler output:
main.c: In function 'main':
main.c:7:3: error: 'ans' undeclared (first use in this function)
    7 |   ans = 0;
      |   ^~~
main.c:7:3: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include <iostream> 
using namespace std;

int main(){
    int N,K,h;
    cin>>N;
    cin>>K;
    int a[N];
    int c=0;
    
   if (((N>=1) && (N<=500)) && ((K>=1) && (K<= 500))){

       for (int i=0;i<N;i++)
            cin>>h;
            a[i]=h;        

       for (int j=0 ;j<N;j++)
            if (a[j]<K)
               c++;
               cout<<c<<endl;
       }   
    return 0;
}

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

#include<iostream>
using namespace std;

int main(){
  int n, k;
  cin >> n >> k;
  int ans=0;
  for(int i=0; i<n; i++){
     int h;
     cin >> h;
     if(h>=k){
       ans++;
     }
  }
　cout << ans << endl;
}

Compiler output:
a.cc:15:1: error: extended character 　 is not valid in an identifier
   15 | 　cout << ans << endl;
      | ^
a.cc: In function 'int main()':
a.cc:15:1: error: '\U00003000cout' was not declared in this scope
   15 | 　cout << ans << endl;
      | ^~~~~~
Language: C++

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

int main(){
  int n, k;
  cin >> n >> k;
  vector s[n];
  int ans=0;
  for(int i=0; i<n; i++){
     cin >> s.at(i);
  }
  for(int i=0; i<n; i++){
     if (s.at(i)>=k){
       ans++;
     }
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: missing template argument list after 'std::vector'; for deduction, template placeholder must be followed by a simple declarator-id
    8 |   vector s[n];
      |   ^~~~~~
      |         <>
In file included from /usr/include/c++/14/vector:66,
                 from a.cc:3:
/usr/include/c++/14/bits/stl_vector.h:428:11: note: 'template<class _Tp, class _Alloc> class std::vector' declared here
  428 |     class vector : protected _Vector_base<_Tp, _Alloc>
      |           ^~~~~~
a.cc:11:13: error: 's' was not declared in this scope
   11 |      cin >> s.at(i);
      |             ^
a.cc:14:10: error: 's' was not declared in this scope
   14 |      if (s.at(i)>=k){
      |          ^
Language: C++

C#incude<iostream>
using namespace std;

int main(){
  int n, k;
  cin >>  n >> k;
  int s[100];
  int ans=0;
  for(int i=0;i<n; i++){
     cin >> s[i];
  }
  for(int i=0; i<n; ++){
     if (s[i]>=k){
       ans++;
     }
  }
  cout << ans << endl;
}

Compiler output:
a.cc:1:2: error: stray '#' in program
    1 | C#incude<iostream>
      |  ^
a.cc:1:1: error: 'C' does not name a type
    1 | C#incude<iostream>
      | ^
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin >>  n >> k;
      |   ^~~
a.cc:12:23: error: expected primary-expression before ')' token
   12 |   for(int i=0; i<n; ++){
      |                       ^
a.cc:17:3: error: 'cout' was not declared in this scope
   17 |   cout << ans << endl;
      |   ^~~~
a.cc:17:18: error: 'endl' was not declared in this scope
   17 |   cout << ans << endl;
      |                  ^~~~
Language: C++

#include<iostream>
using nnamespace std;

int main(){
   int n, k;
   cin >> n >> k;
   int a=0;
   int p[10000];
   for (int i=0;i<n; i++){
      cin >> p[i];
   }
   for(int i=0; i<n; i++){
      if(a[i]>=k){
           a++;
      }
   }
   cout << a << end;
}

   
     

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'nnamespace'
    2 | using nnamespace std;
      |       ^~~~~~~~~~
a.cc: In function 'int main()':
a.cc:6:4: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |    cin >> n >> k;
      |    ^~~
      |    std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:13:11: error: invalid types 'int[int]' for array subscript
   13 |       if(a[i]>=k){
      |           ^
a.cc:17:4: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   17 |    cout << a << end;
      |    ^~~~
      |    std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:17:17: error: 'end' was not declared in this scope; did you mean 'std::end'?
   17 |    cout << a << end;
      |                 ^~~
      |                 std::end
In file included from /usr/include/c++/14/string:53,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/bits/range_access.h:116:37: note: 'std::end' declared here
  116 |   template<typename _Tp> const _Tp* end(const valarray<_Tp>&) noexcept;
      |                                     ^~~
Language: C++

#include <iostream>
using namespace std;

int main(){
	int K, L;	
	cin >> N >> K;

	int cnt=0;
	for(int i=0;i<n;i++){
 	int h;
 	cin >> h;
 	if(h>K) cnt++;
	}
  	
  	cout << cnt << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:16: error: 'N' was not declared in this scope
    6 |         cin >> N >> K;
      |                ^
a.cc:9:23: error: 'n' was not declared in this scope
    9 |         for(int i=0;i<n;i++){
      |                       ^
Language: C++

#include <iostram>
using namespace std;

int main(){
	int K, L;	
	cin >> N >> K;

	int cnt=0;
	for(int i=0;i<n;i++){
 	int h;
 	cin >> h;
 	if(h>K) cnt++;
	}
  	
  	cout << cnt << endl;
}

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

#include<iostream>
using namespace std
int main()
{
  int n,k;
  int h[n];
  std::cin>>n>>k;
  int i=0,count=0;
  for(i=0;i<n;i++)
    std::cin>>h[i];
  for(i=0;i<n;i++)
  {
    if(h[i]>=k)
      count+=1;
  }
  std::cout<<count;
  return 0;
}

Compiler output:
a.cc:2:20: error: expected ';' before 'int'
    2 | using namespace std
      |                    ^
      |                    ;
    3 | int main()
      | ~~~
Language: C++

#include<iostream>
using namespace std
int main()
{
  int n,k;
  int h[n];
  std::cin>>n>>k;
  int i=0,count=0;
  for(i=0;i<n;i++)
  {
    if(h[i]>=k)
      count+=1;
  }
  std::cout<<count;
  return 0;
}

Compiler output:
a.cc:2:20: error: expected ';' before 'int'
    2 | using namespace std
      |                    ^
      |                    ;
    3 | int main()
      | ~~~
Language: C++

#include <iostream>

using namespace std;

int main() {
    int N, K;
    vector<int> h;

    cin >> N >> K;

    int out = 0;
    for (int i = 0; i < N; i++) {
        int tmp;
        cin >> tmp;
        if (tmp < K) {
            continue;
        } else {
            out++;
        }
    }

    cout << out << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: 'vector' was not declared in this scope
    7 |     vector<int> h;
      |     ^~~~~~
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:7:12: error: expected primary-expression before 'int'
    7 |     vector<int> h;
      |            ^~~
Language: C++

#include <iostream>
#include <vector>

int main(){
  int n, k;
  cin >> n >> k;
  vector<int> A(n);
  int cnt = 0;
  for(int i = 0; i < n; i++){
    cin >> A[i];
    if(A[i] >= K)cnt++;
  }
  cout << cnt << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin >> n >> k;
      |   ^~~
      |   std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:7:3: error: 'vector' was not declared in this scope
    7 |   vector<int> A(n);
      |   ^~~~~~
a.cc:7:3: note: suggested alternatives:
In file included from /usr/include/c++/14/vector:66,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_vector.h:428:11: note:   'std::vector'
  428 |     class vector : protected _Vector_base<_Tp, _Alloc>
      |           ^~~~~~
/usr/include/c++/14/vector:93:13: note:   'std::pmr::vector'
   93 |       using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
      |             ^~~~~~
a.cc:7:10: error: expected primary-expression before 'int'
    7 |   vector<int> A(n);
      |          ^~~
a.cc:10:12: error: 'A' was not declared in this scope
   10 |     cin >> A[i];
      |            ^
a.cc:11:16: error: 'K' was not declared in this scope
   11 |     if(A[i] >= K)cnt++;
      |                ^
a.cc:13:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   13 |   cout << cnt << endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:13:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   13 |   cout << cnt << endl;
      |                  ^~~~
      |                  std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <iostream>
using namespace std;

int main(){
  int N, K;
  scanf("%d%d", &N, &K);
  vector<int> people(N);
  
  for(int i = 0; i < N; i++){
    scanf("%d", A.at(i));
  }
  
  int count = 0;
  
  for(int i = 0; i < N; i++){
    if(A.at(i) >= K)count++;
  }
  
  printf("%d\n", count);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'vector' was not declared in this scope
    7 |   vector<int> people(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> people(N);
      |          ^~~
a.cc:10:17: error: 'A' was not declared in this scope
   10 |     scanf("%d", A.at(i));
      |                 ^
a.cc:16:8: error: 'A' was not declared in this scope
   16 |     if(A.at(i) >= K)count++;
      |        ^
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:4:12: error: variable-sized object may not be initialized except with an empty initializer
    4 |   int h[a]=0;
      |            ^
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:10:6: error: 'a' undeclared (first use in this function)
   10 |  for(a=0;a<n;a++){
      |      ^
main.c:10:6: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include<iosteam>
#include<vector>

using namespace std;

int main(){
  int n,k;
  
  cin >> n >> k;
  
  vector<int> h;
  int wk;
  int ans =0 ;
  for(int i = 0; i < n; i++){
    cin >> wk;
	if(wk >= k)ans++;
  }
  
  cout << ans << endl;
  
  return 0;
  
}

Compiler output:
a.cc:1:9: fatal error: iosteam: No such file or directory
    1 | #include<iosteam>
      |         ^~~~~~~~~
compilation terminated.
Language: Java

import java.util.*;
import java.util.Collections; // sorting use
import java.io.*;
import static java.lang.System.*;
public class Main2  {
    public static void main(String[] args) {
	int i, cnt = 0;
	Scanner sc = new Scanner(System.in);
	int n = sc.nextInt();
	int k = sc.nextInt();
	int h[] = new int[n];
 
	for (i = 0; i < n; i++) {
	    h[i] = sc.nextInt();		
	    if ( h[i] >= k) {
		cnt++;
	    }
	}
	sc.close();
	out.println(cnt);  
    }
}

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


import java.util.*;
import java.util.Collections; // sorting use
import java.io.*;
import static java.lang.System.*;
public class Main  {
    public static void main(String args[]) {
	int i, cnt = 0;
	Scanner sc = new Scanner(System.in);
	int n = sc.nextInt();
	int k = sc.nextInt();
	int h[] = new int[n];

	for (i = 0; i < n; i++) {
	    h[i] = sc.nextInt();		
	    if ( h[i] >= k) {
		cnt++;
	    }
	}
	sc.close();
	out.println(cnt);  




	

Compiler output:
Main.java:21: error: reached end of file while parsing
	out.println(cnt);  
	                 ^
1 error
Language: Java


import java.util.*;
import java.util.Collections; // sorting use
import java.io.*;
import static java.lang.System.*;
public class Main2 {
    public static void main(String args[]) {
	int i, cnt = 0;
	Scanner sc = new Scanner(System.in);
	int n = sc.nextInt();
	int k = sc.nextInt();
	int h[] = new int[n];

	for (i = 0; i < n; i++) {
	    h[i] = sc.nextInt();		
	    if ( h[i] >= k) {
		cnt++;
	    }
	}

	out.println(cnt);  





Compiler output:
Main.java:21: error: reached end of file while parsing
	out.println(cnt);  
	                 ^
1 error
Language: C++

/*
	submission # - User: herp_sy
	https://atcoder.jp/contests/

	coding: utf-8
	lang: C++ (GCC 5.4.1)
*/

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

// utility of stdin,stdout
#define _CRT_SECURE_NO_WARNINGS
#define OUT cout << 
#define BR << endl
#define RET return 0
#define TLong long long
#define TBMod 1000000007

int main(int argc, char const *argv[])
{
	int n,k;
	std::vector<int> h(100003);

	cin >> n >> k;
	for (int i = 0; i < n; ++i)
	{
		cin >> h.at(i);
		if(h.at(i) >= k)	++cnt;
	}
	OUT(cnt) BR;
	RET;
}


Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:29:43: error: 'cnt' was not declared in this scope; did you mean 'int'?
   29 |                 if(h.at(i) >= k)        ++cnt;
      |                                           ^~~
      |                                           int
a.cc:31:13: error: 'cnt' was not declared in this scope; did you mean 'int'?
   31 |         OUT(cnt) BR;
      |             ^~~
      |             int
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define N 200000
int n, K, a[N];

int main() {
    cin >> n >> K;
    int ans = 0;
    for(int i = 1; i <= n; i++) {
        scanf("%d", &a[i]), ans += a[i] >= k;
    }
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:44: error: 'k' was not declared in this scope
   10 |         scanf("%d", &a[i]), ans += a[i] >= k;
      |                                            ^
Language: C++

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

int main() {
  int N,K,count;
  cin >> N >> K;
  vector<int> vec(N);
  for(int i = 0; i < N; i++){
    cin >> vec[i];
  }
  sort(vec.begin(), vec.end())	
  reverse(vec.begin(), vec.end())
  for(int i = 0; i < N; i++){
    if(vec[i] < K){
      count++;
    }
  }
  cout << count <<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:32: error: expected ';' before 'reverse'
   11 |   sort(vec.begin(), vec.end())
      |                               ^ 
      |                                ;
   12 |   reverse(vec.begin(), vec.end())
      |   ~~~~~~~                      
a.cc:13:18: error: 'i' was not declared in this scope
   13 |   for(int i = 0; i < N; i++){
      |                  ^
Language: C++

#include<bits/stc++.h>
using namespace std;
int main(){
  int N,K;
  cin >> N >> K;
  int cnt=0;
  for(int i=0;i<N;i++){
    int h;
    cin >> h;
    if(h>=K){
      cnt++;
    }
  }
  cout << cnt << endl;
}

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

#include<iostream>
#include<string>

using namespace std;

int main(){
	int n,k;
	int cnt=0;
	int h[100000];
	cin>>n>>k;
	for(int i=0;i<n;i++){
		cin>>h[i];
		if(h[i]>k){
			cnt++;
		}
	}
	cout<<cnt<<endl;
	return0;
	
}	

Compiler output:
a.cc: In function 'int main()':
a.cc:18:9: error: 'return0' was not declared in this scope
   18 |         return0;
      |         ^~~~~~~
Language: Java

public class Main{
	public static void main(String[] args){
		Scanner sc=new java.util.Scanner(System.in);
		int counter=0;
		final int N=sc.nextInt();
		final int K=sc.nextInt();
		int[] h=new int[N];
		for(int i=0;i<N;i++){
			h[i]=sc.nextInt();
		}
		for(int i:h){
			if(i>=K){
				counter++;
			}
		}
	}
}

Compiler output:
Main.java:3: error: cannot find symbol
		Scanner sc=new java.util.Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
1 error