Problem feast
User Schzeey
Submission Time 2023-03-11 20:49:09
Score 0
Max Time N/A
Max Memory N/A

Compile Error

feast.cpp: In function ‘int main()’:
feast.cpp:99:99: error: no match for ‘operator-’ (operand types are ‘ll’ {aka ‘long long int’} and ‘__gnu_cxx::__alloc_traits<std::allocator<std::pair<long long int, long long int> >, std::pair<long long int, long long int> >::value_type’ {aka ‘std::pair<long long int, long long int>’})
99 | ll current_max = max(query(i, ri-1, pref_arr)+query(lf+1, i, pref_arr)-f_arr[i]+min(f_arr[i-1], f_arr[i+1]), max(query(i, ri-1, pref_arr), query(lf+1, i, pref_arr)));
In file included from /usr/include/c++/9/bits/stl_algobase.h:67,
from /usr/include/c++/9/bits/specfun.h:45,
from /usr/include/c++/9/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:41,
from feast.cpp:1:
/usr/include/c++/9/bits/stl_iterator.h:415:5: note: candidate: ‘template<class _IteratorL, class _IteratorR> constexpr decl