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

#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n,a[55],i,j,max=0,count=0,c;
    cin>>n;
    for(i=0;i<n;i++){
        cin>>a[i];
    }
   // max=a[0];
    for(j=0;j<n;++j){c=1;
     for(int k=0;k<j;++k){

      //if(a[0]==max){count++;}
        if(a[k]>a[j]){c=0;break;}

    }if(c)++count;}
    cout<<count<<endl;
}

    cout<<count<<endl;
}


Compiler output:
a.cc:21:5: error: 'cout' does not name a type
   21 |     cout<<count<<endl;
      |     ^~~~
a.cc:22:1: error: expected declaration before '}' token
   22 | }
      | ^
Language: C++

#include<iostream>
#include<vector>
#include<algorithm>

using namespace std;

int main()
{int N;cin >> N;
 vector<int> H(N,0); vector<int> J(N-1,0;
 for(int i = 0; i < N; i++){
   cin >> H[i];}
 if( N == 1){cout << 1 << endl;}
   else{
 int max_height = 0;
 
 for(int i = 0; i < N; i++)
 {max_height = max(H[i],max_height);
  J[i] = max_height;}
  int cnt = 1;
   for(int j = 1 ; j < N; j++)
   {if(J[j-1] <= H[j]){cnt++ ;}}
   
   
   cout << cnt << endl;}
   return 0;}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:41: error: expected ')' before ';' token
    9 |  vector<int> H(N,0); vector<int> J(N-1,0;
      |                                   ~     ^
      |                                         )
Language: C

#include <iostream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <queue>
#include <list>
#include <string>
using namespace std;
 
typedef long long ll;
typedef pair<int, int> P;
const int MOD = 998244353;

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

int main()
{
  int N,count=0,num,max=0;
  cin >> N;
  for(int i=0;i<N;i++){
    cin >> num;
    if(num >= max){
      max = num;
      count++;
    }
  }
  cout << count;
}


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

int main()
{
	int n = 0;
	cin >> n;
	vector<int> h(n);
	for (int& h_s : h) {
		cin >> h_s;
	}
	int max = 0;
	int count = 0;
	for (int i = 0; i < n; i++) {
		if (h[i] >= max) {
			count++;
			max = h[i];
		}
	}
	cout << count;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: 'cin' was not declared in this scope
    4 |         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:6:25: error: 'h' was not declared in this scope
    6 |         for (int& h_s : h) {
      |                         ^
a.cc:12:21: error: 'h' was not declared in this scope
   12 |                 if (h[i] >= max) {
      |                     ^
a.cc:17:9: error: 'cout' was not declared in this scope; did you mean 'count'?
   17 |         cout << count;
      |         ^~~~
      |         count
Language: C

#include <iostream>

using namespace std;

int main(){

int n;
  cin >> n;
int h[n];
int height=0,counts=0;
  
  for(int i=0;i<n;i++){
   cin >> h[i];
    
    if(h[i]>=height){
     counts++;
    }
    
   height=max(height,h[i]);
  }
  cout << counts; 
}

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

#include<iostream>
using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:14:8: error: 'i' was not declared in this scope
   14 |     if(i=0){
      |        ^
Language: Java

import java.util.Scanner;

public class answer {

	public static void main(String[] args) {

		// 入力
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();

		int[] list = new int[N];
		for (int i = 0; i < N; i++) {
			list[i] = sc.nextInt();
		}
		sc.close();

		int ans = 0;
		// 今見ている山
		for (int i = 0; i < N; i++) {

			boolean flag = true;

			for (int j = 0; j < i; j++) {
				if (list[j] > list[i]) {
					flag = false;
				}

			}
			if (flag)
				ans++;
		}
		System.out.println(ans);

	}
}

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

import java.util.Scanner;

public class answer {

	public static void main(String[] args) {

		//入力
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();

		int [] list = new int [N];
		for(int i = 0; i < N ; i++) {
			list[i] = sc.nextInt();
		}

		
		int ans = 0;
		//今見ている山
		for(int i = 0; i < N; i++) {
			
			boolean flag = true;

			for(int j = 0; j < i; j++) {
				if(list[j] > list[i]) {
					flag = false;
				}

			}
			if(flag) ans++;
		}
		System.out.println(ans);

	}

Compiler output:
Main.java:33: error: reached end of file while parsing
	}
	 ^
1 error
Language: C++

#include<bits/stdc++.h>
using namespace std;
int n;
int a[30];
int main() {
  cin>>n;
  for(Int i=0;i<n;i++){
    cin>>a[i];
  }
  int max=-1,sum=0;
  for(int i=0;i<n;i++){
  	if(a[i]>=max) {
      sum++;
      max=a[i];
    }
  }
  cout<<sum<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:7: error: 'Int' was not declared in this scope; did you mean 'int'?
    7 |   for(Int i=0;i<n;i++){
      |       ^~~
      |       int
a.cc:7:15: error: 'i' was not declared in this scope
    7 |   for(Int i=0;i<n;i++){
      |               ^
Language: C++

N = int(input())

H = list(map(int, input().split()))

ans = 0

for i in range(N):
  if i == 0:
    ans += 1
  else:
    h = H[:i+1]
    if max(h) == H[i]:
      ans += 1
 
print(ans)


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

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

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

#include<bits/stdc++.h>
using namespace std;
int main(){
  int N,count=0;
  cin >> N;
  vector<int> H(N);
  for(i=0;i<N;i++){
    cin >> H[i];
  }
  int highest=0;
  for(int i=0;i<N;i++){
    for(int j=0;j<i;j++){
      for(int k=0;k<j;k++){
      if(H[j]> highest){
        highest = H[j];
      }
      }
    if(H[i]>highest){
      count++;
    }
    }
  }
  cout << count << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:7: error: 'i' was not declared in this scope
    7 |   for(i=0;i<N;i++){
      |       ^
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 is_candidate = true ;
        for ( int j = 0; j < i ; ++ j )
        {
            if ( H [ j ] > H [ i ])
            {
                is_candidate = false ;
                break ;
            }
        }
        if ( is_candidate )
        {
            ++ ans ;
        }
    }
// output
    cout << ans << endl ;
}


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

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

int main(){
    int N;
    cin >> N;
    int H[100];
    for(int i = 0; i < N; i++){
       cin >> H[i]; 
    }
    int count = 0;
    int max = 0; 
    for(int i = 0; i < N; i++){
        if(max <= H[i]){
            count++;
        }
        if(H[i] < max){
            max = H[i];
        }
    }
    cout << count << endl;
}

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:6:5: error: 'cin' was not declared in this scope
    6 |     cin >> N;
      |     ^~~
a.cc:21:5: error: 'cout' was not declared in this scope; did you mean 'count'?
   21 |     cout << count << endl;
      |     ^~~~
      |     count
a.cc:21:22: error: 'endl' was not declared in this scope
   21 |     cout << count << endl;
      |                      ^~~~
Language: C++

#include <iostream>
 
#define rep(i, N) for (LL i = 0; i < N; ++i)
typedef long long int LL;
 
using namespace std;
 
int main() {
    LL N, H[100], r = 1;
    cin >> N;
    rep(i, N) cin >> H[i];
    for (LL i = 1; i < N; ++i) {
        bool check = true;
        for (LL j = 0; j < i; j++) {
            if (H[i] < H[j]) {
                check = false;
              	break
            }
        }
        if (check) r++;
    }
 
    cout << r << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:22: error: expected ';' before '}' token
   17 |                 break
      |                      ^
      |                      ;
   18 |             }
      |             ~
Language: C++

#include <iostream>
 
#define rep(i, N) for (LL i = 0; i < N; ++i)
typedef long long int LL;
 
using namespace std;
 
int main() {
    LL N, H[100], r = 1;
    cin >> N;
    rep(i, N) cin >> H[i];
    for (LL i = 0; i < N; ++i) {
        bool check = true;
        for (LL j = 0; j < i; j++) {
            if (H[i] < H[j]) {
                check = false;
              	break
            }
        }
        if (check) r++;
    }
 
    cout << r << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:22: error: expected ';' before '}' token
   17 |                 break
      |                      ^
      |                      ;
   18 |             }
      |             ~
Language: C

#include <stdio.h>

int main(void)
{
	int n,i,j;
	int a[n];
	
	int sum = 1;
	
	for(i = 0; i < n; i++){
		scanf("%d ",&a[i]);
	}
	
	//海を眺められるか判定
	
	for(i = 1; i < n; i++){
		for(j = 0; j < i; j++){
			if(a[j] > a[i]){
				break;
			}
		}
		if(j == i - 1){
			sum = sum + 1
		}
	}
	
	
	printf("%d",sum);
	
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:23:38: error: expected ';' before '}' token
   23 |                         sum = sum + 1
      |                                      ^
      |                                      ;
   24 |                 }
      |                 ~
Language: C++

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

int main() {
  int N;
  cin >> N;
  vector<int> mountain(N);
  for (int i=0;i<N;i++){
    cin >> mountain(i);
  }
  int see_sea = 1;
  for(int i=1;i<N;i++){
    if (max_element(mountain.begin(),mountain.begin()+i)==mountain(i)){
      see_sea+=1;
    }
  }
  cout << see_sea << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:20: error: no match for call to '(std::vector<int>) (int&)'
   12 |     cin >> mountain(i);
      |            ~~~~~~~~^~~
a.cc:16:67: error: no match for call to '(std::vector<int>) (int&)'
   16 |     if (max_element(mountain.begin(),mountain.begin()+i)==mountain(i)){
      |                                                           ~~~~~~~~^~~
Language: C++

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

int main() {
  int N;
  cin >> N;
  vector<int> mountain(N);
  for (int i=0;i<N;i++){
    cin >> mountain(i);
  }
  int see_sea = 1;
  for(int i=1;i<N;i++){
    if (max_element(mountain.begin(),mountain.begin()+i)==mountain(i)){
      see_sea+=1;
    }
  }
  cout << see_sea << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:20: error: no match for call to '(std::vector<int>) (int&)'
   12 |     cin >> mountain(i);
      |            ~~~~~~~~^~~
a.cc:16:67: error: no match for call to '(std::vector<int>) (int&)'
   16 |     if (max_element(mountain.begin(),mountain.begin()+i)==mountain(i)){
      |                                                           ~~~~~~~~^~~
Language: C++

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

int main() {
  int N;
  cin >> N;
  vector<int> mountain(N);
  for (int=i;i<N;i++){
    cin >> mountain(i);
  }
  int see_sea = 1;
  for(i=1;i<N;i++){
    if (max_element(mountain.begin(),mountain.begin()+i)==mountain(i)){
      see_sea+=1;
    }
  }
  cout << see_sea << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:11: error: expected unqualified-id before '=' token
   11 |   for (int=i;i<N;i++){
      |           ^
a.cc:11:11: error: expected ';' before '=' token
   11 |   for (int=i;i<N;i++){
      |           ^
      |           ;
a.cc:11:11: error: expected primary-expression before '=' token
a.cc:11:12: error: 'i' was not declared in this scope
   11 |   for (int=i;i<N;i++){
      |            ^
a.cc:11:17: error: expected ')' before ';' token
   11 |   for (int=i;i<N;i++){
      |       ~         ^
      |                 )
a.cc:11:18: error: 'i' was not declared in this scope
   11 |   for (int=i;i<N;i++){
      |                  ^
Language: C++

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

int main() {
  int N;
  cin >> N;
  array<int,N> mountain;
  for (int=i;i<N;i++){
    cin >> mountain(i);
  }
  int see_sea = 1;
  for(i=1;i<N;i++){
    if (max_element(mountain.begin(),mountain.begin()+i)==mountain(i)){
      see_sea+=1;
    }
  }
  cout << see_sea << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:14: error: the value of 'N' is not usable in a constant expression
   10 |   array<int,N> mountain;
      |              ^
a.cc:8:7: note: 'int N' is not const
    8 |   int N;
      |       ^
a.cc:10:14: note: in template argument for type 'long unsigned int'
   10 |   array<int,N> mountain;
      |              ^
a.cc:11:11: error: expected unqualified-id before '=' token
   11 |   for (int=i;i<N;i++){
      |           ^
a.cc:11:11: error: expected ';' before '=' token
   11 |   for (int=i;i<N;i++){
      |           ^
      |           ;
a.cc:11:11: error: expected primary-expression before '=' token
a.cc:11:12: error: 'i' was not declared in this scope
   11 |   for (int=i;i<N;i++){
      |            ^
a.cc:11:17: error: expected ')' before ';' token
   11 |   for (int=i;i<N;i++){
      |       ~         ^
      |                 )
a.cc:11:18: error: 'i' was not declared in this scope
   11 |   for (int=i;i<N;i++){
      |                  ^
a.cc:16:30: error: request for member 'begin' in 'mountain', which is of non-class type 'int'
   16 |     if (max_element(mountain.begin(),mountain.begin()+i)==mountain(i)){
      |                              ^~~~~
a.cc:16:47: error: request for member 'begin' in 'mountain', which is of non-class type 'int'
   16 |     if (max_element(mountain.begin(),mountain.begin()+i)==mountain(i)){
      |                                               ^~~~~
a.cc:16:67: error: 'mountain' cannot be used as a function
   16 |     if (max_element(mountain.begin(),mountain.begin()+i)==mountain(i)){
      |                                                           ~~~~~~~~^~~
Language: C

#include <stdio.h>
int main(){
  int sum=1,n,h[20],f=1;
  scanf("%d",&n);
  for(int i=0;i<n;i++){
    scanf("%d",&h[i]);
  }
  for(int i=n-1;0<i;i--){
    for(int s=i-1;0<=s;s--){
    if(h[i]<h[s]){
      f=-1
    }
    }
    if(0<f){
    sum++;
    }
    f=1;
  }
  printf("%d",sum);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:11: error: expected ';' before '}' token
   11 |       f=-1
      |           ^
      |           ;
   12 |     }
      |     ~
Language: C

#include <stdio.h>

int int main() {
  /* code */
  int n, i, maxh = 0, can_see = 1;
  int* h;
  scanf("%d\n", &n);
  h = (int*)malloc(sizeof(int)*n);
  scanf("%d", &h[0]);
  maxh = h[0];
  for (i = 0; i < n - 1; i++) {
    /* code */
    scanf(" %d\n", &h[i+1]);
    if (maxh < h[i+1]) {
      /* code */
      maxh = h[i+1];
      can_see++;
    }
  }
  printf("%d\n", can_see);
  return 0;
}

Compiler output:
main.c:3:5: error: two or more data types in declaration specifiers
    3 | int int main() {
      |     ^~~
main.c: In function 'main':
main.c:8:13: error: implicit declaration of function 'malloc' [-Wimplicit-function-declaration]
    8 |   h = (int*)malloc(sizeof(int)*n);
      |             ^~~~~~
main.c:2:1: note: include '<stdlib.h>' or provide a declaration of 'malloc'
    1 | #include <stdio.h>
  +++ |+#include <stdlib.h>
    2 | 
main.c:8:13: warning: incompatible implicit declaration of built-in function 'malloc' [-Wbuiltin-declaration-mismatch]
    8 |   h = (int*)malloc(sizeof(int)*n);
      |             ^~~~~~
main.c:8:13: note: include '<stdlib.h>' or provide a declaration of 'malloc'
Language: C++

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

int main()
{
	int a[105], n, t=1, i, maxv=0;
	
	cin>>n;
	
	for(i=1; i<=n; i++)
	{
		cin>>a[i];
	}
	
	maxv=a[1]
	
	for(i=2; i<=n; i++)
	{
		if(a[i]>maxv)
		{
			maxv=a[i];
			t++;
		}
	}
	
	cout<<t<<endl;
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:18: error: expected ';' before 'for'
   15 |         maxv=a[1]
      |                  ^
      |                  ;
   16 | 
   17 |         for(i=2; i<=n; i++)
      |         ~~~       
a.cc:17:27: error: expected ';' before ')' token
   17 |         for(i=2; i<=n; i++)
      |                           ^
      |                           ;
Language: C++

#include<iostream>
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;++1){
    bool candidate=true;
    for(int j=0;j<i;++j){
      if(H[j]>H[i])
        candidate=false;
       break;
    }
  }
  if (candidate){
    ++ans;
  }
}
cout>>ans>>endl;
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> 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: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:13:22: error: lvalue required as increment operand
   13 |   for (int i=0;i<N;++1){
      |                      ^
a.cc:16:10: error: 'H' was not declared in this scope
   16 |       if(H[j]>H[i])
      |          ^
a.cc:21:7: error: 'candidate' was not declared in this scope
   21 |   if (candidate){
      |       ^~~~~~~~~
a.cc: At global scope:
a.cc:25:1: error: 'cout' does not name a type
   25 | cout>>ans>>endl;
      | ^~~~
a.cc:26:1: error: expected unqualified-id before 'return'
   26 | return 0;
      | ^~~~~~
a.cc:27:1: error: expected declaration before '}' token
   27 | }
      | ^
Language: C++

#include <limits.h>
#include <stdio.h>
#include <algorithm>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <sstream>
#include <string>
#include <vector>

#include <bits/stdc++.h>

namespace test {
std::string to_string(char val) {
    return std::string(1, val);
    // return std::string{val};
}
}  // namespace test

using namespace std;

int main(void) {
    int n; cin >> c; int *h; h = new int[n]; for(int i = 0; i < n; i++) cin >> h[i];
    int result = 0;
    int maxHeight = 0;
    for(int i = 0; i < n; i++){
        if(h[i] >= maxHeight){
            result++;
            maxHeight = h[i];
        }
    }

    cout << result << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:19: error: 'c' was not declared in this scope
   24 |     int n; cin >> c; int *h; h = new int[n]; for(int i = 0; i < n; i++) cin >> h[i];
      |                   ^
Language: C++


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

int main(){
  int N;
  int i;
  int n=0;
  cin >> N;
  vector<int> H(N);
  int max=0;
    for(i=0;i<N;i++){
      cin >> H.at(i);
    }
  for(i=0;i<N;i++){
    if(max=<H.at(i)){
      n++;
      max=H.at(i);
    }
  }
  cout << n << endl;
}
      
      
  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:16:12: error: expected primary-expression before '<' token
   16 |     if(max=<H.at(i)){
      |            ^
Language: C++

#include <iostream>
#include <vector>

using namespace std;

int main() {
  int count = 0;
  int c = 0;
  int p=0;
  for(int i=0;i<100;i++) {
    cin >> c;
    count += (c >= p)?1:0;
    if (c<p) break;
    pre = c;
  }
  cout << count;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:5: error: 'pre' was not declared in this scope
   14 |     pre = c;
      |     ^~~
Language: C++

#include <iostream>
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 is_candidate = true;
    for ( int j = 0; j < i; ++j ) {
      if ( H[j] > H[i]) {
        is_candidate = false;
        break;
      }
      if (is_candidate) {
        ++ans;
      }
    }
  }
  cout << ans << endl;
}


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:8:12: error: 'H' was not declared in this scope
    8 |     cin >> H[i];
      |            ^
a.cc:15:12: error: 'H' was not declared in this scope
   15 |       if ( H[j] > H[i]) {
      |            ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: invalid types 'int[int]' for array subscript
    7 |     if(m[i]<=m[i-1])count++;
      |         ^
a.cc:7:15: error: invalid types 'int[int]' for array subscript
    7 |     if(m[i]<=m[i-1])count++;
      |               ^
Language: C++

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

int main(){
  int n;
  cin >> n;
  vector<int> mt(n);
  vector<int> maxmt(n);
  for (int i=0; i<n; i++){
    cin >> mt(i);
  }
  maxmt(0)=mt(0);
  for (int i=1; i<n; i++){
    maxmt(i)=max(mt(i-1), mt(i));
  }
  int c;
  for (int i=0; i<n; i++){
    if (mt(i) == maxmt(i)){
      c++;
    }
  }
  cout << c;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:14: error: no match for call to '(std::vector<int>) (int&)'
   10 |     cin >> mt(i);
      |            ~~^~~
a.cc:12:8: error: no match for call to '(std::vector<int>) (int)'
   12 |   maxmt(0)=mt(0);
      |   ~~~~~^~~
a.cc:12:14: error: no match for call to '(std::vector<int>) (int)'
   12 |   maxmt(0)=mt(0);
      |            ~~^~~
a.cc:14:10: error: no match for call to '(std::vector<int>) (int&)'
   14 |     maxmt(i)=max(mt(i-1), mt(i));
      |     ~~~~~^~~
a.cc:14:20: error: no match for call to '(std::vector<int>) (int)'
   14 |     maxmt(i)=max(mt(i-1), mt(i));
      |                  ~~^~~~~
a.cc:14:29: error: no match for call to '(std::vector<int>) (int&)'
   14 |     maxmt(i)=max(mt(i-1), mt(i));
      |                           ~~^~~
a.cc:18:11: error: no match for call to '(std::vector<int>) (int&)'
   18 |     if (mt(i) == maxmt(i)){
      |         ~~^~~
a.cc:18:23: error: no match for call to '(std::vector<int>) (int&)'
   18 |     if (mt(i) == maxmt(i)){
      |                  ~~~~~^~~
Language: C++

#include <iostream>
using namespace std;

int main(){
    int i, n, str[n];
    cin>>n;
    for(i=0; i<n; i++){
        cin>>str[i];
    }
    int max = 0, kosu = 0;
    for(i=0; i<n; i++){
        if(max<=str[i]){
            kosu++;
            max = str[i]
        }
    }
    cout<<kosu<<endl;

    
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:25: error: expected ';' before '}' token
   14 |             max = str[i]
      |                         ^
      |                         ;
   15 |         }
      |         ~
Language: C++

#include <iostream>
using namespace std;

int main(){
    int n, str[n];
    cin>>n;
    for(i=0; i<n; i++){
        cin>>str[i];
    }
    int max = 0, kosu = 0;
    for(i=0; i<n; i++){
        if(max<=str[i]){
            kosu++;
            max = str[i]
        }
    }
    cout<<kosu<<endl;

    
    return 0;
}


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

#include<bits/stdc++.h>
using namespace std;
const int ms = 1e5+9;
int vet[ms];
int main(){
	int maxi = 0, n,soma =1;
 	cin >> n;
  	for(int i =0 ;i<n;i++) cin >> vet[i];
  for(int i = 1;i<n;i++){
  	if(vet[i] >= vet[i-1])
      	s++;
   	vet[i] = max(vet[i],vet[i-1]);
  }
  cout<<s<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: 's' was not declared in this scope
   11 |         s++;
      |         ^
a.cc:14:9: error: 's' was not declared in this scope
   14 |   cout<<s<<endl;
      |         ^
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
int main(){
	int N,sum=1;
	cin>>N;
	vector<int> H(N);
    for(int i=0;i<N;++i)cin>>H[i];
	int op=H[0];
	for(int i=1;i<=N;++i){
		if(op<=H[i]){
			op=H[i];
			++sum;
		}
	}
	cout<<sum;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'vector' was not declared in this scope
    7 |         vector<int> H(N);
      |         ^~~~~~
a.cc:3:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    2 | #include<algorithm>
  +++ |+#include <vector>
    3 | using namespace std;
a.cc:7:16: error: expected primary-expression before 'int'
    7 |         vector<int> H(N);
      |                ^~~
a.cc:8:30: error: 'H' was not declared in this scope
    8 |     for(int i=0;i<N;++i)cin>>H[i];
      |                              ^
a.cc:9:16: error: 'H' was not declared in this scope
    9 |         int op=H[0];
      |                ^
Language: C++

#include<iostream>
using namespace std;
int main(){
	int N,sum=1;
	cin>>N;
	vector<int> H(N);
	int op=vector<int> H{0};
	for(int i=1;i<=n;++i){
		if(op<=H{i}){
			op=H{i};
			++sum;
		}
	}
	cout<<sum;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: 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:16: error: expected primary-expression before 'int'
    6 |         vector<int> H(N);
      |                ^~~
a.cc:7:23: error: expected primary-expression before 'int'
    7 |         int op=vector<int> H{0};
      |                       ^~~
a.cc:8:24: error: 'n' was not declared in this scope
    8 |         for(int i=1;i<=n;++i){
      |                        ^
a.cc:9:24: error: 'H' was not declared in this scope
    9 |                 if(op<=H{i}){
      |                        ^
a.cc:9:25: error: expected ')' before '{' token
    9 |                 if(op<=H{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 ans = 0;
  for(int i = 0; i < N; ++i){
    bool is_candidate = true;
    for(int j = 0; j < i; ++j){
      if(H[j] > H[i]){
      is_candidate = false;
      break;
      }
    }
    if(is_candidate){
      ++ans;
    }
  }
  cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:14: error: expected ';' before '}' token
    9 |     cin>>H[i]
      |              ^
      |              ;
   10 |   }
      |   ~
Language: C++

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

int main() {
  int N;
  cin >> N;
  
  vector<int> data(N);
  for(int i=0; i<N; i++) cin >> data.at(i);
  
  int count=1;
  for(int i=1; i<N; i++) {
    for(int j=0; j<i; j++) {
      if(data.at(j) > data.at(i)) break;
      else if (j==i-1) ++count;
    }
  }

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

#include<bits/stdc++.h>
using namespace std;
int main() {
	int N, H_i;
    int A;
    int B=0;
	cin >> N ;
    for(int i=0;i<N;i++){
      cin >> H_i ;
    }
    for(i=1;i<N;i++){
      A = 0;
      for(j=0;j<i;j++){
        if(H_i-int H_j>=0)A++;
      }
      if(A==i)B++;
    }
		cout << B+1 << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: 'i' was not declared in this scope
   11 |     for(i=1;i<N;i++){
      |         ^
a.cc:13:11: error: 'j' was not declared in this scope
   13 |       for(j=0;j<i;j++){
      |           ^
a.cc:14:16: error: expected primary-expression before 'int'
   14 |         if(H_i-int H_j>=0)A++;
      |                ^~~
a.cc:14:16: error: expected ')' before 'int'
   14 |         if(H_i-int H_j>=0)A++;
      |           ~    ^~~
      |                )
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main() {
	int N;
    int A;
    int B=0;
	cin >> N ;
    for(i=0;i<N;i++){
      cin >> int H_i ;
    }
    for(i=1;i<N;i++){
      A = 0;
      for(j=0;j<i;j++){
        if(H_i-H_j>=0)A++;
      }
      if(A==i)B++
    }
		cout << B+1 << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'i' was not declared in this scope
    8 |     for(i=0;i<N;i++){
      |         ^
a.cc:9:14: error: expected primary-expression before 'int'
    9 |       cin >> int H_i ;
      |              ^~~
a.cc:11:9: error: 'i' was not declared in this scope
   11 |     for(i=1;i<N;i++){
      |         ^
a.cc:13:11: error: 'j' was not declared in this scope
   13 |       for(j=0;j<i;j++){
      |           ^
a.cc:14:12: error: 'H_i' was not declared in this scope
   14 |         if(H_i-H_j>=0)A++;
      |            ^~~
a.cc:14:16: error: 'H_j' was not declared in this scope
   14 |         if(H_i-H_j>=0)A++;
      |                ^~~
a.cc:16:18: error: expected ';' before '}' token
   16 |       if(A==i)B++
      |                  ^
      |                  ;
   17 |     }
      |     ~
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:10:13: error: expected ';' before 'if'
   10 |     cin >> H
      |             ^
      |             ;
   11 |     if (n <= H) {
      |     ~~
Language: C

#include<stdio.h>

int main(void){
    int n;
    int h[100];
    int cnt = 0;
    int i, j;

    scanf("%d", &n);
    for(i = 0; i < n; i++){
        scanf("%d", &h[i]);
    }

    for(i = 0; i < n; i++){
        flg = 0;
        for(j = 0; j < n; j++){
            if(h[j] > h[i]){
                flg = 1;
            }
        }
        if(flg == 0){
            cnt++;
        }
    }

    printf("%d", cnt);

    return 0;

}

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

#include<bits.stdc++.h>
using namespace std;
int main(){
	int N,ans;
	cin >> N;
	vector<int> data.(N,0);
  	for(int i=0;i<N;i++){
    	cin >> data.at(i);
    }
  	for(int j=0;j<N;j++){
      	bool flag=1;
    	for(int k=0;k<j;k++){
        if(data.at(k)>data.at(j)) flag=0;
        }
    if(flag) ans++;
    }
    cout << ans endl;
}

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

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

int main() {
  int n;
  cin >> n;
  vector<int> vec(n);
  for(int i =0 ; i<n ; i++) {
    cin >> vec.at(i);
  }
  
  int s = 1;
  for(int i= 0; i<n ; i++){
    for(int j = 0 ,j < i; j++){
      if(vec.at(j) < vec.at(i)){
      s++;
      }
    }
  }
  
  cout << s << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:21: error: expected ';' before '<' token
   14 |     for(int j = 0 ,j < i; j++){
      |                     ^~
      |                     ;
a.cc:14:22: error: expected primary-expression before '<' token
   14 |     for(int j = 0 ,j < i; j++){
      |                      ^
Language: C++

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

int main() {
  int n;
  cin >> n;
  vector<int> vec(n);
  for(int i =0 ; i<n ; i++) {
    cin >> vec.at(i);
  }
  
  int s = 1;
  for(int i= 0; i<n ; i++){
    for(int j = 0 ,j<i; j++){
      if(vec.at(j) < vec.at(i)){
      s++;
      }
    }
  }
  
  cout << s << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:21: error: expected ';' before '<' token
   14 |     for(int j = 0 ,j<i; j++){
      |                     ^
      |                     ;
a.cc:14:21: error: expected primary-expression before '<' token
Language: C

#include <iostream>
using namespace std;
int main(void){

    int n;
    int h[100];
    int i;
    int ctn=0;
    
    cin>>n;
    
    for(i=0;i<n;i++){
        cin>>h[i];
    }
    
    for(i=1;i<=n;i++){
        if(h[0]<=h[i] && h[1]<=h[i]){
            ctn++;
        }
    }
    
    cout<<ctn<<"\n";
    
    return 0;
}
    


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

#include<iostream>
using namespace std;

int main(){
  int N;
  cin >> N;
  int h[N];
  for (int i=0;i<N:i++) cin >> h[i];
  int count = 0;
  int h_max = h[0];
  for (int i=0;i<N;i++){
    if (h[i] >= h_max) count += 1;
    h_max = max(h_max,h[i]);
  }

  cout << count << endl;

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:16: warning: range-based 'for' loops with initializer only available with '-std=c++20' or '-std=gnu++20' [-Wc++20-extensions]
    8 |   for (int i=0;i<N:i++) cin >> h[i];
      |                ^
a.cc:8:19: error: found ':' in nested-name-specifier, expected '::'
    8 |   for (int i=0;i<N:i++) cin >> h[i];
      |                   ^
      |                   ::
a.cc:8:18: error: 'N' is not a class, namespace, or enumeration
    8 |   for (int i=0;i<N:i++) cin >> h[i];
      |                  ^
a.cc:10:3: error: expected primary-expression before 'int'
   10 |   int h_max = h[0];
      |   ^~~
a.cc:9:17: error: expected ')' before 'int'
    9 |   int count = 0;
      |                 ^
      |                 )
   10 |   int h_max = h[0];
      |   ~~~            
a.cc:8:7: note: to match this '('
    8 |   for (int i=0;i<N:i++) cin >> h[i];
      |       ^
a.cc:12:17: error: 'h_max' was not declared in this scope
   12 |     if (h[i] >= h_max) count += 1;
      |                 ^~~~~
a.cc:12:24: error: 'count' was not declared in this scope
   12 |     if (h[i] >= h_max) count += 1;
      |                        ^~~~~
a.cc:13:5: error: 'h_max' was not declared in this scope
   13 |     h_max = max(h_max,h[i]);
      |     ^~~~~
a.cc:16:11: error: 'count' was not declared in this scope
   16 |   cout << count << endl;
      |           ^~~~~
Language: C++

#include<iostream>
using namespace std;

int main(){
  int N;
  cin >> N;
  int h[N];
  int count = 0;
  int h_max = h[0];
  for (int i=0;i<N;i++){
    if (h[i] >= h_max) count += 1;
    h_max = max(h_max,h[i])
  }

  cout << count << endl;

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:28: error: expected ';' before '}' token
   12 |     h_max = max(h_max,h[i])
      |                            ^
      |                            ;
   13 |   }
      |   ~
Language: C++

#include <iostream>
using namespace std;
int main(void){
  int n;
  cin >> n;
  
  vector<int>mountain(n);
  
  for(int i=0;i<n;i++){
    cin >> mountain[i];
  }
  
  int ans = 0;
  
  for(int i=0;i<n;i++){
    for(int j=0;j<=i;j++){
      if(mountain[j] > mountain[i])
        break;
      if(i == j){
        ans++;
      break;
      }
    }
  }
  
  cout << ans << endl;
  
  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>mountain(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>mountain(n);
      |          ^~~
a.cc:10:12: error: 'mountain' was not declared in this scope
   10 |     cin >> mountain[i];
      |            ^~~~~~~~
a.cc:17:10: error: 'mountain' was not declared in this scope
   17 |       if(mountain[j] > mountain[i])
      |          ^~~~~~~~
Language: C++

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

int main(){
  int i,N,max,x;
  cin >> N;
  for(i=0;i<N;i++){
    cin >> h;
    max = 0;
    x = 0;
    if(h>=max){
      max = h;
      x++;
  }
  cout << x << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: 'h' was not declared in this scope
    8 |     cin >> h;
      |            ^
a.cc:17:2: error: expected '}' at end of input
   17 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

N=int(input())
H=list(map(int,input().split()))

m = 0
c = 0
for i in range(N):
	if H[i] >= m:
		c += 1
		m = H[i]
print(c)

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

#include<stdio.h>

int main(){

  int n,i,cnt;

  scanf("%d",&n);

  int a[20];
  i = 0;

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

  cnt = 1;
  i = 1;

  int max = a[0];

  while(i < n){
    if(max <= a[i]){
      max = a[i];
      cnt++;
      i++;
    }else{
      i++;
    }
  }


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

  return 0;



Compiler output:
main.c: In function 'main':
main.c:35:3: error: expected declaration or statement at end of input
   35 |   return 0;
      |   ^~~~~~
Language: C

#include <stdio.h>
int main(){
int n, h[100],i,j;
int max=0;0
int ans=0;
scanf("%d",&n);

for(i=0; i<n; i++){
scanf("%d",&h[i]);
if(max<h[i]) ans++;


}

printf("%d",ans);

return 0;
}


Compiler output:
main.c: In function 'main':
main.c:4:12: error: expected ';' before 'int'
    4 | int max=0;0
      |            ^
      |            ;
    5 | int ans=0;
      | ~~~         
main.c:10:14: error: 'ans' undeclared (first use in this function)
   10 | if(max<h[i]) ans++;
      |              ^~~
main.c:10:14: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include <stdio.h>

int main(void) {
	int N;
	int H[20];
	int i,max,cnt=0;

	scanf_s("%d", &N);
	for (i = 0; i < N; i++) {
		scanf_s("%d",&H[i]);
	}

	for (i = 0; i < N; i++) {
		if (i == 0) {
			max = H[i];
			cnt++;
		}
		else {
			if (max <= H[i]) {
				cnt++;
				max = H[i];
			}
		}
	}

	printf("%d", cnt);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
    8 |         scanf_s("%d", &N);
      |         ^~~~~~~
      |         scanf
Language: Java

import java.util.Scanner;

public class B124b {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);

		int a[] = new int[100];

		int n = scan.nextInt();
		int counter=0;
		for (int i = 0; i < n; i++) {

			a[i] = scan.nextInt();

		}

		for (int x = 0; x < n; x++) {

			if (a[0] <= a[x]) {
				counter++;
			}

		}

		System.out.println(counter);
		
	}

}

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

import java.util.*;

public class B
{
  public static void main(String[] args)
  {
	Scanner in = new Scanner(System.in);
    int n = in.nextInt();
    int max = 0, cnt = 0;
    while (n --> 0)
    {
      int h = in.nextInt();
      if (h >= max)
      {
		max = h;
        cnt++;
      }
    }
    System.out.println(cnt);
  }
}

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

#include <bits/stdc++.h>
using namespace std;
int main(){
  int i;
  int a;
  int out = 0;
  int mountainHeight[25];
  int mountainAmount;
  cin>>mountainAmount;
  for (i=0;i<mountainAmount;i++){
    cin>>mountainHeight[i];
  }
  a = mountainHeight[0];
  for (i=0;i<mountainAmount;i++){
    if(mountainHeight[i] !< a){
      out++;
      a = mountainHeight[i];
    }
  }
  cout<<out;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:25: error: expected ')' before '!' token
   15 |     if(mountainHeight[i] !< a){
      |       ~                 ^~
      |                         )
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int i;
  int a;
  int out = 0;
  int mountainHeight[];
  int mountainAmount;
  cin>>mountainAmount;
  for (i=0;i<mountainAmount;i++){
    cin>>mountainHeight[i];
  }
  a = mountainHeight[0];
  for (i=0;i<mountainAmount;i++){
    if(mountainHeight[i] !< a){
      out++;
      a = mountainHeight[i];
    }
  }
  cout<<out;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:7: error: storage size of 'mountainHeight' isn't known
    7 |   int mountainHeight[];
      |       ^~~~~~~~~~~~~~
a.cc:15:25: error: expected ')' before '!' token
   15 |     if(mountainHeight[i] !< a){
      |       ~                 ^~
      |                         )
Language: C++

#include <iostream>
#include <algorithm>

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;
    int Max_Height = -1;

    for(int i = 0; i < N; i++)
    {
        if(H[i] >= Max_Height){
            ans++;
            Max_Height = H[i];
        }
    }
    
    // output
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: 'vector' was not declared in this scope
    9 |     vector<int> H(N);
      |     ^~~~~~
a.cc:3:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    2 | #include <algorithm>
  +++ |+#include <vector>
    3 | 
a.cc:9:12: error: expected primary-expression before 'int'
    9 |     vector<int> H(N);
      |            ^~~
a.cc:12:16: error: 'H' was not declared in this scope
   12 |         cin >> H[i];
      |                ^
a.cc:20:12: error: 'H' was not declared in this scope
   20 |         if(H[i] >= Max_Height){
      |            ^
Language: C++

#include <iostream>

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;
    int Max_Height = -1;

    for(int i = 0; i < N; i++)
    {
        if(H[i] >= Max_Height){
            ans++;
            Max_Height = H[i];
        }
    }
    
    // output
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: 'vector' was not declared in this scope
    8 |     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 | 
a.cc:8:12: error: expected primary-expression before 'int'
    8 |     vector<int> H(N);
      |            ^~~
a.cc:11:16: error: 'H' was not declared in this scope
   11 |         cin >> H[i];
      |                ^
a.cc:19:12: error: 'H' was not declared in this scope
   19 |         if(H[i] >= Max_Height){
      |            ^
Language: C++

#include <iostream>
#include <vector>
#include <iomanip>
#include <cmath>
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 is_candidate = true ;
for ( int j = 0; j < i ; ++ j ) {
if ( H [ j ] > H [ i ]) {
is_candidate = false ;
break ;
}
}
if ( is_candidate ) {
++ ans ;
}
}
// output
cout << ans << endl ;
}

#include <iomanip>
#include <cmath>
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 is_candidate = true ;
for ( int j = 0; j < i ; ++ j ) {
if ( H [ j ] > H [ i ]) {
is_candidate = false ;
break ;
}
}
if ( is_candidate ) {
++ ans ;
}
}
// output
cout << ans << endl ;
}


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

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

int main(){
  int n;
  cin >> n; 
  
  int count = 0;
  int[] h = new int[n];
  
  for(int i = 0; i < n; i++){
    cin >> n[i];
    bool b = false;
    for(j=0;j<i;j++){
      b = b || n[i] > n[j] ;
    }
    if(b || i = 0)count++;
  }
  
  
  cout << 
  return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:9:6: error: structured binding declaration cannot have type 'int'
    9 |   int[] h = new int[n];
      |      ^~
a.cc:9:6: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:9:6: error: empty structured binding declaration
a.cc:9:9: error: expected initializer before 'h'
    9 |   int[] h = new int[n];
      |         ^
a.cc:12:13: error: invalid types 'int[int]' for array subscript
   12 |     cin >> n[i];
      |             ^
a.cc:14:9: error: 'j' was not declared in this scope
   14 |     for(j=0;j<i;j++){
      |         ^
a.cc:15:17: error: invalid types 'int[int]' for array subscript
   15 |       b = b || n[i] > n[j] ;
      |                 ^
a.cc:17:10: error: lvalue required as left operand of assignment
   17 |     if(b || i = 0)count++;
      |        ~~^~~~
a.cc:22:3: error: expected primary-expression before 'return'
   22 |   return 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:1:1: error: stray '\' in program
    1 | \#include<bits/stdc++.h>
      | ^
a.cc:1:2: error: stray '#' in program
    1 | \#include<bits/stdc++.h>
      |  ^
a.cc:1:3: error: 'include' does not name a type
    1 | \#include<bits/stdc++.h>
      |   ^~~~~~~
a.cc: In function 'int main()':
a.cc:8:9: error: 'cin' was not declared in this scope
    8 |         cin >> num;
      |         ^~~
a.cc:31:9: error: 'cout' was not declared in this scope; did you mean 'count'?
   31 |         cout << count << endl;
      |         ^~~~
      |         count
a.cc:31:26: error: 'endl' was not declared in this scope
   31 |         cout << count << endl;
      |                          ^~~~