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

Compile Error

mountains.cpp:4:33: error: ‘vector’ does not name a type
4 | int count_triplets(int n, const vector<int>& heights) {
| ^~~~~~
mountains.cpp:4:39: error: expected ‘,’ or ‘...’ before ‘<’ token
4 | int count_triplets(int n, const vector<int>& heights) {
| ^
mountains.cpp: In function ‘int count_triplets(int, int)’:
mountains.cpp:5:5: error: ‘vector’ was not declared in this scope
5 | vector<int> left_freq(100, 0), right_freq(100, 0);
| ^~~~~~
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:5:12: error: expected primary-expression before ‘int’
5 | vector<int> left_freq(100, 0), right_freq(100, 0);
| ^~~<