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

#include <iostream>
#include <string>
#include <vector>
#include <math.h>
#include <stdio.h>
#include <algorithm>
#include <utility>
#include <functional>
#define rep(i,n) for(int i=0;i<(n);i++)
#define All(x) (x).begin(),(x).end()
using namespace std;
using pii  = pair<int,int>;
typedef long long ll;
#define MOD 1000000007
#define EPS 10e-8

int main(){
  int a,b[10009],ma,c;
  ma=c=0;
   cin >> a;
  rep(i,a){
    cin >> b[i];
    if(b[i]>=ma){
      ma=b[i];
      c++;
    }
  }
  cout << 

Compiler output:
a.cc: In function 'int main()':
a.cc:28:10: error: expected primary-expression at end of input
   28 |   cout <<
      |          ^
a.cc:28:10: error: expected '}' at end of input
a.cc:17:11: note: to match this '{'
   17 | int main(){
      |           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef vector<ll> vl;
typedef vector<pair<ll,ll>> vp;
#define rep(i,n) for(ll i = 0; i < ll(n); i++)
#define all(v) v.begin() , v.end()
#define inputv(v,n) rep(i,n){\
    ll x;\
    cin>>x;\
    v.push_back(x);\
    }
const ll INF=99999999999999;
const ll MOD=1000000007;
 
int main() {
  ll n;
  cin >> n;
  vl h;
  inputv(h,n);
  ll mx = 0;
  ll ans = 0;
  rep(i,n){
    if(h[i] >= mx){
      ans++;
    }
    mx = max(mx. h[i]);
  }
  cout << ans;
 return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:18: error: request for member 'h' in 'mx', which is of non-class type 'll' {aka 'long long int'}
   27 |     mx = max(mx. h[i]);
      |                  ^
Language: C++

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

#define rep(i, n) for (int i = (int)(0); i < (int)(n); ++i)
#define reps(i, n) for (int i = (int)(1); i <= (int)(n); ++i)
#define rrep(i, n) for (int i = ((int)(n)-1); i >= 0; i--)
#define rreps(i, n) for (int i = ((int)(n)); i > 0; i--)
#define irep(i, m, n) for (int i = (int)(m); i < (int)(n); ++i)
#define ireps(i, m, n) for (int i = (int)(m); i <= (int)(n); ++i)
#define FOR(e, c) for (auto &e : c)
#define SORT(v, n) sort(v, v + n);
#define vsort(v) sort(v.begin(), v.end());
#define rvisort(v) sort(v.begin(), v.end(), greater<int>());
#define all(v) v.begin(), v.end()
#define mp(n, m) make_pair(n, m);
#define coutd(d) cout<<std::setprecision(10)<<d<<endl;
#define cinline(n) getline(cin,n);

using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vll = vector<ll>;
using vvll = vector<vll>;
using pii = pair<int, int>;
using ul = unsigned long;

template<class T, class C> void chmax(T& a, C b){ a>b?:a=b; }
template<class T, class C> void chmin(T& a, C b){ a<b?:a=b; }

const int mod=1e9+7;

struct mint {
  ll x;
  mint(ll x=0):x(x%mod){}
  mint& operator+=(const mint a) {
    if ((x += a.x) >= mod) x -= mod;
    return *this;
  }
  mint& operator-=(const mint a) {
    if ((x += mod-a.x) >= mod) x -= mod;
    return *this;
  }
  mint& operator*=(const mint a) {
    (x *= a.x) %= mod;
    return *this;
  }
  mint operator+(const mint a) const {
    mint res(*this);
    return res+=a;
  }
  mint operator-(const mint a) const {
    mint res(*this);
    return res-=a;
  }
  mint operator*(const mint a) const {
    mint res(*this);
    return res*=a;
  }
};

mint c[4005][4005];
void init() {
  c[0][0] = 1;
  for (int i = 0; i <= 4000; i++) {
    for (int j = 0; j <= i; j++) {
      c[i+1][j] += c[i][j];
      c[i+1][j+1] += c[i][j];
    }
  }
}
mint comb(int n, int k) {
  return c[n][k];
}

bool IsPrime(int num)
{
    if (num < 2) return false;
    else if (num == 2) return true;
    else if (num % 2 == 0) return false;

    double sqrtNum = sqrt(num);
    for (int i = 3; i <= sqrtNum; i += 2)
    {
        if (num % i == 0)
        {
            return false;
        }
    }

    return true;
}

map<ll, ll> primeFact(ll n) {
  map<ll, ll> res;
  for (ll i = 2; i * i <= n; i++) {
    while (n % i == 0) {
      res[i]++;
      n /= i;
    }
  }
  if (n != 1) res[n]++;
  return res;
}

void printv(vi& v){
  rep(i,v.size()) cout << v[i] << " ";
  cout << endl;
}
void printv(vll& v){
  rep(i,v.size()) cout << v[i] << " ";
  cout << endl;
}
int vtotal(vi& v){
  int total=0;
  rep(i,v.size()) total+=v[i];
  return total;
}

int main()
{
  //init(); // mint初期化
  cin.tie( 0 );
  ios::sync_with_stdio( false );

  int n;cin>>n;
  vi h(n);
  rep(i,n)cin[i];

  int ans=0;
  int max=0;
  rep(i,n){
    if(max<h[i])max=h[i];
    if(h[i]>=max)ans++;
  }
  cout<<ans<<endl;

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:127:14: error: no match for 'operator[]' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int')
  127 |   rep(i,n)cin[i];
      |              ^
Language: C

#include <stdio.h>

int main(void)
{
        int n,i,h[100],x=1,j,f;

        scanf("%d",&n);

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

        for(i=1;i<n;i++){
                f=1;
                for(j=0;j<i;j++){
                        if(h[i]<h[j])
                                f=0;
                }
                if(f==1)x++;
        }

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

        return 0;
}

~                                                                    
~               

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

#include "bits/stdc++.h"
using namespace std;
int main(){
    int N;
    cin >> N;
    int m = 0,n = 0,i = 0,x;
    while(i < N){
        cin >> x;
        if(x >= m){
            m = x;
            n++;
        }
        i++;
    }
    cout << n << endl;
}#include "bits/stdc++.h"
using namespace std;
int main(){
    int N;
    cin >> N;
    int m = 0,n = 0,i = 0,x;
    while(i < N){
        cin >> x;
        if(x >= m){
            m = x;
            n++;
        }
        i++;
    }
    cout << n << endl;
}

Compiler output:
a.cc:16:2: error: stray '#' in program
   16 | }#include "bits/stdc++.h"
      |  ^
a.cc:16:3: error: 'include' does not name a type
   16 | }#include "bits/stdc++.h"
      |   ^~~~~~~
a.cc:18:5: error: redefinition of 'int main()'
   18 | int main(){
      |     ^~~~
a.cc:3:5: note: 'int main()' previously defined here
    3 | int main(){
      |     ^~~~
Language: C++

#include<bits/stdc++.h>
#define rep(i,n) for(int i = 0;i<n;i++)
using namespace std;
int main(){
  int n;
  cin>>n;
  int h[n];
  rep(i,n)cin>>h[i];
  int ans=0;
  for(int i=n-1;i>=0;i--){
    for(int j=0;j<n;j++){
    if(i>j){
    if(h[i]>=h[j])ans++;
      else break;
    }
      else break;
  }
  cout << ans <<endl;
}

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

#include<iostream>
using namespace std;
int main()
{
  int N,A;int max=0; int some_count=0;
  cin>>N;
  for(int i=0;i<N;i++)
  {
    cin>>A;
    if(A>=max){some_count++;max=A;}
  }
  cout<<count<<endl;
  return 0;
}


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

#include<iostream>
using namespace std;
int main()
{
  int N,A;int max=0; int some_count=0;
  cin>>N;
  for(int i=0;i<N;i++)
  {
    cin>>A;
    if(A>=max){some_count++;A=max;}
  }
  cout<<count<<endl;
  return 0;
}

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

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

int main() {
  int n;
  cin >> n;
  
  vactor<int> h(n);
  for (int i=0; i<n; i++){
    cin >> h.at(i);
  }
  
  int cnt = 0;
  int m_h = h.at(0);
  
  for (int i=0; i<n; i++){
    if (h.at(i) >= m_h){
      cnt++;
      m_h = h.at(i);
    }
  }
  
  cout << cnt << endl;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 'vactor' was not declared in this scope
    8 |   vactor<int> h(n);
      |   ^~~~~~
a.cc:8:10: error: expected primary-expression before 'int'
    8 |   vactor<int> h(n);
      |          ^~~
a.cc:10:12: error: 'h' was not declared in this scope
   10 |     cin >> h.at(i);
      |            ^
a.cc:14:13: error: 'h' was not declared in this scope
   14 |   int m_h = h.at(0);
      |             ^
Language: C++

using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'cin' was not declared in this scope
    5 |         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 | using namespace std;
a.cc:8:9: error: 'vector' was not declared in this scope
    8 |         vector<int> H(N);
      |         ^~~~~~
a.cc:1:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
  +++ |+#include <vector>
    1 | using namespace std;
a.cc:8:16: error: expected primary-expression before 'int'
    8 |         vector<int> H(N);
      |                ^~~
a.cc:10:24: error: 'H' was not declared in this scope
   10 |                 cin >> H[i];
      |                        ^
a.cc:14:19: error: 'H' was not declared in this scope
   14 |         int max = H[0];
      |                   ^
a.cc:21:9: error: 'cout' was not declared in this scope
   21 |         cout << cnt << endl;
      |         ^~~~
a.cc:21:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:21:24: error: 'endl' was not declared in this scope
   21 |         cout << cnt << endl;
      |                        ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'intH' was not declared in this scope; did you mean 'int'?
    5 |   intH[N],i,max,sum=1;
      |   ^~~~
      |   int
a.cc:5:11: error: 'i' was not declared in this scope
    5 |   intH[N],i,max,sum=1;
      |           ^
a.cc:5:13: error: 'max' was not declared in this scope
    5 |   intH[N],i,max,sum=1;
      |             ^~~
a.cc:5:17: error: 'sum' was not declared in this scope
    5 |   intH[N],i,max,sum=1;
      |                 ^~~
a.cc:6:32: error: 'H' was not declared in this scope
    6 |   for(i=0;i<N;i++) scanf("%d",&H[i]);
      |                                ^
a.cc:7:7: error: 'H' was not declared in this scope
    7 |   max=H[0];
      |       ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'intH' was not declared in this scope; did you mean 'int'?
    5 |   intH[N],i,max,sum=1;
      |   ^~~~
      |   int
a.cc:5:11: error: 'i' was not declared in this scope
    5 |   intH[N],i,max,sum=1;
      |           ^
a.cc:5:13: error: 'max' was not declared in this scope
    5 |   intH[N],i,max,sum=1;
      |             ^~~
a.cc:5:17: error: 'sum' was not declared in this scope
    5 |   intH[N],i,max,sum=1;
      |                 ^~~
a.cc:6:32: error: 'n' was not declared in this scope
    6 |   for(i=0;i<N;i++) scanf("%d",&n);
      |                                ^
a.cc:7:7: error: 'H' was not declared in this scope
    7 |   max=H[0];
      |       ^
Language: C++

#include <bits/stdc++.h>

#define mod 1000000007

using namespace std;
typedef long long ll; 
 
int main(void){
	
	int N, count, ans = 1;
	
	cin >> N;
	
	int H[N];
	
	for(int i=0; i<N; i++)
		cin >> H[i];
	
	for(int i=1; i<N; i++){
		count = 0;
		for(int j=0; j<i; j++){
			if(A[i] >= A[j])
				count++;
		}
		if(count == i)
			ans++;
	}
	
	cout << ans;
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:28: error: 'A' was not declared in this scope
   22 |                         if(A[i] >= A[j])
      |                            ^
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); i++)
#define rep1(i,n) for (int i = 1; i <= (n); i++)
#define repf(i,a,b) for (int i = (a); i < (b); i++)
#define repi(i,a,b) for (int i = (a); i <= (b); i++)
#define all(x) (x).begin(),(x).end()
using namespace std;
using uint = unsigned int;
using ll = long long;
using ull = unsigned long long;
using vi = vector<int>;
using vvi = vector<vi>;
using pii = pair<int, int>;
using vc = vector<char>;
using vvc = vector<vc>;
using vs = vector<string>;
using tiii = tuple<int, int, int>;

int main() {
  int N; cin >> N;
  vi H(N); rep(i,N) cin >> H.at(i);
  
  int ans = 0;
  rep(i,N) {
    bool is_candidate = true;
    rep(j,i) {
      if (H.at(j) > H.at(i)) {
        is_candidata =false;
        break;
      }
    }
    
    if (is_candidate) ans++;
  }
  
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:9: error: 'is_candidata' was not declared in this scope; did you mean 'is_candidate'?
   28 |         is_candidata =false;
      |         ^~~~~~~~~~~~
      |         is_candidate
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); i++)
#define rep1(i,n) for (int i = 1; i <= (n); i++)
#define repf(i,a,b) for (int i = (a); i < (b); i++)
#define repi(i,a,b) for (int i = (a); i <= (b); i++)
#define all(x) (x).begin(),(x).end()
using namespace std;
using uint = unsigned int;
using ll = long long;
using ull = unsigned long long;
using vi = vector<int>;
using vvi = vector<vi>;
using pii = pair<int, int>;
using vc = vector<char>;
using vvc = vector<vc>;
using vs = vector<string>;
using tiii = tuple<int, int, int>;

int main() {
  int N; cin >> N;
  vi H(N); rep(i,N) cin >> H.at(i);
  
  int ans = 0;
  rep(i,N) {
    bool is_candidate = true;
    rep(j,i) {
      if (H.at(j) > H.at(i)) {
        is_candidata =false;
        break;
      }
    }
    
    if (is_candidate) ans++
  }
  
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:9: error: 'is_candidata' was not declared in this scope; did you mean 'is_candidate'?
   28 |         is_candidata =false;
      |         ^~~~~~~~~~~~
      |         is_candidate
a.cc:33:28: error: expected ';' before '}' token
   33 |     if (is_candidate) ans++
      |                            ^
      |                            ;
   34 |   }
      |   ~
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); i++)
#define rep1(i,n) for (int i = 1; i <= (n); i++)
#define repf(i,a,b) for (int i = (a); i < (b); i++)
#define repi(i,a,b) for (int i = (a); i <= (b); i++)
#define all(x) (x).begin(),(x).end()
using namespace std;
using uint = unsigned int;
using ll = long long;
using ull = unsigned long long;
using vi = vector<int>;
using vvi = vector<vi>;
using pii = pair<int, int>;
using vc = vector<char>;
using vvc = vector<vc>;
using vs = vector<string>;
using tiii = tuple<int, int, int>;

int main() {
  int N; cin >> N;
  vi H(N); rep(i,N) cin >> H.at(i);
  
  int ans = 1;
  repf(i,1,N) {
    if (H.at(i-1)<=H.at(i)) ans++
  }
  
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:34: error: expected ';' before '}' token
   25 |     if (H.at(i-1)<=H.at(i)) ans++
      |                                  ^
      |                                  ;
   26 |   }
      |   ~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define pf push_front

typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;

#define mp make_pair
#define fi first
#define se second
typedef pair<int,int> pint;
#define All(s) s.begin(),s.end()
#define rAll(s) s.rbegin(),s.rend()
#define REP(i,a,b) for(int i=a;i<b;i++)
#define rep(i,n) REP(i,0,n)



int main()
{
  int N;
  cin >> N;
  vector<int> h(N);
  
  int count = 1;
  rep(i,N){
   if (i == 0) continue;
    bool see = true; 
    rep(j,i){
       if (h.at(j) > h.at(i)) see = false;
     }
    if (see) count++;
  }
  
  puts (count++);
  
  
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:39:14: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
   39 |   puts (count++);
      |         ~~~~~^~
      |              |
      |              int
In file included from /usr/include/c++/14/cstdio:42,
                 from /usr/include/c++/14/ext/string_conversions.h:45,
                 from /usr/include/c++/14/bits/basic_string.h:4154,
                 from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/stdio.h:714:30: note:   initializing argument 1 of 'int puts(const char*)'
  714 | extern int puts (const char *__s);
      |                  ~~~~~~~~~~~~^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int A;
  int count = 0;
  cin >> A;
  int B[20];
  
  for (i = 0; i < A; i++)　{
    cin >> B[i];
  }
  for (i = 0; i < A; i++)　{
    if (B[i] <= B[i+1]) {
      count++
    }
    else 
      break;
  }
  		cout << count << endl; 
}

Compiler output:
a.cc:10:26: error: extended character 　 is not valid in an identifier
   10 |   for (i = 0; i < A; i++)　{
      |                          ^
a.cc:13:26: error: extended character 　 is not valid in an identifier
   13 |   for (i = 0; i < A; i++)　{
      |                          ^
a.cc: In function 'int main()':
a.cc:10:8: error: 'i' was not declared in this scope
   10 |   for (i = 0; i < A; i++)　{
      |        ^
a.cc:10:26: error: '\U00003000' was not declared in this scope
   10 |   for (i = 0; i < A; i++)　{
      |                          ^~
a.cc:13:8: error: 'i' was not declared in this scope
   13 |   for (i = 0; i < A; i++)　{
      |        ^
a.cc:13:26: error: '\U00003000' was not declared in this scope
   13 |   for (i = 0; i < A; i++)　{
      |                          ^~
Language: C++

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

int main(){
  
  int N;
  cin >> N;
 vector<int> H(30) ;
  rep (i,N) cin >> H.at(i);
  int count = 1;
  for (i = 1;i<N;i++){
    bool k = true;
    rep(j,i){
	 if (H.at(j) > H.at(i)) k = false;
   }
    if (k) count++;
    
  }
  cout << count << endl;
}


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

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

int main(){

  int n;

  cin>>n;

  int r[20];

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

  int ans=0,max=1;

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

    if(h[i]>max){

      max=h[i];

      ans++;
    }

  }

  cout<<ans;

  return 0;

}

  



  


Compiler output:
a.cc:1:10: 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,h[20],count=1;
  cin >> n;
  for(int i=0; i<n; i++){
    cin >> h[i];
  }
  for(int i=1; i<n; i++){
    if(h[0]<=h[i] && h[1]<=h[i] && h[i-1]<=h[i]){
      count+=1
    }
  }
  cout << count << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:15: error: expected ';' before '}' token
   12 |       count+=1
      |               ^
      |               ;
   13 |     }
      |     ~
Language: C++

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

    int H[N];

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

    int ans = 1;

    for(int i = 1; i < N; i++) {
        for(int j = 0; j < i; j++) {
            if(H[i] < H[j]) {
                break;
            }
        } 

        if(j == i) {
            ans++;
        }
    }

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

Compiler output:
a.cc: In function 'int main()':
a.cc:25:12: error: 'j' was not declared in this scope
   25 |         if(j == i) {
      |            ^
Language: C++

#include<stdio.h>
int main()
{
	int N, k;
	scanf("%d", &N);
	
	int H[N];
	
	for(k=0; k<N; k++){
		scanf("%d", &H[k]);
	}
	
	int max = 0;
	int c = 0;
	
	for(k=0; k<N; k++){
		if(H[k] >= max){
			max = H[k];
			c++;
		}
	}
		

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:26:2: error: expected '}' at end of input
   26 | }
      |  ^
a.cc:3:1: note: to match this '{'
    3 | {
      | ^
Language: Java

import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int number_n, i, j, count = 0;
    number_n = Integer.parseInt(sc.next());
    int[] height = new int[number_n];
    for(i = 0; i < number_n; i++) {
      height[i] = Integer.parseInt(sc.next());
      for(j = 0; j < i; j++) {
        if(height[j] > height[i]) {
          break;
        }
      }
      if(j = i) count++;
    }
    System.out.println(count);
  }
}


Compiler output:
Main.java:16: error: incompatible types: int cannot be converted to boolean
      if(j = i) count++;
           ^
1 error
Language: C++

n = int(input())
h = list(map(int, input().split()))
count = 0
max_h = 0
for i in range(n):
    if h[i] >= max_h:
        count += 1
        max_h = h[i]
print(count)

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

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

  cout << ans;
  return 0;
}


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

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

        
  

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

// B-Great Ocean View.cpp : アプリケーションのエントリ ポイントを定義します。
//

#include "stdafx.h"
#include<iostream>
#include<string>
#include<vector>

using namespace std;


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

	int l;
	for (int i = 0; i < N;i++) {
		cin >> l;
		H.push_back(l);
	}

	int counter = 1;
	int max = H[0];

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

	
	//cin>>N;

    return 0;
}



Compiler output:
a.cc:4:10: fatal error: stdafx.h: No such file or directory
    4 | #include "stdafx.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

n = int(input())
num_list = [ int(v) for v in range(n)]
s = 0
for i in range(n):
	if max(num_list[:i+1]) <= i:
		s += 1
print(ans)

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

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

Compiler output:
main.c: In function 'main':
main.c:18:3: error: expected declaration or statement at end of input
   18 |   }
      |   ^
Language: C

#include<stdio.h>
int main(void){
  int N,H[20],i,j,c=0;
  scanf("%d",&N);
  for(i=0;i<=N-1;i++){
    scanf("%d",&H[i]);
  }
  for(i=1;i<=N-1;i++){
    for(j=i+1;j<=N-1;j++){
      if(H[i]<H[j]){
        break;
      }
      if(j==N-1)
        c++;
    }
    printf("%d",c);
    retutn 0;
  }

Compiler output:
main.c: In function 'main':
main.c:17:5: error: 'retutn' undeclared (first use in this function)
   17 |     retutn 0;
      |     ^~~~~~
main.c:17:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:17:11: error: expected ';' before numeric constant
   17 |     retutn 0;
      |           ^~
      |           ;
main.c:18:3: error: expected declaration or statement at end of input
   18 |   }
      |   ^
Language: C++

#include <iostream>
#include<vector>
using namespace std;
int main() {
	int N;
	cin >> N;
	vector<int> height;
	for(int i = 0; i < N; i++){
		cin >> height[i];
	}
	int ans = 0;
	for (int i = 0; i < N; i++) {
		for (int j = i; j <= ; j++) {
			if (height[i] >= height[j]) {
				ans++;
			}
		}
	}

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


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

#include <iostream>
using namespace std;
int main() {
	int N;
	cin >> N;
	const int HEIGHT = N;
	for(int i = 0; i < N; i++){
		cin >> HEIGHT[i];
	}
	int ans = 0;
	for (i = 0; i < N; i++) {
		for (int j = i - 1; j = 0; j--;) {
			if (HEIGHT[i] >= HEIGHT[j]) {
				ans++;
			}
			else {
				break;
			}
		}
	}

	cout << ans << endl;
	return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:8:30: error: invalid types 'const int[int]' for array subscript
    8 |                 cin >> HEIGHT[i];
      |                              ^
a.cc:11:14: error: 'i' was not declared in this scope
   11 |         for (i = 0; i < N; i++) {
      |              ^
a.cc:12:47: error: expected ')' before ';' token
   12 |                 for (int j = i - 1; j = 0; j--;) {
      |                     ~                         ^
      |                                               )
a.cc:12:48: error: expected primary-expression before ')' token
   12 |                 for (int j = i - 1; j = 0; j--;) {
      |                                                ^
a.cc:23:18: error: expected '}' at end of input
   23 |         return 0;
      |                  ^
a.cc:3:12: note: to match this '{'
    3 | int main() {
      |            ^
Language: C++

#include <iostream>
using namespace std;
int main() {
	int N;
	cin >> N;
	const int HEIGHT = N;
	for(int i = 0; i < N; i++){
		cin >> HEIGHT[i];
	}
	int ans = 0;
	for (i = 0; i < N; i++;) {
		for (int j = i - 1; j = 0; j--;) {
			if (HEIGHT[i] >= HEIGHT[j]) {
				ans++;
			}
			else {
				break;
			}
		}
	}

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:30: error: invalid types 'const int[int]' for array subscript
    8 |                 cin >> HEIGHT[i];
      |                              ^
a.cc:11:14: error: 'i' was not declared in this scope
   11 |         for (i = 0; i < N; i++;) {
      |              ^
a.cc:11:31: error: expected ')' before ';' token
   11 |         for (i = 0; i < N; i++;) {
      |             ~                 ^
      |                               )
a.cc:11:32: error: expected primary-expression before ')' token
   11 |         for (i = 0; i < N; i++;) {
      |                                ^
Language: C++

nclude<bits/stdc++.h>
using namespace std;
int main()
{
	int n;
  cin>>n;
  int max=INT_MIN;
  	int count=0;
  	int a[21]={0};
  	for(int i=0;i<n;i++)
    {
		cin>>a[i];
      if(a[i]>=max)
      {		max=a[i];
            count++;
      }
      
 
    }
  	cout<<count;
}
      
 
}

Compiler output:
a.cc:1:1: error: 'nclude' does not name a type
    1 | nclude<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:11: error: 'INT_MIN' was not declared in this scope
    7 |   int max=INT_MIN;
      |           ^~~~~~~
a.cc:1:1: note: 'INT_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
  +++ |+#include <climits>
    1 | nclude<bits/stdc++.h>
a.cc:20:9: error: 'cout' was not declared in this scope; did you mean 'count'?
   20 |         cout<<count;
      |         ^~~~
      |         count
a.cc: At global scope:
a.cc:24:1: error: expected declaration before '}' token
   24 | }
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
	int n;
  cin>>n;
  int max=INT_MIN;
  	int count=0;
  	int a[21]={0};
  	for(int i=0;i<n;i++)
    {
		cin>>a[i];
      if(a[i]>=max)
      {		max=a[i];
            count++;
      }
      

    }
  	cout<<count;
}
      

}

Compiler output:
a.cc:24:1: error: expected declaration before '}' token
   24 | }
      | ^
Language: C++

#include<iostream>
#include<string>
#include<vector>
using namespace std;
int main(){
	
	int n, a = 0, ans = 0;
	cin >> n;

	vector<int> h(n);

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

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

		if (i = 0){
			ans++;
			a = h.at(i);
		}

		else if (i >= 1){
			if (h.at(i) > a){
				a = h.at(i);
				ans++;
			}
		}
	}

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

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

int main(){
int N;
cin>>N
  vector<int> vec(N);
  int sum=0;
  for(int i=0;i<vec.size();i++){
    cin>>vec.at(i);  
    
    if(max(vec.begin(),vec.end())<=vec.at(i)){
      sum++;
  }
    cout<<sum<<endl;
  }
  

Compiler output:
a.cc: In function 'int main()':
a.cc:6:7: error: expected ';' before 'vector'
    6 | cin>>N
      |       ^
      |       ;
    7 |   vector<int> vec(N);
      |   ~~~~~~
a.cc:9:17: error: 'vec' was not declared in this scope
    9 |   for(int i=0;i<vec.size();i++){
      |                 ^~~
a.cc:16:4: error: expected '}' at end of input
   16 |   }
      |    ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:12:19: error: no match for call to '(std::vector<int>) (int&)'
   12 |   vector<int>T=vec(i);
      |                ~~~^~~
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 sum=0;
  
  for(int i=0;i<N;i++){
  vector<int>T=vec(i);
    sort(T.begin(),T.end());
    
    
    if(T.at(i)>=vec.at(i)){
      sum++;
    }
  }
  cout<<sum<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:19: error: no match for call to '(std::vector<int>) (int&)'
   15 |   vector<int>T=vec(i);
      |                ~~~^~~
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 sum=0;
  
  for(int i=0;i<N;i++){
  vector<int>T(i)=vec(i);
    sort(T.begin(),T.end());
    
    
    if(T.at(i)>=vec.at(i)){
      sum++;
    }
  }
  cout<<sum<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:18: error: expected ',' or ';' before '=' token
   15 |   vector<int>T(i)=vec(i);
      |                  ^
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 sum=0;
  
  for(int i=0;i<N;i++){
    vector<int>S(i); 
    cin>>S.at(i);
    T=max(vec.at(i));
    
    if(vec.at(i)>=T){
      sum++;
    }
  }
  cout<<sum<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:5: error: 'T' was not declared in this scope
   17 |     T=max(vec.at(i));
      |     ^
a.cc:17:10: error: no matching function for call to 'max(__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type&)'
   17 |     T=max(vec.at(i));
      |       ~~~^~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 1 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   template argument deduction/substitution failed:
a.cc:17:10: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   17 |     T=max(vec.at(i));
      |       ~~~^~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   candidate expects 2 arguments, 1 provided
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 sum=0;
  
  for(int i=0;i<N;i++){
    vector<int>S(i); 
    cin>>S.at(i);
    max(vec.at(i));
    
    if(vec.at(i)>=max){
      sum++;
    }
  }
  cout<<sum<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:8: error: no matching function for call to 'max(__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type&)'
   17 |     max(vec.at(i));
      |     ~~~^~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 1 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   template argument deduction/substitution failed:
a.cc:17:8: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   17 |     max(vec.at(i));
      |     ~~~^~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   candidate expects 2 arguments, 1 provided
a.cc:19:17: error: invalid operands of types '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'} and '<unresolved overloaded function type>' to binary 'operator>='
   19 |     if(vec.at(i)>=max){
      |        ~~~~~~~~~^~~~~
Language: C++

#include <iostream>
using namespade std;
int main(){
  int h, m = -1, c = 0, n;
  cin >> n;
  for(int i = 0; i < n; i++){
    cin >> h;
	if(m <= h){
		c++;m=h;
    }
  }
  cout << c;
  return 0;
}

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

#include <iostream>

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |   cin >> n;
      |   ^~~
      |   std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:12:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   12 |   cout << c;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#include "bits/stdc++.h"

using namespace std;
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 = n-1; i > -1; i++) {
		for (int j = i; j > -1; j++) {
			if (a[i] < a[j])
				break;
		}
		count++
	}
	cout << count << endl;
}



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

#include <stdio.h>
int main(void){
    // 自分の得意な言語で
    // Let's チャレンジ！！
    int n;
    scanf("%d",&n);
  	int data[20];
  	for(int i = 0; i< n;i++){
      scanf("%d",&data[i]);
    }
  
    int num = 1;
  	for(int i = 1;i < n;i++){
      	for(int j = i-1;j >= 0;j--){
          	if(data[i] > data[j]){
              break;
            }
          	if(j==0){
              num++;
          	}
        }
    printf("%d",num);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:24:1: error: expected declaration or statement at end of input
   24 | }
      | ^
Language: C

n=int(input())
l=list(map(int,input().split()))
x=0
ans=0
for i in range(n):
    if l[i]>=x:
        ans+=1
        x=l[i]
print(ans)

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | n=int(input())
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'n' [-Wimplicit-int]
main.c:1:3: error: expected expression before 'int'
    1 | n=int(input())
      |   ^~~
Language: C++

#include <bits/stdc++.h>
#define pb push_back
#define IOS                                                                    \
  ios_base::sync_with_stdio(false);                                            \
  cin.tie(0);                                                                  \
  cout.tie(0)
#define ll long long int
#define ld long double
#define el '\n'
#define PI (ld)3.14159265358979323846
#define inf (ll)1000000000
#define mod (ll)1000000007
#define mod1 (ll)998244353
#define fo(i, n) for (long long i = 0; i < int(n); i++)
#define pll pair<ll, ll>
#define ff first
#define ss second
#define pqueue priority_queue< int >
#define pdqueue priority_queue< int,vi ,greater< int > >
//mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
#define sz(a) a.size()
#define f(i,a,b) for(ll i=a;i<b;i++)
#define fd(i,a,b) for(ll i=a;i>=b;i--)
#define all(a) a.begin(),a.end()
#define vl vector<ll>
//#define x ff
//#define y ss
#define pt(a) for(auto it:a)cout<<it<<" ";cout<<endl;
unsigned seed = std::chrono::system_clock::now().time_since_epoch().count();
using namespace std;

double gcd(double a, double b) { return a < 0.01 ? b : gcd(fmod(b, a), a); }

/*vector<int> parent, rak;

int find_set(int v) {
    if (v == parent[v])
        return v;
    return parent[v] = find_set(parent[v]);
}

void union_sets(int a, int b) {
    a = find_set(a);
    b = find_set(b);
    if (a != b) {
        if (rak[a] < rak[b])
            swap(a, b);
        parent[b] = a;
        rank[a]+=rank[b];
    }
}*/

long long bpow(long long a, long long b, long long m) {
  a %= m;
  long long res = 1;
  while (b > 0) {
    if (b & 1)
      res = res * a % m;
      a = a * a % m;
      b >>= 1;
  }
  return res;
}
ll extend_gcd(ll a,ll b,ll &x,ll &y){
    if(b==0){
        x=1;
        y=0;
        return a;
    }
    ll x1,y1;
    ll ans =extend_gcd(b,a%b,x1,y1);
    x=y1;
    y=x1-(a/b)*y1;

    return ans;
}
ll inverse(ll a,ll m){
    ll x,y;
    extend_gcd(m,a,x,y);
    y%=m;
    y+=m;
    y%=m;
    return y;
}

/*const int N = 1000001;
int lp[N+1];
vector<int> pr;
void s(){
for (int i=2; i<=N; ++i) {
        if (lp[i] == 0) {
            lp[i] = i;
            pr.push_back (i);
        }
        for (int j=0; j<(int)pr.size() && pr[j]<=lp[i] && i*pr[j]<=N; ++j)
            lp[i * pr[j]] = pr[j];
    }
}*/


ll kv;
ll t,n,x,y,h,k,z,p,q,w;

//vector<vector<ll>>v;
//vector<ll>vis,d;

int main() {
    IOS;
    cin>>;
    ll a[n];p=-inf;
    fo(i,n){
        cin>>a[i];
        if(a[i]>=p)kv++;
        p=max(p,a[i]);
    }
    cout<<kv;
    return 0;
}

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:3: error: 'sum' was not declared in this scope
   11 |   sum=0;
      |   ^~~
a.cc:12:7: error: overloaded function with no contextual type information
   12 |   max=0;
      |       ^
a.cc:14:11: error: invalid operands of types '<unresolved overloaded function type>' and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'} to binary 'operator<='
   14 |     if(max<=h[i])sum+=1;
a.cc:15:15: error: call to non-'constexpr' function 'std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](size_type) [with _Tp = int; _Alloc = std::allocator<int>; reference = int&; size_type = long unsigned int]'
   15 |     if(max<h[i])max=h[i];
      |               ^
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,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h:1128:7: note: 'std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](size_type) [with _Tp = int; _Alloc = std::allocator<int>; reference = int&; size_type = long unsigned int]' declared here
 1128 |       operator[](size_type __n) _GLIBCXX_NOEXCEPT
      |       ^~~~~~~~
a.cc:15:8: error: parse error in template argument list
   15 |     if(max<h[i])max=h[i];
      |        ^~~~~~~~
a.cc:15:16: error: cannot resolve overloaded function 'max' based on conversion to type 'bool'
   15 |     if(max<h[i])max=h[i];
      |                ^
a.cc:15:24: error: overloaded function with no contextual type information
   15 |     if(max<h[i])max=h[i];
      |                        ^
Language: C

#include <stdio.h>
int max ( int , int )

int main() {
    int N,i,count=0,M=0;
    int H[N];
    scanf("%d",&N);
    for(i=0;i<N;i++){
        scanf("%d",&H[i]);
    }

    for(i=1;i<N;i++){
        M=max(M,H[i-1]);
        if(H[i]>=M){
            count++;
        }
    }

    printf("%d",count);
    return 0;
}

int max(int a,int b) {
    int M;
    if(a>b) {
        M=a;
    }else{
        M=b;
    }
    return M;
}


Compiler output:
main.c: In function 'max':
main.c:4:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
    4 | int main() {
      |            ^
main.c:23:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
   23 | int max(int a,int b) {
      |                      ^
main.c:32: error: expected '{' at end of input
Language: C

#include <stdio.h>
int max(int,int)

int main() {
    int N,i,count=0,M=0;
    int H[N];
    scanf("%d",&N);
    for(i=0;i<N;i++){
        scanf("%d",&H[i]);
    }

    for(i=1;i<N;i++){
        M=max(M,H[i-1]);
        if(H[i]>=M){
            count++;
        }
    }

    printf("%d",count);
    return 0;
}

int max(int a,int b) {
    int M;
    if(a>b) {
        M=a;
    }else{
        M=b;
    }
    return M;
}


Compiler output:
main.c: In function 'max':
main.c:4:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
    4 | int main() {
      |            ^
main.c:23:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
   23 | int max(int a,int b) {
      |                      ^
main.c:32: error: expected '{' at end of input
Language: C

#include <stdio.h>
int max(int,int)
int main(){
    int N,i,count=0,M=0;
    int H[N];
    scanf("%d",&N);
    for(i=0;i<N;i++){
        scanf("%d",&H[i]);
    }

    for(i=1;i<N;i++){
        M=max(M,H[i-1]);
        if(H[i]>=M){
            count++;
        }
    }

    printf("%d",count);
    return 0;
}

int max(int a,int b) {
    int M;
    if(a>b) {
        M=a;
    }else{
        M=b;
    }
    return M;
}


Compiler output:
main.c: In function 'max':
main.c:3:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
    3 | int main(){
      |           ^
main.c:22:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
   22 | int max(int a,int b) {
      |                      ^
main.c:31: error: expected '{' at end of input
Language: C

#include <stdio.h>
int max(int,int)
int main(){
    int N,i,count=0,M=0;
    int H[N];
    scanf("%d",&N);
    for(i=0;i<N;i++){
        scanf("%d",&H[i]);
    }

    for(i=1;i<N;i++){
        M=max(M,H[i-1]);
        if(H[i]>=M){
            count++;
        }
    }

    printf("%d",count);
    return 0;
}

int max(int a,int b){
    int M;
    if(a>b){
        M=a;
    }else{
        M=b;
    }
    return M;
}


Compiler output:
main.c: In function 'max':
main.c:3:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
    3 | int main(){
      |           ^
main.c:22:21: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
   22 | int max(int a,int b){
      |                     ^
main.c:31: error: expected '{' at end of input