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

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

int main() {

	int num;

	cin >> num;

	

	int height[200];
	
	int i = 0;
	for (i = 1; i < (num + 1); num++) {
		cin >> height[i - 1];
	}


	int count = 0;
	int max_height = 0;

	int i = 0;

	for( i = 1; i < (num + 1); num++) {
		
		if( height[i - 1] >= max_height ){
			max_height = height[i - 1];
			count++;
		}
		
	}

	cout << count << endl;



}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:13: error: redeclaration of 'int i'
   23 |         int i = 0;
      |             ^
a.cc:14:13: note: 'int i' previously declared here
   14 |         int i = 0;
      |             ^
Language: C++

#include<bits/stdc++.h>

using namespace std;

int main() {
	
	int num;

	cin >> num;

	

	int height[200];
	
	for ( int i = 1, i < (num + 1), num++) {
		cin >> height[i - 1];
	}


	int count = 0;
	int max_height = 0;

	for( int i = 1, i < (num + 1), num++) {
		
		if( height[i - 1] >= max_height ){
			max_height = height[i - 1];
			count++;
		}
		
	}

	cout << count << endl;



}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:27: error: expected ';' before '<' token
   15 |         for ( int i = 1, i < (num + 1), num++) {
      |                           ^~
      |                           ;
a.cc:15:28: error: expected primary-expression before '<' token
   15 |         for ( int i = 1, i < (num + 1), num++) {
      |                            ^
a.cc:15:46: error: expected ';' before ')' token
   15 |         for ( int i = 1, i < (num + 1), num++) {
      |                                              ^
      |                                              ;
a.cc:23:26: error: expected ';' before '<' token
   23 |         for( int i = 1, i < (num + 1), num++) {
      |                          ^~
      |                          ;
a.cc:23:27: error: expected primary-expression before '<' token
   23 |         for( int i = 1, i < (num + 1), num++) {
      |                           ^
a.cc:23:45: error: expected ';' before ')' token
   23 |         for( int i = 1, i < (num + 1), num++) {
      |                                             ^
      |                                             ;
Language: C++

#include <iostream>
using namespace std;

int main() {
  int N,sum=0,lim=0;
  vector<int> H(N);
  
  cin >> N;
  for (int x:H) {
    cin >> H;
  }
  lim = H(0);
  for (int i=0;i<N;i++) {
    if  (H(i) >= lim) {
      lim = H(i)
      sum++;
    } else {
      continue;
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'vector' was not declared in this scope
    6 |   vector<int> H(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:6:10: error: expected primary-expression before 'int'
    6 |   vector<int> H(N);
      |          ^~~
a.cc:9:14: error: 'H' was not declared in this scope
    9 |   for (int x:H) {
      |              ^
a.cc:12:9: error: 'H' was not declared in this scope
   12 |   lim = H(0);
      |         ^
Language: C++

#include<iostream>

using namespace std;

int main(){
  int n;
  scanf("%d",&n);
  int s[n];
  for(int i=0;i<n;i++)
  {
    int temp;
    scanf("%d",&temp);
    s[i]= temp;
  }
  int cnt=1;
  if(n==1)
  {
    cout<< cnt;
    return 0;
  }
  int MAx=s[0];
  for(int i= 1;i<n;i++)
  {
    if(s[i]>MAX)
    {
      MAX=s[i];
      cnt++;
    }
  }
  cout<< cnt<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:13: error: 'MAX' was not declared in this scope; did you mean 'MAx'?
   24 |     if(s[i]>MAX)
      |             ^~~
      |             MAx
Language: Java

import java.util.*;
public class Main{
  public static void main(String[] args){
    
    Scanner sc = new Scanner(System.in);
    
    int a = sc.nextInt();
    int[] h;
    int minIndex=0;
    int sum=0;
    
    for(int i=0;i<a;i++){
      h[i] = sc.nextInt();
    }
    
    for(int i=0;i<a;i++){
      if(h[minIndex] <= h[i]){
        sum+=1;
        minIndex = i;
      }
    }
    
  }
}
    
    

Compiler output:
Main.java:13: error: variable h might not have been initialized
      h[i] = sc.nextInt();
      ^
Main.java:17: error: variable h might not have been initialized
      if(h[minIndex] <= h[i]){
         ^
2 errors
Language: Java

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        List<Integer> l = new ArrayList<>();
        for (int i = 0; i < N; i++){
            l.add(sc.nextInt());
        }
        int max = -1;
        int count = 0;
        for (int i = 0; i < l.size();i++){
            if (l.get(i) >= max){
                count++;
            }
            max = Math.max(max,l.get(i));
        }
        System.out.println(count);
    }
}

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
Main.java:5: error: cannot find symbol
        List<Integer> l = new ArrayList<>();
        ^
  symbol:   class List
  location: class Main
Main.java:5: error: cannot find symbol
        List<Integer> l = new ArrayList<>();
                              ^
  symbol:   class ArrayList
  location: class Main
4 errors
Language: C++

#include <iostream>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#include <algorithm>
#include <utility>
using namespace std;

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

    int res = 0;

    int cur_max = INT_MIN;
    while (n--) {
        int k; cin >> k;
        if (k >= cur_max) res++;
        cur_max = max(cur_max, k);
    }

    cout << res << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:19: error: 'INT_MIN' was not declared in this scope
   15 |     int cur_max = INT_MIN;
      |                   ^~~~~~~
a.cc:7:1: note: 'INT_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    6 | #include <utility>
  +++ |+#include <climits>
    7 | using namespace std;
Language: C++

#include<iostream>
using namespace std;
int maim(){
	
	int n,h[101];
	int i,j,max,cnt;
	
	cin>>n;
	for(i=0;i<n;i++) cin>>h[i];
	
	max=h[0];
	
	for(i=1;i<n;i++){
		if(max<=h[i]){
			cnt++;
			max=h[i];
		}
	}		
	
	cout<< cnt <<endl;
	return 0;
}	
	

Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#include <iostream>
#include <iomanip>
#include <algorithm>
#include <vector>
#include <string>
#include <map>

using namespace std;
int maim(){
	
	int n,h[101];
	int i,j,max,cnt;
	
	cin>>n;
	for(i=0;i<n;i++) cin>>h[i];
	
	max=h[0];
	
	for(i=1;i<n;i++){
		if(max<=h[i]){
			cnt++;
			max=h[i];
		}
	}		
	
	cout<< cnt <<endl;
	return 0;
}	
	

Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#include <stdio.h>
using namespace std;
int maim(void){
	
	int n,h[101];
	int i,j,max,cnt;
	
	cin>>n;
	for(i=0;i<n;i++) cin>>h[i];
	
	max=h[0];
	
	for(i=1;i<n;i++){
		if(max<=h[i]){
			cnt++;
			max=h[i];
		}
	}		
	
	cout<< cnt <<endl;
	return 0;
}	
	

Compiler output:
a.cc: In function 'int maim()':
a.cc:8:9: error: 'cin' was not declared in this scope
    8 |         cin>>n;
      |         ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include <stdio.h>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:20:9: error: 'cout' was not declared in this scope
   20 |         cout<< cnt <<endl;
      |         ^~~~
a.cc:20:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:20:22: error: 'endl' was not declared in this scope
   20 |         cout<< cnt <<endl;
      |                      ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    1 | #include <stdio.h>
  +++ |+#include <ostream>
    2 | using namespace std;
Language: C++

#include<bits/stdc++.h>

int main(void){
  int N;
  cin>>N;
  
  vector<int> H(N);
  
  for(int i=0;i<N;i++){
    cin>>H[i];
  }
  
  int ans=0;
  
  int Max=0;
  
  for(int i=0;i<N;i++){
    if(H[i]>=Max) ans++;
    Max=max(Max,H[i]);
  }
  
  cout<<ans<<endl;
  
  
  
  return 0;
}

Compiler output:
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;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 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> H(N);
      |   ^~~~~~
a.cc:7:3: note: suggested alternatives:
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53:
/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> H(N);
      |          ^~~
a.cc:10:10: error: 'H' was not declared in this scope
   10 |     cin>>H[i];
      |          ^
a.cc:18:8: error: 'H' was not declared in this scope
   18 |     if(H[i]>=Max) ans++;
      |        ^
a.cc:19:17: error: 'H' was not declared in this scope
   19 |     Max=max(Max,H[i]);
      |                 ^
a.cc:19:9: error: 'max' was not declared in this scope; did you mean 'std::max'?
   19 |     Max=max(Max,H[i]);
      |         ^~~
      |         std::max
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: 'std::max' declared here
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
a.cc:22:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   22 |   cout<<ans<<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:22:14: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   22 |   cout<<ans<<endl;
      |              ^~~~
      |              std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: Java

import java.util.*;

public class Main {
        public static void main(String[] args){
            Scanner sc =new Scanner(System.in);
            double n = sc.nextInt();
            int[] h = new int[n];
            for(int i=0;i<n;i++){
                h[i] = sc.nextInt();
            }
            int max = h[0];
            int sum = 1;
            for(int j=1;j<n;j++){
                if(h[j]>=max){
                    sum++;
                    max=h[j];
                }
            }
            System.out.println(sum);
            for(double k = 0;k<10000000;k=k+0.5){
                sum=sum*2;
                sum=sum/2;
            }
        }

        }



Compiler output:
Main.java:7: error: incompatible types: possible lossy conversion from double to int
            int[] h = new int[n];
                              ^
1 error
Language: C++

#include <stdio.h>
#include <algorithm>
#include <math.h>
using namespace std;
int main()
{
int n,h[20];
scanf("%d",&n);
int ans=0;
int max=0;
for(int i=0;i<n;i++)
{
scanf("%d",&h[i]);
if(max<h[i]){max=h[i];}
if(h[i]>=max){ans++;}
}
printf("%d\n,ans);
}

Compiler output:
a.cc:17:8: warning: missing terminating " character
   17 | printf("%d\n,ans);
      |        ^
a.cc:17:8: error: missing terminating " character
   17 | printf("%d\n,ans);
      |        ^~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:18:1: error: expected primary-expression before '}' token
   18 | }
      | ^
Language: C++

#include <iostream>
using namespace std;
int main(void){
int i, N, ans, max;
cin >> N;
int h[N];
for (i=0;i<N;i++){
cin >> h[i];
}
ans=0;
max=1

for (int j=0; j<N;j++){
if (h[j]>=max)
{
ans++;
max=h[j];
}
}
cout << ans;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:6: error: expected ';' before 'for'
   11 | max=1
      |      ^
      |      ;
   12 | 
   13 | for (int j=0; j<N;j++){
      | ~~~   
a.cc:13:15: error: 'j' was not declared in this scope
   13 | for (int j=0; j<N;j++){
      |               ^
Language: C++

#include <iostream>
using namespace std;
int main(void){
int i, N, ans, max;
cin >> N;
int h[N];
for (i=0;i<N;i++){
cin >> h[i];
}
ans=0;
max=1

for (int j=0; j<N;j++){
if (h[j]>=max)
{
ans++;
max=h[j];
}
else{
break;
}
}
cout << ans;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:6: error: expected ';' before 'for'
   11 | max=1
      |      ^
      |      ;
   12 | 
   13 | for (int j=0; j<N;j++){
      | ~~~   
a.cc:13:15: error: 'j' was not declared in this scope
   13 | for (int j=0; j<N;j++){
      |               ^
Language: C

int n,h[100],i,m=1,k;
scanf("%d",&n);
for(i=0;i<n;i++)
scanf("%d",&h[i]);
k=h[0];
for(i=1;i<n;i++){
if(k<=h[i]){k=h[i]; m++}}
printf("%d",m);
return 0;
}

Compiler output:
main.c:2:7: error: expected declaration specifiers or '...' before string constant
    2 | scanf("%d",&n);
      |       ^~~~
main.c:2:12: error: expected declaration specifiers or '...' before '&' token
    2 | scanf("%d",&n);
      |            ^
main.c:3:1: error: expected identifier or '(' before 'for'
    3 | for(i=0;i<n;i++)
      | ^~~
main.c:3:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    3 | for(i=0;i<n;i++)
      |          ^
main.c:3:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
    3 | for(i=0;i<n;i++)
      |              ^~
main.c:5:1: warning: data definition has no type or storage class
    5 | k=h[0];
      | ^
main.c:5:1: error: type defaults to 'int' in declaration of 'k' [-Wimplicit-int]
main.c:5:3: error: initializer element is not constant
    5 | k=h[0];
      |   ^
main.c:6:1: error: expected identifier or '(' before 'for'
    6 | for(i=1;i<n;i++){
      | ^~~
main.c:6:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    6 | for(i=1;i<n;i++){
      |          ^
main.c:6:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
    6 | for(i=1;i<n;i++){
      |              ^~
main.c:8:8: error: expected declaration specifiers or '...' before string constant
    8 | printf("%d",m);
      |        ^~~~
main.c:8:13: error: expected declaration specifiers or '...' before 'm'
    8 | printf("%d",m);
      |             ^
main.c:9:1: error: expected identifier or '(' before 'return'
    9 | return 0;
      | ^~~~~~
main.c:10:1: error: expected identifier or '(' before '}' token
   10 | }
      | ^
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:9:24: error: expected ';' before '}' token
    9 | if(k<=h[i]){k=h[i]; m++}}
      |                        ^
      |                        ;
Language: C

#include<stdio.h>

int main(void)
{
   int a,i,c=1;
   int b[100];

   scanf("%d",&a);

   for(i=0;a>i;i++){
      scanf("%d",&b[i]);

      if(b[i-1]<b[i] && b[0]<b[i]){
         c = c+1;
      }
   }

   printf("%d\n",c);

   return 0;
}
~  

Compiler output:
main.c:22:1: error: expected identifier or '(' before '~' token
   22 | ~
      | ^
Language: C++

#include <iostream>

int main(void){
	int result = 0;
  	int N;
  	std::cin >> N;
  
  	int* array = new int[N];
  
  	for(int i = 0; i < N; ++i){
    	std::cin >> array[i];
    }
  
  	int count = 0;
  	for(int i = N-1; i > 0; --i){
      isOk = true;
      for(int j = i-1; j >=0; --j){
     	if(array[i] < array[j]){
          isOk = false;
          break;
        }
      }
      if(isOk) ++count;
    }
          
  	std::cout << count;
    delete array;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:7: error: 'isOk' was not declared in this scope
   16 |       isOk = true;
      |       ^~~~
Language: C++

/*
  #問題：
  


  #分析：
  #オブジェクト：
  
  #条件：
  

  #要求：
  

  #解法：
  
*/

#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <fstream>
#include <sstream>
#include <set>
#include <map>
#include <vector>
#include <list>
#include <algorithm>
#include <cstring>
#include <cmath>
#include <string>
#include <queue>
#include <stack>
#include <numeric>
#include <bitset>     //UWAGA - w czasie kompilacji musi byc znany rozmiar wektora - nie mozna go zmienic
#include <cassert>
#include <iomanip>        //do setprecision
#include <ctime>
#include <complex>
#include <initializer_list>
#define FOR(i,b,e) for(int i=(b);i<(e);++i)
#define FORQ(i,b,e) for(int i=(b);i<=(e);++i)
#define FORD(i,b,e) for(int i=(b)-1;i>=(e);--i)
#define REP(x, n) for(int x = 0; x < (n); ++x)

#define ST first
#define ND second
#define PB push_back
#define MP make_pair
#define LL long long
#define uLL unsigned LL
#define LD long double

const double pi = 3.141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342;
const int mod=1000000007;


const unsigned int BIT_FLAG_0 = (1<<0);
const unsigned int BIT_FLAG_1 = (1<<1);
const unsigned int BIT_FLAG_2 = (1<<2);
const unsigned int BIT_FLAG_3 = (1<<3);
const unsigned int BIT_FLAG_4 = (1<<4);
const unsigned int BIT_FLAG_5 = (1<<5);
const unsigned int BIT_FLAG_6 = (1<<6);
const unsigned int BIT_FLAG_7 = (1<<7);


#include <boost/multiprecision/cpp_dec_float.hpp>
#include <boost/multiprecision/cpp_int.hpp>
using namespace std;
namespace mp = boost::multiprecision;

using Bint = mp::cpp_int;



int main(void){
  int n; cin>>n;
  vector<int> a(n);
  int cnt=0,max=0;
  FOR(i,0,N) {
    cin>>a[i];
    if(a[i]>=max){
      max=a[i];
      cnt++;
    }
  }
  cout<<cnt<<endl;
  return 0;
}



Compiler output:
a.cc:68:10: fatal error: boost/multiprecision/cpp_dec_float.hpp: No such file or directory
   68 | #include <boost/multiprecision/cpp_dec_float.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: Java

import java.util.*;

public class Abc124b {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();

		int ts = sc.nextInt();

		int ans = 1;

		for (int i = 1; i < n; i++) {
			int tmp = sc.nextInt();
			if (tmp >= ts){
				ans++;
			if (tmp > ts) {
				ts = tmp;
			}

			}
		}
		System.out.println(ans);
	}
}

Compiler output:
Main.java:3: error: class Abc124b is public, should be declared in a file named Abc124b.java
public class Abc124b {
       ^
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 first = sc.nextInt();
    int ans = 1;
    
    for(int i=0;i<N;i++){
      int a = sc.nextInt();
      if(a >= first){
        ans++;
        int first = a;
      }
    }
    System.out.println(ans);
  }
}

Compiler output:
Main.java:14: error: variable first is already defined in method main(String[])
        int first = a;
            ^
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[] box = new int[N];
    int ans = 1;
    
    for(int i=0;i<N;i++){
      box[i] = sc.nextInt();
      if(int[i] == Math.max(box[0],data[i])){
        ans++;
      }
    }
    System.out.println(ans);
  }
}


Compiler output:
Main.java:12: error: ']' expected
      if(int[i] == Math.max(box[0],data[i])){
             ^
Main.java:12: error: ';' expected
      if(int[i] == Math.max(box[0],data[i])){
              ^
Main.java:12: error: ';' expected
      if(int[i] == Math.max(box[0],data[i])){
                                           ^
3 errors
Language: C

#include<stdio.h>

#define MAX 20
int main()
{
  int n,a[MAX],i=0,


  scanf("%d",&n);
  for(;i<n;i++)
    scanf("%d", &a[i]);

  int count=1, M=a[0];
  for(i=1;i<n;i++)
    if(M<=a[i])
      {
	count++;
	M=a[i];
      }


  printf("%d\n",count);


  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:9:9: error: expected declaration specifiers or '...' before string constant
    9 |   scanf("%d",&n);
      |         ^~~~
main.c:9:14: error: expected declaration specifiers or '...' before '&' token
    9 |   scanf("%d",&n);
      |              ^
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[] box = new int[N];
    int ans = 1;
    
    for(int i=0;i<N;i++){
      box[i] = sc.nextInt();
      if(int[i] == max){
        ans++;
      }
    }
    System.out.println(ans);
  }
}

Compiler output:
Main.java:12: error: ']' expected
      if(int[i] == max){
             ^
Main.java:12: error: ';' expected
      if(int[i] == max){
              ^
Main.java:12: error: not a statement
      if(int[i] == max){
                   ^
Main.java:12: error: ';' expected
      if(int[i] == max){
                      ^
4 errors
Language: C

#include<stdio.h>

int main(void)
{
  int n;
  int h[100];
  int c=1;
  
  scanf("%d",&n);
  for(int i=1;i<=n;i++){
    scanf("%d",&h[i]);
  }
  int max=h[0];
  for(i=1;i<=n;i++){
    if(max<=h[i]){
      c++;
      max=h[i];
    }
  }
  return 0;
  
  

Compiler output:
main.c: In function 'main':
main.c:14:7: error: 'i' undeclared (first use in this function)
   14 |   for(i=1;i<=n;i++){
      |       ^
main.c:14:7: note: each undeclared identifier is reported only once for each function it appears in
main.c:20:3: error: expected declaration or statement at end of input
   20 |   return 0;
      |   ^~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main(){
  int n,result,highest;
  cin >> n;
  result = 0;
  highest = 0;
  vector<int> hotel(n);
  for(int i = 0;i<n;i++){
    cin  >> hotel[i];
  }
  
  for(int i = 0;i<n;i++){
    if(h[i] >= highest){
      result += 1;
      highest = h[i];
    }
  }
  cout << result << endl;
}

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

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

int main(){
  int N,A=1;
  cin>>N;
  vector<int> a(N);
  for(int i=0;i<N;i++){cin>>a.at(i);}
  for(int i=1;i<N;i++){
    if(a.at(i-1)<a.at(i)){A++;}
    else{break;}
  cout<<A<<endl;
}

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

#include<iostream>
#include<vector>
using namespace std;
int mian(){
    int N=0;
    int ans=1;
    cin >> N;
    vector<int> l(N);
    for(int  i=1; i <= N ; i++){
        cin >> l[i];
    }
    for(int i=2; i <= N ; i++){
        if(l[1]<=l[i]){
            if(l[i-1]<=l[i]){
                ans++;
            }
        }
    } 
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int mian()':
a.cc:20:1: warning: no return statement in function returning non-void [-Wreturn-type]
   20 | }
      | ^
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

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

int main() {
  int N;
  int H[110];
  cin >> N;
  for (int i = 0; i < N; ++i) cin H[i];

  int hotel = 1;
  int max = H[0];
  for (int i = 1; i < N; ++i) {
    if (H[i] > max) {
      ++hotel;
      max = H[i];
    }
  }
  cout << hotel << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:34: error: expected ';' before 'H'
    9 |   for (int i = 0; i < N; ++i) cin H[i];
      |                                  ^~
      |                                  ;
Language: C++

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

int main() {
  int N;
  int H[110];
  cin >> N;
  for (int i = 0; i < N; ++i) cin H[i];

  int hotel = 1;
  int max = H[0];
  for (int i = 0; i < N-1; ++i) {
    if (H[i+1] > max) {
      ++hotel;
      max = H[i+1];
    }
  }
  cout << hotel << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:34: error: expected ';' before 'H'
    9 |   for (int i = 0; i < N; ++i) cin H[i];
      |                                  ^~
      |                                  ;
Language: C++

#include <iostream>
using namespace std;

int main() {
  int N;
  int H[110];
  cin >> N;
  for (int i = 0; i < N; ++i) cin H[i];

  int hotel = 1;
  int max = H[0];
  for (int i = 0; i < N-1; ++i) {
    if (H[i+1] > max) {
      ++hotel;
      max = H[i+1];
    }
  }
  cout << hotel << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:34: error: expected ';' before 'H'
    8 |   for (int i = 0; i < N; ++i) cin H[i];
      |                                  ^~
      |                                  ;
Language: C

#include <stdio.h>

int main(){
    int n;
    int h[101]; 
 
    scanf("%d", &n);
    for(int i=0 ; i<n; ++i)scanf("%d",&h[i]);
 
    int max_height = h[0];
    int count=1;
    for(int i=1 ; i<n ; ++i){
        if(max_height <= h[i])
            count++;
            max_height = h[i];
    }
    printf("%d", count);
    re

Compiler output:
main.c: In function 'main':
main.c:18:5: error: 're' undeclared (first use in this function)
   18 |     re
      |     ^~
main.c:18:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:18:7: error: expected ';' at end of input
   18 |     re
      |       ^
      |       ;
main.c:18:5: error: expected declaration or statement at end of input
   18 |     re
      |     ^~
Language: C

#include <stdio.h>

int main(void){
  int n,h[20],i,ok;
  scanf("%d"&n);
  ok=n;
  for(i=1;i<n;i++){
    for(k=0;k<i;k++){
      if(h[k]>h[i]) ok--;
    }
  }
  
  printf("%d\n",ok);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:13: error: invalid operands to binary & (have 'char *' and 'int')
    5 |   scanf("%d"&n);
      |         ~~~~^
      |         |
      |         char *
main.c:8:9: error: 'k' undeclared (first use in this function); did you mean 'ok'?
    8 |     for(k=0;k<i;k++){
      |         ^
      |         ok
main.c:8:9: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

5
9 5 6 8 4#include <bits/stdc++.h>
using namespace std;

int main(){
  int N; 
  cin >> N;
  vector<int> A(N);
  int n=0;
for(int i=0;i<A.size();i++){
  cin >> A.at(i);
for(int j=0;j<=i;j++){
  if(A.at(i)<A.at(j)){
    break;
  }
  if(j==i){
  n++;
  }
  }
  }
  cout << n << endl;
}

Compiler output:
a.cc:2:10: error: stray '#' in program
    2 | 9 5 6 8 4#include <bits/stdc++.h>
      |          ^
a.cc:1:1: error: expected unqualified-id before numeric constant
    1 | 5
      | ^
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope
    7 |   cin >> N;
      |   ^~~
a.cc:8:3: error: 'vector' was not declared in this scope
    8 |   vector<int> A(N);
      |   ^~~~~~
a.cc:8:10: error: expected primary-expression before 'int'
    8 |   vector<int> A(N);
      |          ^~~
a.cc:10:15: error: 'A' was not declared in this scope
   10 | for(int i=0;i<A.size();i++){
      |               ^
a.cc:21:3: error: 'cout' was not declared in this scope
   21 |   cout << n << endl;
      |   ^~~~
a.cc:21:16: error: 'endl' was not declared in this scope
   21 |   cout << n << endl;
      |                ^~~~
Language: C++

#include <iostream>
#include <vector>

using namespace std;

int main(void){
  int n;
  int count = 1;
  vector<int> arr(n);
  for(int i=0;i<n;i++){
    cin >> arr[i];
  }
  for(int i=0;i<n;i++){
    if(arr[0] =< arr[i]){
      count++;
    }
  }
  cout << count << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:16: error: expected primary-expression before '<' token
   14 |     if(arr[0] =< arr[i]){
      |                ^
Language: C++

#include<bits/stdc++.h>

using namespace std;

int main(){

	int n;
  cin>>n;
  vector<int>h(n);
  
  for(int i=0;i<n;i++){
  	cin>>h[i];
  }
  
  
  int count =0;
  
  for(int i=0;i<n;i++){
  	bool done = true;
    
    for(int j=i-1;j>=0;j--){
    	if(a[j]>a[i]){
        	done = false;
          	break;
        }
    }
    
    if(done){
    	count++;
    }
  
  }
  
  cout<<count;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:12: error: 'a' was not declared in this scope
   22 |         if(a[j]>a[i]){
      |            ^
Language: Java

import java.until.*

public class Main {

	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		Scanner sa = new Scanner(System.in);
		int building[] = new int[n-1]; 
		for(int i = 0;i < n ; i++){
			building[i] = sa.nextInt();
		}

		int ans =1;

		for(int j =1;j<n;j++){
			int counter=0;
			for(int k=0;k<j;k++){
				if(building[k] < building[j]){
					counter++;
				}
			}
			if(counter == j){
				ans++;
			}
		}

		System.out.println(ans);

	}
}

Compiler output:
Main.java:1: error: ';' expected
import java.until.*
                   ^
1 error
Language: Java

import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt;
    int[] h;
    int i = 1;
    while(sc.hasNext()) {
      h[i] = sc.nextInt();
      i++;
    }
    
    int cnt = 0;
    int isGood = True;
    for(int i = 1; i <= h.length; i++) {
	  for (int j = 1; j < i; j++) {
		if (h[j] > h[i]) {
		  isGood = false;
        }
      }
      if (isGood) {
        cnt++;
      }
    }
    System.out.println(cnt);
  }
}

Compiler output:
Main.java:6: error: cannot find symbol
    int n = sc.nextInt;
              ^
  symbol:   variable nextInt
  location: variable sc of type Scanner
Main.java:15: error: cannot find symbol
    int isGood = True;
                 ^
  symbol:   variable True
  location: class Main
Main.java:16: error: variable i is already defined in method main(String[])
    for(int i = 1; i <= h.length; i++) {
            ^
Main.java:19: error: incompatible types: boolean cannot be converted to int
		  isGood = false;
		           ^
Main.java:22: error: incompatible types: int cannot be converted to boolean
      if (isGood) {
          ^
5 errors
Language: Java

import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt;
    int[] h;
    int i = 1;
    while(sc.hasNext()) {
      h[i] = sc.nextInt();
      i++;
    }
    
    int cnt = 0;
    int isGood = True;
    for(int i = 1; i <= h.length; i++) {
	  for (int j = 1; j < i; j++) {
		if (h[j] > h[i]) {
		  isGood = false;
        }
      }
      if (isGood {
        cnt++;
      }
    }
    System.out.println(cnt);
  }
}

Compiler output:
Main.java:22: error: ')' expected
      if (isGood {
                ^
1 error
Language: Java

import java.util.Scanner;

public class Test{
    public static void main(String args[]){
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();

        int input_int[] = new int[n];
        int oceanView = 0;
        int curMax = 0;
        for(int i = 0; i < n; i++){
            input_int[i] = scanner.nextInt();
            curMax = Math.max(curMax, input_int[i]);
            if(input_int[i] == curMax) oceanView++;
        }
        scanner.close();

        System.out.println(oceanView);
    }
}


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 <iostream>
#include <string>
#include <algorithm>
#include <vector>
using namespace std;

int main(){
  int N;
  cin >> N;
  vector<int> H(N);
  for (int i=0;i<N;i++){
    cin >> H[i];
  }
  
  int ans=0;
  
  for (int i=1;i<N;i++){
    if (H[i] => H[i-1]){
      ans += 1;
    }
  }
  
  cout << ans + 1 <<endl;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:15: error: expected primary-expression before '>' token
   18 |     if (H[i] => H[i-1]){
      |               ^
Language: C++

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

int main(){
  int N;
  cin >> N;
  vector<int> H(N);
  for (int i=0;i<N;i++){
    cin >> H[i];
  }
  
  int ans=0;
  
  for (i=1;i<N;i++){
    if (H[i] => H[i-1]){
      ans += 1;
    }
  }
  
  cout << ans + 1 <<endl;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:8: error: 'i' was not declared in this scope
   17 |   for (i=1;i<N;i++){
      |        ^
a.cc:18:15: error: expected primary-expression before '>' token
   18 |     if (H[i] => H[i-1]){
      |               ^
Language: C++

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

int main(){
  int N;
  cin >> N;
  vector<int> H(N);
  for (int i=0;i<N;i++){
    cin >> H[i];
  }
  
  int ans=0;
  
  for (i=1;i<N;i++){
    if (H[i] => H[i-1]){
      ans += a;
    }
  }
  
  cout << ans + a <<endl;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:8: error: 'i' was not declared in this scope
   17 |   for (i=1;i<N;i++){
      |        ^
a.cc:18:15: error: expected primary-expression before '>' token
   18 |     if (H[i] => H[i-1]){
      |               ^
a.cc:19:14: error: 'a' was not declared in this scope
   19 |       ans += a;
      |              ^
a.cc:23:17: error: 'a' was not declared in this scope
   23 |   cout << ans + a <<endl;
      |                 ^
Language: C++

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

int main(){
  int N;
  cin >> N;
  vecotr<int> H(N);
  for (int i=0;i<N;i++){
    cin >> H[i];
  }
  
  int ans=0;
  
  for (i=1;i<N;i++){
    if (H[i] => H[i-1]){
      ans += a;
    }
  }
  
  cout << ans + a <<endl;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: 'vecotr' was not declared in this scope
   10 |   vecotr<int> H(N);
      |   ^~~~~~
a.cc:10:10: error: expected primary-expression before 'int'
   10 |   vecotr<int> H(N);
      |          ^~~
a.cc:12:12: error: 'H' was not declared in this scope
   12 |     cin >> H[i];
      |            ^
a.cc:17:8: error: 'i' was not declared in this scope
   17 |   for (i=1;i<N;i++){
      |        ^
a.cc:18:9: error: 'H' was not declared in this scope
   18 |     if (H[i] => H[i-1]){
      |         ^
a.cc:18:15: error: expected primary-expression before '>' token
   18 |     if (H[i] => H[i-1]){
      |               ^
a.cc:19:14: error: 'a' was not declared in this scope
   19 |       ans += a;
      |              ^
a.cc:23:17: error: 'a' was not declared in this scope
   23 |   cout << ans + a <<endl;
      |                 ^
Language: C++

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

int main(){
  // input
  int N; cin >> N;
  vector<int> H(N);
  for (int i = 0; i < N; i++) {
    cin >> H[i];
  }
  
  // compute
  int ans = 0;
  for (int i = 0; i < N; i++) {
    bool flag = true;
    for (int j = 0; j < i; j++) {
      if (H[i]<H[j]) {
        flag = false;
        break;
      }
    }
  }
  if (flag) {
    ans++;
  }
  
  // output
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:7: error: 'flag' was not declared in this scope
   23 |   if (flag) {
      |       ^~~~
Language: C++

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

int main(){
  // input
  int N; cin >> N;
  vector<int> H(N);
  for (int i = 0; i < N; i++) {
    cin >> H[i];
  }
  
  // compute
  int ans = 0;
  for (int i = 0; i < N; i++) {
    bool flag = true;
    for (int j = 0; j < i; j++) {
      if (H[i]<H[j]) {
        flag = false;
        break;
    }
  }
  if (flag) {
    ans++;
  }
  
  // output
  cout << ans << endl;
}

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

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

int main() {
  int N;
  cin>>N;
  vector<int> H(N);
  for (int i = 0; i < N; i++) {
    cin >> H.at(i);
  }
  int counter = 1;
  int ma = -1;
  for (int j = 0;j<N;j++){
    if(H[j]>=ma) {
      counter = counter + 1;
      ma = H[j]
    }
  }
  cout<<counter<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:16: error: expected ';' before '}' token
   16 |       ma = H[j]
      |                ^
      |                ;
   17 |     }
      |     ~
Language: C++

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

int main() {
  int N;
  cin>>N;
  vector<int> H(N);
  for (int i = 0; i < N; i++) {
    cin >> H.at(i);
  }
  int counter = 1;
  int ma = -1;
  for (int j = 0;j<N;j++){
    if(H[j]>=ma){
      counter = counter + 1;
      ma = H[j]
    }
  }
  cout<<counter<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:16: error: expected ';' before '}' token
   16 |       ma = H[j]
      |                ^
      |                ;
   17 |     }
      |     ~
Language: C++

include<bits/stdc++.h>
using namespace std;
int main() {
	int n; cin >> n;
	vector<int>H[n];
	for (int i = 0; i < n; i++) {
		cin >> H[i];
	}
	int ans = 0;
	for (int i = 0; i < n; i++) {
		bool flag = true;
		for (int j = 0; j < i; j++) {
			if (H[j] > H[i]) flag = false
		}
		if (flag)ans++;
	}

	}
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:4:16: error: 'cin' was not declared in this scope
    4 |         int n; cin >> n;
      |                ^~~
a.cc:5:9: error: 'vector' was not declared in this scope
    5 |         vector<int>H[n];
      |         ^~~~~~
a.cc:5:16: error: expected primary-expression before 'int'
    5 |         vector<int>H[n];
      |                ^~~
a.cc:7:24: error: 'H' was not declared in this scope
    7 |                 cin >> H[i];
      |                        ^
a.cc:13:29: error: 'H' was not declared in this scope
   13 |                         if (H[j] > H[i]) flag = false
      |                             ^
a.cc:13:54: error: expected ';' before '}' token
   13 |                         if (H[j] > H[i]) flag = false
      |                                                      ^
      |                                                      ;
   14 |                 }
      |                 ~                                     
a.cc: At global scope:
a.cc:19:1: error: expected declaration before '}' token
   19 | }
      | ^
Language: C++

#include <iostream>
#include <iomanip>
#include <string>
#include <map>
#include <math.h>
#include <vector>
#include <algorithm>
#include <cstdio>
#include <set>
#include <queue>
#include <sstream>
#include <stack>
#include <deque>
#include <memory.h>
#include <cassert>
#include <ctime>
#include <climits>
#include <list>
#include <time.h>
#include <unordered_map>
#include <bitset>
#include <exception>

using namespace std;


int main(){
  int n;
  cin >> n;
  int arr[n];
  int count = 1;
  int currMax;
  cin >> currMax;
  int temp;
  
  for(i = 0; i < n-1; i++){
    cin >> temp;
    if (temp >= currMax){
      count++;
      currMax = temp;
    }
  }
  cout << count <<endl;
  
  
  
}


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

#include <iostream>
#include <iomanip>
#include <string>
#include <map>
#include <math.h>
#include <vector>
#include <algorithm>
#include <cstdio>
#include <set>
#include <queue>
#include <sstream>
#include <stack>
#include <deque>
#include <memory.h>
#include <cassert>
#include <ctime>
#include <climits>
#include <list>
#include <time.h>
#include <unordered_map>
#include <bitset>
#include <exception>

using namespace std;


int main(){
  int n;
  cin >> n;
  int arr[n];
  int count = 1;
  int currMax;
  cin >> currMax;
  int temp;
  
  for(i = 0; i < n-1; i++){
    cin >> temp;
    if (temp >= currMax){
      count++;
      currMax = temp;
    }
  }
  cout << count;
  
  
  
}

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

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

int main() {
	int N;
	cin >> N;
	vector <int> height(N);
	bool ans = true;
	int count = 0;
	for(int i = 0; i < N; i++) {
		cin >>height[i];
	}
	int max = 0;
	int ans = 0;
	for(int i = 0;i < N;i++){
	if(max <= height[i]){
		max = height[i];
        ans++;
	}
	}
cout << count << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:13: error: conflicting declaration 'int ans'
   14 |         int ans = 0;
      |             ^~~
a.cc:8:14: note: previous declaration as 'bool ans'
    8 |         bool ans = true;
      |              ^~~
a.cc:18:9: error: use of an operand of type 'bool' in 'operator++' is forbidden in C++17
   18 |         ans++;
      |         ^~~
Language: C++

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

int main() {
	int N;
	cin >> N;
	vector <int> height;
	bool ans = true;
	int count = 0;
	cin >> vector <int> height;
	for(int i = 0;i < N;i++){
	if(heght.at(i) > height.at(i +1)){
	count++;
	}else	{ans = false;
	break;
}
}
cout << count << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:29: error: expected primary-expression before 'height'
   10 |         cin >> vector <int> height;
      |                             ^~~~~~
a.cc:12:12: error: 'heght' was not declared in this scope; did you mean 'height'?
   12 |         if(heght.at(i) > height.at(i +1)){
      |            ^~~~~
      |            height
Language: C++

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

int main() {
	int N;
	cin >> N;
	vector <int> height;
	bool ans = True;
	int count = 0;
	cin >> vector <int> height;
	for(int i = 0;i < N;i++){
	if(heght.at(i) > height.at(i +1)){
	count++;
	}else	{ans = False;
	break;
}
}
cout << count << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:20: error: 'True' was not declared in this scope
    8 |         bool ans = True;
      |                    ^~~~
a.cc:10:29: error: expected primary-expression before 'height'
   10 |         cin >> vector <int> height;
      |                             ^~~~~~
a.cc:12:12: error: 'heght' was not declared in this scope; did you mean 'height'?
   12 |         if(heght.at(i) > height.at(i +1)){
      |            ^~~~~
      |            height
a.cc:14:24: error: 'False' was not declared in this scope
   14 |         }else   {ans = False;
      |                        ^~~~~
Language: C++

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

int main() {
	int N;
	cin >> N;
	vector <int> height;
	boolean ans =True;
	int count = 0;
	cin >> vector <int> height;
	for(int i = 0;i < N;i++){
	if(heght.at(i) > height.at(i +1)){
	count++;
	}else	{ans = False;
	break;
}
}
cout << count << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'boolean' was not declared in this scope; did you mean 'bool'?
    8 |         boolean ans =True;
      |         ^~~~~~~
      |         bool
a.cc:10:29: error: expected primary-expression before 'height'
   10 |         cin >> vector <int> height;
      |                             ^~~~~~
a.cc:12:12: error: 'heght' was not declared in this scope; did you mean 'height'?
   12 |         if(heght.at(i) > height.at(i +1)){
      |            ^~~~~
      |            height
a.cc:14:18: error: 'ans' was not declared in this scope; did you mean 'abs'?
   14 |         }else   {ans = False;
      |                  ^~~
      |                  abs
a.cc:14:24: error: 'False' was not declared in this scope
   14 |         }else   {ans = False;
      |                        ^~~~~
Language: C++

#include<Cstdio>

using namespace std;

int n;

int main(){
    scanf( "%d\n", &n );
    int index = 0, ret = 0;
    for( int i = 0; i < n; i++ ){
        int a; scanf( "%d", &a );
        if( a >= index ){
            ret++;
            index = a;
        }
    }
    printf( "%d\n", ret );
    return 0;
}

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

#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cstring>

using namespace std;

#define INF 2140000000
#define MOD 1000000007

int main() {
	int n;
	cin >> n;
	vector<int> v(n);

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

	int ans = 1;

	for (int i = 1; i < n; ++i) {
		bool flag = 1;
		for (int j = 0; j < i; ++j) {
			if (v[j] > v[i]) {
				flag = 0;
			}
		}

		if (flag) {
			ans++;
		}
	}

	cout << ans << endl;

	return 0;
}#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cstring>

using namespace std;

#define INF 2140000000
#define MOD 1000000007

int main() {
	int n;
	cin >> n;
	vector<int> v(n);

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

	int ans = 1;

	for (int i = 1; i < n; ++i) {
		bool flag = 1;
		for (int j = 0; j < i; ++j) {
			if (v[j] > v[i]) {
				flag = 0;
			}
		}

		if (flag) {
			ans++;
		}
	}

	cout << ans << endl;

	return 0;
}

Compiler output:
a.cc:54:2: error: stray '#' in program
   54 | }#include <vector>
      |  ^
a.cc:54:3: error: 'include' does not name a type
   54 | }#include <vector>
      |   ^~~~~~~
a.cc:80:5: error: redefinition of 'int main()'
   80 | int main() {
      |     ^~~~
a.cc:27:5: note: 'int main()' previously defined here
   27 | int main() {
      |     ^~~~
Language: C++

#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cstring>

using namespace std;

#define INF 2140000000
#define MOD 1000000007

int main() {
	int n;
	cin >> n;
	vector<int> v(n);
	
	for (int i = 0; i < n; ++i) {
		cin >> v[i];
	}

	int ans = 1;

	for (int i = 1; i < n; ++i) {
		bool flag = 1;
		for (int j = 0; j < i; ++j) {
			if (v[j] > v[i]) {
				flag = 0;
			}
		}

		if (flag) {
			ans++;
		}
	}

	cout << flag << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:51:17: error: 'flag' was not declared in this scope
   51 |         cout << flag << endl;
      |                 ^~~~