Problem GSS
User blob
Submission Time 2024-01-03 11:44:49
Score 0
Max Time N/A
Max Memory N/A

Compile Error

GSS.cpp: In function ‘int main()’:
GSS.cpp:15:24: error: array must be initialized with a brace-enclosed initializer
15 | int totalCost[n] = 0;
| ^
GSS.cpp:16:20: error: array must be initialized with a brace-enclosed initializer
16 | int subtrack[n] = 100000007;
| ^~~~~~~~~
GSS.cpp:21:40: error: no matching function for call to ‘min(int [n], __gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type&)’
21 | subtrack[j] = min(subtrack,prices[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 GSS.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&)’