Problem feast
User Rolo
Submission Time 2024-04-11 22:47:15
Score 0
Max Time N/A
Max Memory N/A

Compile Error

feast.cpp: In function ‘int main()’:
feast.cpp:29:12: error: conflicting declaration ‘long long int a’
29 | long long a = 0;
| ^
feast.cpp:9:20: note: previous declaration as ‘std::vector<long long int> a’
9 | vector<long long> a(n+1,0);
| ^
feast.cpp:32:17: error: no matching function for call to ‘min(std::vector<long long int>&, __gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type&)’
32 | a = min(a,a[i])
| ^
In file included 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_algobase.h:198:5: note: candidate: ‘template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)’
198 | min(const _Tp& __a, c