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

#include <iostream>
using namespace std;

int main()
  {
  int N;
  cin >> N;
  const int num = N
  int H[num];
  
  for(int i=0 i<num; i++){
    cin >> H[i]
      }
  int k = H[0]
  
  for(int s=0 s<num-1; s++){
    for(int t=s+1; t++){
      if (H[t] > H[s]){
        int tmp = H[t];
        H[t] = H[s];
        H[s] = tmp;
        }}}
  for(int res=0 H[res]>=k; res++)
    {
    cout << res-1 << endl;
    }
  
  return 0;
  }
    

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: expected ',' or ';' before 'int'
    9 |   int H[num];
      |   ^~~
a.cc:11:14: error: expected ';' before 'i'
   11 |   for(int i=0 i<num; i++){
      |              ^~
      |              ;
a.cc:12:12: error: 'H' was not declared in this scope
   12 |     cin >> H[i]
      |            ^
a.cc:14:11: error: 'H' was not declared in this scope
   14 |   int k = H[0]
      |           ^
a.cc:16:24: error: 's' was not declared in this scope
   16 |   for(int s=0 s<num-1; s++){
      |                        ^
a.cc:23:16: error: expected ';' before 'H'
   23 |   for(int res=0 H[res]>=k; res++)
      |                ^~
      |                ;
Language: C










#include<stdio.h>

int main(void){
int a,c=0,i,j;
scanf("%d",&a);
int b[a];
for(int i=0;i<a;i++){
scanf("%d",&b[i]);
}
for(i=0;i<a;i++){
for(j=0;j=<i;j++){
if(b[i]<b[i-j]){
break;
}
if(j==i-1)c+=1;
}
}
printf("%d",c);

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:20:11: error: expected expression before '<' token
   20 | for(j=0;j=<i;j++){
      |           ^
Language: Java

import java.util.Scanner;


public class q2 {

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

		int n=Integer.parseInt(sc.next());
		int h[]=new int[100];
		int sum=1;

		for(int i=0;i<n;i++){
			h[i]=Integer.parseInt(sc.next());
			if(i!=0&&h[i-1]<=h[i]){
				sum+=1;
			}
		}
		System.out.println(sum);
	}

}

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

#include <iostream>
using namespace std;

int main()
  {
  cin >> N;
  const int num = N
  int H[num];
  
  for(int i=0 i<num; i++){
    cin >> H[i]
      }
  int k = H[0]
  
  for(int s=0 s<num-1; s++){
    for(int t=s+1; t++){
      if (H[t] > H[s]){
        int tmp = H[t];
        H[t] = H[s];
        H[s] = tmp;
        }}}
  for(int res=0 H[res]>=k; res++)
    {
    cout << res-1 << endl;
    }
  
  return 0;
  }
    

Compiler output:
a.cc: In function 'int main()':
a.cc:6:10: error: 'N' was not declared in this scope
    6 |   cin >> N;
      |          ^
a.cc:10:14: error: expected ';' before 'i'
   10 |   for(int i=0 i<num; i++){
      |              ^~
      |              ;
a.cc:11:12: error: 'H' was not declared in this scope
   11 |     cin >> H[i]
      |            ^
a.cc:13:11: error: 'H' was not declared in this scope
   13 |   int k = H[0]
      |           ^
a.cc:15:24: error: 's' was not declared in this scope
   15 |   for(int s=0 s<num-1; s++){
      |                        ^
a.cc:22:16: error: expected ';' before 'H'
   22 |   for(int res=0 H[res]>=k; res++)
      |                ^~
      |                ;
Language: C++

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

int main(){
  int val,i,Mt,inn;
  inn = 1;
  cin >> val;
  int hight[val];
  for(i=0;i<val;i++){
  	cin >> Mt;
    hight[i] = Mt;
  }
  for(i=0;i<val-1;i++){
    if(hight[i+1]>=hight[i]) {inn++;}
  }
  cout << inn << endl;
}

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

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

int main(){
  int val,i,Mt,inn;
  inn = 1;
  cin << val;
  int hight[val];
  for(i=0;i<val;i++){
  	cin >> Mt;
    hight[i] = Mt;
  }
  for(i=0;i<val-1;i++){
    if(hight[i+1]>=hight[i]) inn++;
  }
  cout << inn <<;
}

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










#include<stdio.h>

int main(void){
int a,c=0,j;
scanf("%d",&a);
int b[a];
for(int i=0;i<a;i++){
scanf("%d",&b[i]);
}
for(i=0;i<a;i++){
for(j=0;j<i;j++){
if(b[i]<b[i-j]){
break;
}
if(j==i-1)c+=1;
}
}
printf("%d",c);

return 0;
}

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

#include <iostream>
using namespace std;

int n;
int time=1;
int h[101];

int main(){
	cin >> n;
	
	for(int i=0; i<n; ++i){
		cin >> h[i];
	}
	
	int max = h[0];
	for(int i=1; i<n; ++i){
		if(h[i]>=max){
			++time;
			max = h[i];
		}
	}
	
	cout << time;
	
	return 0;

}

Compiler output:
a.cc:5:5: error: 'int time' redeclared as different kind of entity
    5 | int time=1;
      |     ^~~~
In file included from /usr/include/pthread.h:23,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr.h:157,
                 from /usr/include/c++/14/ext/atomicity.h:35,
                 from /usr/include/c++/14/bits/ios_base.h:39,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/time.h:76:15: note: previous declaration 'time_t time(time_t*)'
   76 | extern time_t time (time_t *__timer) __THROW;
      |               ^~~~
a.cc: In function 'int main()':
a.cc:18:27: warning: ISO C++ forbids incrementing a pointer of type 'time_t (*)(time_t*) noexcept' {aka 'long int (*)(long int*) noexcept'} [-Wpointer-arith]
   18 |                         ++time;
      |                           ^~~~
a.cc:18:27: error: lvalue required as increment operand
Language: C

include<stdio.h>
 
 
int main(){
  int N,i,j,sum=1;
  int flag;
  
  scanf("%d", &N);
  int H[N];
  for(i=1;i<N;i++){
    flag=0;
    scanf("%d", &H[i]);
    for(j=0;j<i;j++){
      if(H[j]>H[i]){
        flag = 1;
        break;
      }
    }
    if(flag==0) sum++;
  }
  printf("%d",sum);
  
  return 0;
  
}

Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include<stdio.h>
      |        ^
Language: C++

#include <iostream>
using namespace std;
int main(){
	int N;
  cin >> N;
  height[N];
  for(int i = 0;i<N;i++){
  	cin >> height[i];
  }
  int max=0;
  int counter=0;
  for(int k;k<N;k++){
	if(max<height[k]){
    	max = height[k];
 
      ++counter; 
    } 	
  }
  cout << counter <<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'height' was not declared in this scope
    6 |   height[N];
      |   ^~~~~~
Language: C++

int main(){

    int count=1;
    int n;
    int h[20]={0};

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

   
   

    for(int num=1;num<n;num++){ //今何番目を見てるか
        int high[20]={0};
    
        for(int i=0;i<n;i++){
            high[i]=h[i];
          
        }

        std::sort(high,high+num+1);

        
    
        if(high[num]==h[num]){
            count++;
           
        }
       
    }

    std::cout<<count<<std::endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: 'cin' is not a member of 'std'
    7 |     std::cin>>n;
      |          ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | int main(){
a.cc:10:14: error: 'cin' is not a member of 'std'
   10 |         std::cin>>h[i];
      |              ^~~
a.cc:10:14: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:25:14: error: 'sort' is not a member of 'std'
   25 |         std::sort(high,high+num+1);
      |              ^~~~
a.cc:36:10: error: 'cout' is not a member of 'std'
   36 |     std::cout<<count<<std::endl;
      |          ^~~~
a.cc:36:10: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:36:28: error: 'endl' is not a member of 'std'
   36 |     std::cout<<count<<std::endl;
      |                            ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | int main(){
Language: C++

#include<bits/stdc++.h>
using namespace std;
 
int main(){
  int a,e;
  cin >> a;
  vector<int>vec;
  for(int b = 0;b<a;b++){
    cin >> e;
  	vec.push_back(e);
  }
  int c = 1;
  int f = vec.at(0);
  for(int d =1;d<a;d++){
  if(vec.at(d)>f){
  c++;
  f =vec.at(d);
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:18:4: error: expected '}' at end of input
   18 |   }
      |    ^
a.cc:14:24: note: to match this '{'
   14 |   for(int d =1;d<a;d++){
      |                        ^
a.cc:18:4: error: expected '}' at end of input
   18 |   }
      |    ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: Java

public class Main {
	public static void main(String[] args) {
		// TODO Auto-generated method stub

		Scanner scanner = new Scanner(System.in);
		
		String inputN = scanner.nextLine();
		String inputH = scanner.nextLine();

		scanner.close();
		
		int n = Integer.parseInt(inputN);
		String[] hsStr = inputH.split(" ", 0);
		
		Integer[] hs = new Integer[hsStr.length];
		for(int i = 0; i < hsStr.length ; i++) {
			hs[i] = Integer.parseInt(hsStr[i]);
		}

		int viewable = 0;
		int curHighest = 0;
		for(int hn = 0; hn < hs.length; hn++) {
			if(curHighest < hs[hn]) {
				curHighest = hs[hn];
				viewable++;
			}
		}
		System.out.println(viewable);
	}
}

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

#include <bits/stdc++.h>

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |   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:9:3: error: 'vector' was not declared in this scope
    9 |   vector<int> a(N);
      |   ^~~~~~
a.cc:9: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:9:10: error: expected primary-expression before 'int'
    9 |   vector<int> a(N);
      |          ^~~
a.cc:12:12: error: 'a' was not declared in this scope
   12 |     cin >> a[i];
      |            ^
a.cc:16:8: error: 'a' was not declared in this scope
   16 |     if(a[0] <= a[i]){
      |        ^
a.cc:20:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   20 |   cout << count << 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:20:20: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   20 |   cout << count << 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: C++

#include "bits/stdc++.h"
#define ALL(x) x.begin(), x.end()
#define LEN(x) (int)x.size()
#define iostreamBooster() do{ cin.tie(nullptr); ios_base::sync_with_stdio(false); }while(0)
using namespace std;
typedef int64_t i64;
typedef pair<int,int> pii;
template<class A, class B>inline bool chmax(A &a, const B &b){return b>a ? a=b,1 : 0;}
template<class A, class B>inline bool chmin(A &a, const B &b){return b<a ? a=b,1 : 0;}
constexpr int INF = 0x3f3f3f3f;

signed main()
{
  int N;
  int a[30];

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

  int ans = 0;
  int mx = 0;
  for (int i = 0; i < N; ++i) {
    if (a[i] >= mx) ++ans;
    chmax(mx, a[i]);
  }

  cout << ans << endl;
  return 0;
}

#include "bits/stdc++.h"
#define ALL(x) x.begin(), x.end()
#define LEN(x) (int)x.size()
#define iostreamBooster() do{ cin.tie(nullptr); ios_base::sync_with_stdio(false); }while(0)
using namespace std;
typedef int64_t i64;
typedef pair<int,int> pii;
template<class A, class B>inline bool chmax(A &a, const B &b){return b>a ? a=b,1 : 0;}
template<class A, class B>inline bool chmin(A &a, const B &b){return b<a ? a=b,1 : 0;}
constexpr int INF = 0x3f3f3f3f;

signed main()
{
  int N;
  int a[30];

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

  int ans = 0;
  int mx = 0;
  for (int i = 0; i < N; ++i) {
    if (a[i] >= mx) ++ans;
    chmax(mx, a[i]);
  }

  cout << ans << endl;
  return 0;
}



Compiler output:
a.cc:38:39: error: redefinition of 'template<class A, class B> bool chmax(A&, const B&)'
   38 | template<class A, class B>inline bool chmax(A &a, const B &b){return b>a ? a=b,1 : 0;}
      |                                       ^~~~~
a.cc:8:39: note: 'template<class A, class B> bool chmax(A&, const B&)' previously declared here
    8 | template<class A, class B>inline bool chmax(A &a, const B &b){return b>a ? a=b,1 : 0;}
      |                                       ^~~~~
a.cc:39:39: error: redefinition of 'template<class A, class B> bool chmin(A&, const B&)'
   39 | template<class A, class B>inline bool chmin(A &a, const B &b){return b<a ? a=b,1 : 0;}
      |                                       ^~~~~
a.cc:9:39: note: 'template<class A, class B> bool chmin(A&, const B&)' previously declared here
    9 | template<class A, class B>inline bool chmin(A &a, const B &b){return b<a ? a=b,1 : 0;}
      |                                       ^~~~~
a.cc:40:15: error: redefinition of 'constexpr const int INF'
   40 | constexpr int INF = 0x3f3f3f3f;
      |               ^~~
a.cc:10:15: note: 'constexpr const int INF' previously defined here
   10 | constexpr int INF = 0x3f3f3f3f;
      |               ^~~
a.cc:42:8: error: redefinition of 'int main()'
   42 | signed main()
      |        ^~~~
a.cc:12:8: note: 'int main()' previously defined here
   12 | signed main()
      |        ^~~~
Language: Java

public class Main {
	public static void main(String[] args) {
		// TODO Auto-generated method stub

		Scanner scanner = new Scanner(System.in);
		
		String inputN = scanner.nextLine();
		String inputH = scanner.nextLine();

		scanner.close();
		
		int n = Integer.parseInt(inputN);
		String[] hsStr = inputH.split(" ", 0);
		
		Integer[] hs = new Integer[hsStr.length];
		for(int i = 0; i < hsStr.length ; i++) {
			hs[i] = Integer.parseInt(hsStr[i]);
		}

		int viewable = 0;
		int curHighest = 0;
		for(int hn = 0; hn < hs.length; hn++) {
			if(curHighest < hs[hn]) {
				curHighest = hs[hn];
				viewable++;
			}
		}
		
		System.out.println(viewable);
	}
}

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

#include <bits/stdc++.h>

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin >> N;
      |   ^~~
      |   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:8:3: error: 'vector' was not declared in this scope
    8 |   vector<int> a(N);
      |   ^~~~~~
a.cc:8: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:8:10: error: expected primary-expression before 'int'
    8 |   vector<int> a(N);
      |          ^~~
a.cc:11:12: error: 'a' was not declared in this scope
   11 |     cin >> a[i];
      |            ^
a.cc:15:8: error: 'a' was not declared in this scope
   15 |     if(a[0] =< a[i]){
      |        ^
a.cc:15:14: error: expected primary-expression before '<' token
   15 |     if(a[0] =< a[i]){
      |              ^
a.cc:19:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   19 |   cout << count << 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:19:20: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   19 |   cout << count << 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: C

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


Compiler output:
main.c: In function 'main':
main.c:4:7: error: array size missing in 'h'
    4 |   int h[];
      |       ^
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 dp[N], count=1;
  dp[0] = 0;
  for(int i=0; i<N; i++){
    dp[i+1] = max(dp[i], H[i])
    if(dp[i] < H[i+1])
      count++;
  }
  cout << count;
  return 0;
}
    

Compiler output:
a.cc: In function 'int main()':
a.cc:14:31: error: expected ';' before 'if'
   14 |     dp[i+1] = max(dp[i], H[i])
      |                               ^
      |                               ;
   15 |     if(dp[i] < H[i+1])
      |     ~~
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 dp[N],int count=1;
  dp[0] = 0;
  for(int i=0; i<N; i++){
    dp[i+1] = max(dp[i], H[i])
    if(dp[i] < H[i+1])
      count++;
  }
  cout << count;
  return 0;
}
    

Compiler output:
a.cc: In function 'int main()':
a.cc:11:13: error: expected unqualified-id before 'int'
   11 |   int dp[N],int count=1;
      |             ^~~
a.cc:14:31: error: expected ';' before 'if'
   14 |     dp[i+1] = max(dp[i], H[i])
      |                               ^
      |                               ;
   15 |     if(dp[i] < H[i+1])
      |     ~~                         
a.cc:18:11: error: 'count' was not declared in this scope
   18 |   cout << count;
      |           ^~~~~
Language: C++

#include <iostream>
#include <vector>
using namespace std;
int tall;
int main(void){
    // Your code here!
    int N;
    cin >> N;
    
    vector<int> Ryokan(N);
    
    int ans;
    ans = 0;
    
    for (int i = 0; i < N; i++) cin >> Ryokan[i];
    
    tall = Ryokan[0];
    
    for (int i = 1; i < N; i++){
        if (tall <= Ryokan[i]){
            ans += 1;
            tall = Ryokan[i];
        }
    }
    
    cout << ans + 1 << endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:26:29: error: expected '}' at end of input
   26 |     cout << ans + 1 << endl;
      |                             ^
a.cc:5:15: note: to match this '{'
    5 | int main(void){
      |               ^
Language: C++

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

int main() {
  int N;
  int X;
  X=1
  cin >> N;
  vector<int> vec(N+1);
  for (int i = 1; i < N+1; i++) {
  cin >> vec.at(i);
}
  for (int i = 1; i < N+1; i++) {
    if (vec.at(i+1) < vec.at(i+2)) {
    X++;
  }
    
  cout << X << endl;
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:6: error: expected ';' before 'cin'
    7 |   X=1
      |      ^
      |      ;
    8 |   cin >> N;
      |   ~~~
Language: C++

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

int main() {
  int N;
  int X;
  X=1
  cin >> N;
  vector<int> vec(N+1);
  for (int i = 1; i < N+1; i++) {
  cin >> vec.at(i);
}
  for (int i = 1; i < N+1; i++) {
    if (vec.at(i+1) < vec.at(i+2)) {
    X++;
  }
    
  cout << X << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:6: error: expected ';' before 'cin'
    7 |   X=1
      |      ^
      |      ;
    8 |   cin >> N;
      |   ~~~ 
a.cc:19:2: error: expected '}' at end of input
   19 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

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

int main () {
  int n;
  cin >> n:
  vector<int>vec(n);
  int ans=1;
  for(int i=0;i<n;i++){
    cin >> vec[i];
  }
  int s=vec[0];
  for(int i=1;i<n;i++){
    s=max(s,i);
    if(s<=vec[i]){
      ans++;
    }
  }
  cout << ans;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:11: error: found ':' in nested-name-specifier, expected '::'
    6 |   cin >> n:
      |           ^
      |           ::
a.cc:6:10: error: 'n' is not a class, namespace, or enumeration
    6 |   cin >> n:
      |          ^
a.cc:7:10: error: expected primary-expression before 'int'
    7 |   vector<int>vec(n);
      |          ^~~
a.cc:10:12: error: 'vec' was not declared in this scope
   10 |     cin >> vec[i];
      |            ^~~
a.cc:12:9: error: 'vec' was not declared in this scope
   12 |   int s=vec[0];
      |         ^~~
Language: C++

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

int main(){
  int n, count=0;
  cin >> n;
  vector<int> s(n);
  for(int i=0;i<n;i++){
    cin >> s[i];
  }
  for(int i=0;i<n;i++){
    for(int j=0;j<=i;j++){
      if(s[i]>=s[j]){
        if(j==i){
          count+=1;
        }
      }else{
        break;
      }
    }
  }
  cout << count << endl;
}
    

Compiler output:
a.cc:1:1: 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:6:3: error: 'cin' was not declared in this scope
    6 |   cin >> n;
      |   ^~~
a.cc:7:3: error: 'vector' was not declared in this scope
    7 |   vector<int> s(n);
      |   ^~~~~~
a.cc:7:10: error: expected primary-expression before 'int'
    7 |   vector<int> s(n);
      |          ^~~
a.cc:9:12: error: 's' was not declared in this scope
    9 |     cin >> s[i];
      |            ^
a.cc:13:10: error: 's' was not declared in this scope
   13 |       if(s[i]>=s[j]){
      |          ^
a.cc:22:3: error: 'cout' was not declared in this scope; did you mean 'count'?
   22 |   cout << count << endl;
      |   ^~~~
      |   count
a.cc:22:20: error: 'endl' was not declared in this scope
   22 |   cout << count << endl;
      |                    ^~~~
Language: C++

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

int main () {
  int n;
  cin >> n:
  vector<int>vec(n);
  int ans=1;
  for(int i=0;i<n;i++){
    cin >> vec[i];
  }
  int s=vec[0];
  for(int i=1;i<n;i++){
    s=max(s,i);
    if(s<=vec[i]){
      ans++;
    }
  }
  cout << ans;
}

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;
  int Hs[N];
  for(int i=0; i < N; i++){
      cin >> Hs[i];
  }
  int ans = 1;
  for(int i=1; i < N; i++){
      ans++;
      for(int j=0; j < i; j++){
          if(Hs[j] > Hs[i]){
              ans--;
              break;
          }
      }
  }
  cout << ans << "\n";
  return 0;
}	

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: expected initializer before 'cin'
    6 |   cin >> N;
      |   ^~~
a.cc:7:10: error: 'N' was not declared in this scope
    7 |   int Hs[N];
      |          ^
a.cc:9:14: error: 'Hs' was not declared in this scope
    9 |       cin >> Hs[i];
      |              ^~
a.cc:15:14: error: 'Hs' was not declared in this scope
   15 |           if(Hs[j] > Hs[i]){
      |              ^~
Language: C

#include <cstdio.h>
 
using namespace std;
 
int main() {
    cin.tie(0);ios::sync_with_stdio(false);
 
    int n,m[20],p=0,q=0;
    cin >>n;
    for(int i=0;i<n;i++){
        scanf("%d",&m[i]);
        if(m[i]>=q){
            q=m[i];
            p++;
        }
    }
    printf("%d",p);
    return 0;
}

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

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

int main(){
	int N,c = 1;
	cin >> N;
	vector<int> H(N);
	for(int i = 0;i <N;i++){
	    cin >> H.at(i);
    }
	bool flag;
    for(int i = 1;i < N;i++){
    	flag = false;
	    for(int j = 0;j<i;j++){
	        if(H.at(i)<H.at(j)){
	            flag = true;
	        }
	    }
	    if(frag == true){
	    	continue;
	    }
	    c += 1;
	}
    cout << c;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:16: error: 'frag' was not declared in this scope; did you mean 'flag'?
   19 |             if(frag == true){
      |                ^~~~
      |                flag
Language: C

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

Compiler output:
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include <stdio.h>
      |         ^
Language: Java

import java.util.Arrays;
import java.util.List;
import java.util.Scanner;
import java.util.stream.Collectors;

public class Main3 {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        sc.nextLine();
        List<Integer> tmp = Arrays.stream(sc.nextLine().split(" ")).map(e -> Integer.valueOf(e)).collect(Collectors.toList());
        int available = 0;
        int preMax = -1;

        for (int tar : tmp) {
            if (preMax <= tar) {
                preMax = tar;
                available++;
            }
        }

        System.out.println(available);
    }
}


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

#include <algorithm>
#include<iostream>
using namespace std;
int main(){
  int n;
  cin >> n;

  int h[110];
  for(int i = 0; i < n; i++) cin >> h[i];

  int max_h = 0;
  int count = 0;

  for(int i = 0; i < n; ++i){
    if(max_h <= h[i]){
      max_h = h[i];
      count++;
    }
  }
  count << count << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:18: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
   20 |   count << count << endl;
      |   ~~~~~~~~~~~~~~~^~~~~~~
Language: C++

#include<iostream>
using namespace std;

int main(){
	int N;	
	cin>>N;
	vector<int> H(20);
	for(int i;i<N;i++){
		cin>>H.at(i);
}

	int answer=0;
	bool flag;

	for(int i;i<N;i++){
		for(int j;j<i;j++){
			if(H.at(j)<=H.at(i)){
				continue;
			}else{
				flag==false;
			}
		}
		if(flag){
			answer++;
		}
	}
	cout<<answer<<endl;
	return 0;
}       

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'vector' was not declared in this scope
    7 |         vector<int> H(20);
      |         ^~~~~~
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:16: error: expected primary-expression before 'int'
    7 |         vector<int> H(20);
      |                ^~~
a.cc:9:22: error: 'H' was not declared in this scope
    9 |                 cin>>H.at(i);
      |                      ^
a.cc:17:28: error: 'H' was not declared in this scope
   17 |                         if(H.at(j)<=H.at(i)){
      |                            ^
Language: Java

public class Main {

	public static void main(String[] args) {
		int N = 0;
		Scanner sc = new Scanner(System.in);
		N = Integer.parseInt(sc.next());
		ArrayList<String> ary = new ArrayList<String>();
		int max = 0;
		int count = 0;
		for (int i = 0; i < N; i++) {
			int n = Integer.parseInt(sc.next());
			if (n >= max) {
				max = n;
				count++;
			}
		}
		System.out.println(count);
	}

}

Compiler output:
Main.java:5: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:5: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		                 ^
  symbol:   class Scanner
  location: class Main
Main.java:7: error: cannot find symbol
		ArrayList<String> ary = new ArrayList<String>();
		^
  symbol:   class ArrayList
  location: class Main
Main.java:7: error: cannot find symbol
		ArrayList<String> ary = new ArrayList<String>();
		                            ^
  symbol:   class ArrayList
  location: class Main
4 errors
Language: C++

#include "bits/stdc++.h"
using namespace std;
 
int main() {
  int N,res=1,Hmax=0;

  cin >> N;
  vector<int> H(N);

  for (int i = 0; i < N; i++)
  {
    cin >> H.at(i);
  }
  Hmax = H.at(0)
  for(int i = 1; i < N; i++)
  {
     if(H.at(0) <= H.at(i)){
       if(Hmax<=H.at(i)){
        res++;
        Hmax = H.at(0);
       }
     }
     
  }
  cout << res << endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:17: error: expected ';' before 'for'
   14 |   Hmax = H.at(0)
      |                 ^
      |                 ;
   15 |   for(int i = 1; i < N; i++)
      |   ~~~            
a.cc:15:18: error: 'i' was not declared in this scope
   15 |   for(int i = 1; i < N; i++)
      |                  ^
Language: C

#include<stdio.h>

int main(void)
{

	int n;
	int h[105];

	int i;
	int a;
	a = 1;


	scanf_s("%d", &n);

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

	}
	for (i = 1; i <= n; i++) {
		if (h[i] < h[i + 1]) {
			++a;
		}
	}

	printf("%d", a);

	return 0;


}

Compiler output:
main.c: In function 'main':
main.c:14:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
   14 |         scanf_s("%d", &n);
      |         ^~~~~~~
      |         scanf
Language: C

#include<stdio.h>

int main(void)
{

	int n;
	int h[105];

	int i;
	int a;
	a = 1;


	scanf("%d", &n);

	for (i = 1; i <= n; i++) {
		scanf_s("%d", &h[i]);

	}
	for (i = 1; i <= n; i++) {
		if (h[i] < h[i + 1]) {
			++a;
		}
	}

	printf("%d", a);

	return 0;


}

Compiler output:
main.c: In function 'main':
main.c:17:17: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
   17 |                 scanf_s("%d", &h[i]);
      |                 ^~~~~~~
      |                 scanf
Language: C++

#include <iostream>

using namespace std;

int main(void) {

	int n;

	cin >> n;

	int *h = (int *)malloc(sizeof(int) * n);

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

	int count = 1;

	for (int i = 1; i < n; i++) {
		int max_h = 0;
		for (int j = 0; j < i; j++) {
			max_h = fmax(max_h, h[j]);
		}
		if (max_h <= h[i]) {
			count++;
		}
	}

	cout << count << endl;

	free(h);

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:33: error: 'fmax' was not declared in this scope
   22 |                         max_h = fmax(max_h, h[j]);
      |                                 ^~~~
Language: C

#include <stdio.h>
#include <stdlib.h>

int main()
{
	char h[21][4];
	int N,H[21],i=0,can=1;
	scanf("%2d",&N);
	do
	{
		scanf("%s",h[i]);
	}while(h[i]!='\n');
	H[0]=atoi(h[0]);
	for(i=1;i<N;i++)
	{
		H[i]=atoi(h[i]);
		if(h[i]>h[i-1])
		{
			can++;
		}
		else
		{
			h[i]=h[i-1];
		}
	}
	printf("%d",can);
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:12:20: warning: comparison between pointer and integer
   12 |         }while(h[i]!='\n');
      |                    ^~
main.c:23:29: error: assignment to expression with array type
   23 |                         h[i]=h[i-1];
      |                             ^
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:12:17: error: expected expression before '<' token
   12 |     if(highest =< H[k]){
      |                 ^
Language: C++

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

int main(){
    int n,ans;
    int H[256] = {};

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

    for (int i = 1; i < n; i++){
        for (int j = 0; j < n-1; j++){
            if ( H[i] < H[j] ) {
                ans--;
            }
        }
    }
    cout << ans << endl;

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:12:13: error: 'vex' was not declared in this scope; did you mean 'vec'?
   12 |       MAX = vex.at(i);
      |             ^~~
      |             vec
Language: C++

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

int main(){
	int n;cin>>n;
  	int sum,ans=0;
	vector<int>v(n);
  	for(int i=0;i<n;++i)cin>>v[i];
  	for(int i=0;i<n;++i){
      sum=0;
      for(int j=0;j<n-i;++j)
    	if(v[i]>=v[i+j])++sum;
    }if(sum==n-1-i)++ans;
  cout<<ans<<endl;return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:18: error: 'i' was not declared in this scope
   14 |     }if(sum==n-1-i)++ans;
      |                  ^
Language: C

#include<studio.h>
int main(void){
  int N;
  scanf("%d",&N);
  int H[N];
  for(int i = 0;i < N;i ++){
    scanf("%d",&H[i]);
  }
  int ans = 0;
  int highest = 0;
  for(int k = 0;k < N;k ++){
    if(highest =< H[k]){
      ans ++;
      highest = H[k];
    }
  }
  printf("%d\n",ans);
}

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

N=int(input())
Hl=list(map(int,input().split()))
cnt=0
for i in range(1,N+1):
    if all(Hl[i-1]>=h for h in Hl[:i]):
        cnt+=1
print(cnt)

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

//#include "pch.h"
#include <stdio.h>
#include <math.h>
#include <string.h>
#include <stdlib.h>

#include <vector>
#include <set>
#include <map>
#include <iostream>
#include <utility>
#include <queue>
#include <algorithm>
#include <functional>
#include <string>
#include <bitset>

#define ll long long
#define fri(n) for(i=0;i<(n);i++)
#define frj(n) for(j=0;j<(n);i++)
#define min(p,q) ((p)<(q)?(p):(q))
#define max(p,q) ((p)>(q)?(p):(q))
#define INF 1000000000000000000//10^18
#define INFINT 2000000001//2*10^9+1
#define MOD 1000000007
#define MODANOTHER 998244353
#define PI acos(-1)

using namespace std;


int main(void)
{
	//変数の宣言
	int n;
	int h[30];

	//よく使う変数
	int i,j,l;
	int flag=0;
	int ans=0;
	int count=0;
	int temp=0;
	int temp1=0;
	int temp2=0;
	int max=0;
	int min=INFINT;
	int len=0;
	int sum=0;
	int ok=0;
	int ng=0;
	int dummy;



	//データの読み込み


	scanf("%d",&n);
//	scanf_s("%d",&n);



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

	//	printf("nは%dです\n", n);
	//	printf("データの読み込み終了\n");
	//実際の処理

	temp=0;
	for(i=0;i<n;i++){
		temp=max(temp,h[i]);
		if(temp<=h[i]){
			ans++;
		}
	}


	//	printf("計算部分終了\n");

	//出力
	printf("%d\n",ans);

	//	printf("結果の出力終了\n");

	return 0;
}



Compiler output:
a.cc:65:25: warning: missing terminating " character
   65 |                 scanf(%d",&h[i]);
      |                         ^
a.cc:65:25: error: missing terminating " character
   65 |                 scanf(%d",&h[i]);
      |                         ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:65:23: error: expected primary-expression before '%' token
   65 |                 scanf(%d",&h[i]);
      |                       ^
a.cc:65:24: error: 'd' was not declared in this scope
   65 |                 scanf(%d",&h[i]);
      |                        ^
Language: C++

#include <iostream>
#include <stdio.h>
#include <string.h>
#include <map>
#include <bits/stdc++.h>
using namespace std;
ll a[200000+5];
ll p[40];
int main()
{
    int n,ans=0,f;
    while(cin>>n)
    {
        ans=0;
        for(int i=1;i<=n;i++)
        {
            cin>>a[i];
            f=1;
            for(int j=i;j>=1;j--)
                if(a[j]>a[i])
                {
                    f=0;
                    break;
                }
            if(f==1)
                ans++;
        }
       cout<<ans<<endl;
    }

    return 0;
}

Compiler output:
a.cc:7:1: error: 'll' does not name a type
    7 | ll a[200000+5];
      | ^~
a.cc:8:1: error: 'll' does not name a type
    8 | ll p[40];
      | ^~
a.cc: In function 'int main()':
a.cc:17:18: error: 'a' was not declared in this scope
   17 |             cin>>a[i];
      |                  ^
Language: C++

#include<iostream>

using namespace std;

int main(void){
    int n;
    cin>>n;
    int h[n];
    for(int i=0;i<n;i++){
        cin>>h[i];
    }
    int num=0;
    int max=0;
    for(int i=0;i<n;i++){
        if(max<=h[i]){
            max=h[i];
            num++;
        }
    }
    cout<<num,<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:15: error: expected primary-expression before '<' token
   20 |     cout<<num,<endl;
      |               ^
Language: C++

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

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

//#include "pch.h"
#include <stdio.h>
#include <math.h>
#include <string.h>
#include <stdlib.h>

#include <vector>
#include <set>
#include <map>
#include <iostream>
#include <utility>
#include <queue>
#include <algorithm>
#include <functional>
#include <string>
#include <bitset>

#define ll long long
#define fri(n) for(i=0;i<(n);i++)
#define frj(n) for(j=0;j<(n);i++)
#define min(p,q) ((p)<(q)?(p):(q))
#define max(p,q) ((p)>(q)?(p):(q))
#define INF 1000000000000000000//10^18
#define INFINT 2000000001//2*10^9+1
#define MOD 1000000007
#define MODANOTHER 998244353
#define PI acos(-1)

using namespace std;


int main(void)
{
	//変数の宣言
	int n;
	int h[30];

	//よく使う変数
	int i,j,l;
	int flag=0;
	int ans=0;
	int count=0;
	int temp=0;
	int temp1=0;
	int temp2=0;
	int max=0;
	int min=INFINT;
	int len=0;
	int sum=0;
	int ok=0;
	int ng=0;
	int dummy;



	//データの読み込み


//	scanf("%d",&n);
	scanf_s("%d",&n);



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

	//	printf("nは%dです\n", n);
	//	printf("データの読み込み終了\n");
	//実際の処理

	temp=0;
	for(i=0;i<n;i++){
		temp=max(temp,h[i]);
		if(temp<=h[i]){
			ans++;
		}
	}


	//	printf("計算部分終了\n");

	//出力
	printf("%d",ans);

	//	printf("結果の出力終了\n");

	return 0;
}



Compiler output:
a.cc:65:25: warning: missing terminating " character
   65 |                 scanf(%d",&h[i]);
      |                         ^
a.cc:65:25: error: missing terminating " character
   65 |                 scanf(%d",&h[i]);
      |                         ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:60:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   60 |         scanf_s("%d",&n);
      |         ^~~~~~~
      |         scanf
a.cc:65:23: error: expected primary-expression before '%' token
   65 |                 scanf(%d",&h[i]);
      |                       ^
a.cc:65:24: error: 'd' was not declared in this scope
   65 |                 scanf(%d",&h[i]);
      |                        ^
Language: C++

int main()
{
	int n;
	int h,m,ans;
	ans = 0;
	std::cin >> n;
	m = -1;
	for (int i = 0; i < n; i++) {
		std::cin >> h;
		if (h >= m) {
			m = h;
			ans++;
		}
	}
	std::cout << ans;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:14: error: 'cin' is not a member of 'std'
    6 |         std::cin >> n;
      |              ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | int main()
a.cc:9:22: error: 'cin' is not a member of 'std'
    9 |                 std::cin >> h;
      |                      ^~~
a.cc:9:22: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:15:14: error: 'cout' is not a member of 'std'
   15 |         std::cout << ans;
      |              ^~~~
a.cc:15:14: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)

int N;

int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);

	cin >> N;

	vector<int> H<N>;

	for(auto &x: H) cin >> x;

	int ans=1;
	int top = H[0];
	REP(i,N - 1){
		if(H[i + 1] > top){
			break;
		}
		ans++;
	}
	cout << ans << endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:22: error: expected initializer before '<' token
   14 |         vector<int> H<N>;
      |                      ^
a.cc:16:22: error: 'H' was not declared in this scope
   16 |         for(auto &x: H) cin >> x;
      |                      ^
a.cc:19:19: error: 'H' was not declared in this scope
   19 |         int top = H[0];
      |                   ^
Language: C

#include <iostream>
#include <vector>
#include <cstdio>
#include <string>
#include <algorithm>

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 = N;
    for (int i = 1; i < N; i++)
    {
        for (int j = i; j >= 0; j--)
        {
            if (H[i] < H[j])
            {
                ans--;
                break;
            }
        }
        
    }
    cout << ans;
    return 0;
}

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


n = int( input() )

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

ans = 0
max_ = H[0]
for hi in H:
    if max_ <= hi:
        ans += 1
        max_ = hi

print(ans)


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

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


Compiler output:
main.c: In function 'main':
main.c:9:31: error: expected ';' before ')' token
    9 |         for (i = 0; i < N, i++) {
      |                               ^
      |                               ;
Language: C++

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

int main()
{
  int n;
  cin >> n;
  vector<int> h(n);
  for(auto& i : h) cin >> i;
  int ans = 1;
  for(int i = 1; i < n; ++i)
  {
    for(int k = 0; k < i; ++k)
    {
      if(h[i] < h[k])
      {
        k = -1;
        break;
      }
    }
    if(k != -1) ++ans;
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:8: error: 'k' was not declared in this scope
   21 |     if(k != -1) ++ans;
      |        ^
Language: C++

#include<cstdio>
#include<cmath>
#include<climits>
#include<algorithm>
#include<sstream>
#include<iostream>
#include<string>
#include<queue>
#include<stack>
#include<set>
#include<list>
#include<map>
#include<vector>

using namespace std;


#define rep(i,n) for(int i=0; i<n; i++)
#define rept(i,a,b) for(int i=a; i<b; i++)
#define ll long long

#define IMIN INT_MIN;
#define IMAX INT_MAX;


int main(){
	int N;
	cin >> N;
	vector<int> H(N);

	sort(H.begin(), H.end());

	int cnt = 1;
	int st = H[N-1];

	for(int i=N-2, i>0, i--) {
		if (st <= H[i]) {
			cnt++;
			st = H[i];
		}
		else break;
	}

	cout << cnt << endl;




	return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:36:25: error: expected ';' before '>' token
   36 |         for(int i=N-2, i>0, i--) {
      |                         ^
      |                         ;
a.cc:36:25: error: expected primary-expression before '>' token
a.cc:36:32: error: expected ';' before ')' token
   36 |         for(int i=N-2, i>0, i--) {
      |                                ^
      |                                ;
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
int main() {
  int n,a[20],ans=0,max=0;
  cin >> n;
  for(int i=0; i<n; i++) {
    cin >> a[i];
    if(max<a[i]) {
      max=a[i];
    }
    if(max<=a[i]) {
      ans++:
    }
    else {
      ans+=0;
    }
  }
cout << ans << endl;
  
}



Compiler output:
a.cc: In function 'int main()':
a.cc:13:12: error: expected ';' before ':' token
   13 |       ans++:
      |            ^
      |            ;