Problem globalwarming
User FIips
Submission Time 2024-12-04 10:37:23
Score 0
Max Time N/A
Max Memory N/A

Compile Error

globalwarming.cpp: In function ‘int32_t main()’:
globalwarming.cpp:19:21: error: invalid conversion from ‘long long int*’ to ‘long long int’ [-fpermissive]
19 | h[i] = lower_bound(hs, hs + n, h[i]);
| ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
| |
| long long int*
globalwarming.cpp:29:11: error: 2 names provided for structured binding
29 | for(auto [hieght, indices] : m) {
| ^~~~~~~~~~~~~~~~~
globalwarming.cpp:29:11: note: while ‘std::vector<long long int>’ decomposes into 1 element
globalwarming.cpp:32:4: error: ‘cur_island’ was not declared in this scope
32 | cur_island++;
| ^~~~~~~~~~
globalwarming.cpp:37:3: error: ‘ans’ was not declared in this scope; did you mean ‘abs’?
37 | ans = max(ans, cur_islands);
| ^~~
| abs
globalwarming.cpp:37:18: error: ‘cur_islands’ was not declared in this scope
37 | ans = ma