Problem wallabyhop
User foodaholic
Submission Time 2024-11-23 22:08:32
Score 0
Max Time N/A
Max Memory N/A

Compile Error

wallabyhop.cpp: In function ‘int main()’:
wallabyhop.cpp:35:27: error: invalid initialization of reference of type ‘std::vector<int>&’ from expression of type ‘std::vector<long long int>’
35 | cout << maxHops(N, M, heights);
| ^~~~~~~
wallabyhop.cpp:7:40: note: in passing argument 3 of ‘int maxHops(int, int, std::vector<int>&)’
7 | int maxHops(int N, int M, vector<int>& heights) {
| ~~~~~~~~~~~~~^~~~~~~