Problem peakfinding
User Aryan
Submission Time 2023-08-18 15:21:38
Score 0
Max Time N/A
Max Memory N/A

Compile Error

peakfinding.cpp: In function ‘int findTallestMountain(const std::vector<int>&)’:
peakfinding.cpp:6:30: error: cannot convert ‘__gnu_cxx::__normal_iterator<const int*, std::vector<int> >’ to ‘int’ in initialization
6 | int tallest = max_element(heights.begin(), heights.end());
| ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| __gnu_cxx::__normal_iterator<const int*, std::vector<int> >