Language: C++

#include <iostream>
using namespace std;

int main() {
  int N;
  int H[110];
  cin >> #include <iostream>
#include <algorithm>
using namespace std;

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

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


Compiler output:
a.cc:7:10: error: stray '#' in program
    7 |   cin >> #include <iostream>
      |          ^
a.cc: In function 'int main()':
a.cc:7:11: error: 'include' was not declared in this scope
    7 |   cin >> #include <iostream>
      |           ^~~~~~~
a.cc:7:28: error: expected primary-expression before '>' token
    7 |   cin >> #include <iostream>
      |                            ^
In file included from /usr/include/c++/14/bits/stl_algo.h:59,
                 from /usr/include/c++/14/algorithm:61,
                 from a.cc:8:
/usr/include/c++/14/bits/algorithmfwd.h:42:1: error: expected primary-expression before 'namespace'
   42 | namespace std _GLIBCXX_VISIBILITY(default)
      | ^~~~~~~~~
In file included from /usr/include/c++/14/bits/requires_hosted.h:31,
                 from /usr/include/c++/14/iostream:38,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_heap.h:63:15: error: expected '=' before '__attribute__'
   63 | namespace std _GLIBCXX_VISIBILITY(default)
      |               ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_heap.h:63:15: error: expected identifier before '__attribute__'
In file included from /usr/include/c++/14/bits/stl_algo.h:61:
/usr/include/c++/14/bits/stl_heap.h:63:14: error: expected ';' before '__attribute__'
   63 | namespace std _GLIBCXX_VISIBILITY(default)
      |              ^
      |              ;
/usr/include/c++/14/bits/stl_heap.h:64:1: error: expected primary-expression before '{' token
   64 | {
      | ^
/usr/include/c++/14/bits/uniform_int_dist.h:41:15: error: expected '=' before '__attribute__'
   41 | namespace std _GLIBCXX_VISIBILITY(default)
      |               ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/uniform_int_dist.h:41:15: error: expected identifier before '__attribute__'
In file included from /usr/include/c++/14/bits/stl_algo.h:65:
/usr/include/c++/14/bits/uniform_int_dist.h:41:14: error: expected ';' before '__attribute__'
   41 | namespace std _GLIBCXX_VISIBILITY(default)
      |              ^
      |              ;
/usr/include/c++/14/bits/uniform_int_dist.h:42:1: error: expected primary-expression before '{' token
   42 | {
      | ^
/usr/include/c++/14/bits/stl_tempbuf.h:65:15: error: expected '=' before '__attribute__'
   65 | namespace std _GLIBCXX_VISIBILITY(default)
      |               ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_tempbuf.h:65:15: error: expected identifier before '__attribute__'
In file included from /usr/include/c++/14/bits/stl_algo.h:69:
/usr/include/c++/14/bits/stl_tempbuf.h:65:14: error: expected ';' before '__attribute__'
   65 | namespace std _GLIBCXX_VISIBILITY(default)
      |              ^
      |              ;
/usr/include/c++/14/bits/stl_tempbuf.h:66:1: error: expected primary-expression before '{' token
   66 | {
      | ^
/usr/include/c++/14/bits/stl_algo.h:77:15: error: expected '=' before '__attribute__'
   77 | namespace std _GLIBCXX_VISIBILITY(default)
      |               ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:77:15: error: expected identifier before '__attribute__'
/usr/include/c++/14/bits/stl_algo.h:77:14: error: expected ';' before '__attribute__'
   77 | namespace std _GLIBCXX_VISIBILITY(default)
      |              ^
      |              ;
/usr/include/c++/14/bits/stl_algo.h:78:1: error: expected primary-expression before '{' token
   78 | {
      | ^
In file included from /usr/include/c++/14/pstl/glue_algorithm_defs.h:15,
                 from /usr/include/c++/14/algorithm:86:
/usr/include/c++/14/pstl/execution_defs.h:15:1: error: 'namespace' definition is not allowed here
   15 | namespace __pstl
      | ^~~~~~~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:17:1: error: 'namespace' definition is not allowed here
   17 | namespace std
      | ^~~~~~~~~
a.cc:11:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   11 | int main() {
      |         ^~
a.cc:11:9: note: remove parentheses to default-initialize a variable
   11 | int main() {
      |         ^~
      |         --
a.cc:11:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:11:12: error: a function-definition is not allowed here before '{' token
   11 | int main() {
      |            ^
a.cc:26:2: error: expected '}' at end of input
   26 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^