Language: C++

#include <algorithm>
#include <bitset>
#include <tuple>
#include <cstdint>
#include <cstdio>
#include <cctype>
#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
#include <cassert>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <limits>
#include <map>
#include <memory>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
using namespace std;
//#define int long long  ←保留
#define _CRT_SECURE_NO_WARNINGS
#define rep(i, n) for (int i = 0; i < n; i++)
#define _GLIBCXX_DEBUG
const int MOD = 1e9 + 7;
const int INF = 1e18 + 9;
constexpr long double pi = 3.141592653589793238462643383279; //円周率
/*---------------------便利な関数--------------------------------------*/
int fact(int i) {       //階乗
    if (i == 0) return 1;
    return (fact(i - 1)) * i;
}

int gcd(int a, int b) {        //最大公約数
    if (b == 0) return a;
    return gcd(b, a % b);
}

int lcm(int a, int b) {      //最小公倍数
    return a * b / gcd(a, b);
}

int keta(int n) {        //桁数を求める
    if (n == 0) return 1;
    int count = 0;
    while (n != 0) {
        n /= 10;
        count++;
    }
    return count;
}

int ketasum(int n) {    //各桁の和
    int sum = 0;
    while (n != 0) {
        sum += n % 10;
        n /= 10;
    }
    return sum;
}
/*-------------ここまで---------------------------------------------*/

//C++(GCC9.2.1)

/*signed*/int main() {
    int N; cin >> N;
    vector <int> H (N);
    for (int i = 0; i < N; ++i) {
        cin >> H[i];
    }
    int ans = 0;
    for (int i = 0; i < N; ++i) {
        bool flag = true;
        for (int j = 0; j < i; ++j) {
            if (H[j] > H[i]) {
                flag = false;
                break;
            }
        }
        if (flag) {
            ++ans;
        }
    }
    cout << ans << endl;
    return 0;
}#include <algorithm>
#include <bitset>
#include <tuple>
#include <cstdint>
#include <cstdio>
#include <cctype>
#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
#include <cassert>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <limits>
#include <map>
#include <memory>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
using namespace std;
//#define int long long  ←保留
#define _CRT_SECURE_NO_WARNINGS
#define rep(i, n) for (int i = 0; i < n; i++)
#define _GLIBCXX_DEBUG
const int MOD = 1e9 + 7;
const int INF = 1e18 + 9;
constexpr long double pi = 3.141592653589793238462643383279; //円周率
/*---------------------便利な関数--------------------------------------*/
int fact(int i) {       //階乗
    if (i == 0) return 1;
    return (fact(i - 1)) * i;
}

int gcd(int a, int b) {        //最大公約数
    if (b == 0) return a;
    return gcd(b, a % b);
}

int lcm(int a, int b) {      //最小公倍数
    return a * b / gcd(a, b);
}

int keta(int n) {        //桁数を求める
    if (n == 0) return 1;
    int count = 0;
    while (n != 0) {
        n /= 10;
        count++;
    }
    return count;
}

int ketasum(int n) {    //各桁の和
    int sum = 0;
    while (n != 0) {
        sum += n % 10;
        n /= 10;
    }
    return sum;
}
/*-------------ここまで---------------------------------------------*/

//C++(GCC9.2.1)

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

Compiler output:
a.cc:101:2: error: stray '#' in program
  101 | }#include <algorithm>
      |  ^
a.cc:41:22: warning: overflow in conversion from 'double' to 'int' changes value from '1.0e+18' to '2147483647' [-Woverflow]
   41 | const int INF = 1e18 + 9;
      |                 ~~~~~^~~
a.cc:101:3: error: 'include' does not name a type
  101 | }#include <algorithm>
      |   ^~~~~~~
a.cc:140:11: error: redefinition of 'const int MOD'
  140 | const int MOD = 1e9 + 7;
      |           ^~~
a.cc:40:11: note: 'const int MOD' previously defined here
   40 | const int MOD = 1e9 + 7;
      |           ^~~
a.cc:141:11: error: redefinition of 'const int INF'
  141 | const int INF = 1e18 + 9;
      |           ^~~
a.cc:41:11: note: 'const int INF' previously defined here
   41 | const int INF = 1e18 + 9;
      |           ^~~
a.cc:142:23: error: redefinition of 'constexpr const long double pi'
  142 | constexpr long double pi = 3.141592653589793238462643383279; //円周率
      |                       ^~
a.cc:42:23: note: 'constexpr const long double pi' previously defined here
   42 | constexpr long double pi = 3.141592653589793238462643383279; //円周率
      |                       ^~
a.cc:144:5: error: redefinition of 'int fact(int)'
  144 | int fact(int i) {       //階乗
      |     ^~~~
a.cc:44:5: note: 'int fact(int)' previously defined here
   44 | int fact(int i) {       //階乗
      |     ^~~~
a.cc:149:5: error: redefinition of 'int gcd(int, int)'
  149 | int gcd(int a, int b) {        //最大公約数
      |     ^~~
a.cc:49:5: note: 'int gcd(int, int)' previously defined here
   49 | int gcd(int a, int b) {        //最大公約数
      |     ^~~
a.cc:154:5: error: redefinition of 'int lcm(int, int)'
  154 | int lcm(int a, int b) {      //最小公倍数
      |     ^~~
a.cc:54:5: note: 'int lcm(int, int)' previously defined here
   54 | int lcm(int a, int b) {      //最小公倍数
      |     ^~~
a.cc:158:5: error: redefinition of 'int keta(int)'
  158 | int keta(int n) {        //桁数を求める
      |     ^~~~
a.cc:58:5: note: 'int keta(int)' previously defined here
   58 | int keta(int n) {        //桁数を求める
      |     ^~~~
a.cc:168:5: error: redefinition of 'int ketasum(int)'
  168 | int ketasum(int n) {    //各桁の和
      |     ^~~~~~~
a.cc:68:5: note: 'int ketasum(int)' previously defined here
   68 | int ketasum(int n) {    //各桁の和
      |     ^~~~~~~
a.cc:180:15: error: redefinition of 'int main()'
  180 | /*signed*/int main() {
      |               ^~~~
a.cc:80:15: note: 'int main()' previously defined here
   80 | /*signed*/int main() {
      |               ^~~~