Problem deforestation
User kahchun
Submission Time 2023-11-27 16:51:10
Score 0
Max Time N/A
Max Memory N/A

Compile Error

deforestation.cpp: In function ‘int main()’:
deforestation.cpp:33:6: error: invalid types ‘long long int[long long int]’ for array subscript
33 | A[i] = mp(A, B);
| ^
deforestation.cpp:40:23: error: cannot convert ‘std::pair<long long int, long long int>*’ to ‘long long int*’
40 | int maxTdy = getMax(A, N);
| ^
| |
| std::pair<long long int, long long int>*
deforestation.cpp:12:16: note: initializing argument 1 of ‘long long int getMax(long long int*, long long int)’
12 | int getMax(int A[], int N){
| ^
deforestation.cpp:42:27: error: no matching function for call to ‘max(long long int&, std::pair<long long int, long long int>&)’
42 | ans = max(ans, A[maxTdy]);
| ^
In file included from /usr/include/c++/9/bits/specfun.h:45,
from /usr/inclu