Problem mountains
User samvar0907
Submission Time 2024-11-08 16:34:06
Score 0
Max Time N/A
Max Memory N/A

Compile Error

mountains.cpp: In function ‘int main()’:
mountains.cpp:12:9: error: ‘vector’ was not declared in this scope
12 | vector<int> heights(n);
| ^~~~~~
mountains.cpp:2:1: note: ‘std::vector’ is defined in header ‘<vector>’; did you forget to ‘#include <vector>’?
1 | #include <iostream>
+++ |+#include <vector>
2 | using namespace std;
mountains.cpp:12:16: error: expected primary-expression before ‘int’
12 | vector<int> heights(n);
| ^~~
mountains.cpp:14:20: error: ‘heights’ was not declared in this scope
14 | cin >> heights[i];
| ^~~~~~~
mountains.cpp:17:16: error: expected primary-expression before ‘int’
17 | vector<int> left_count(n, 0), right_count(n, 0);
| ^~~
mountains.cpp:21:21: error: ‘heights’ was not declared in this scope
21 |