Problem graphcraft
User 6root2i
Submission Time 2024-06-28 18:07:58
Score 0
Max Time N/A
Max Memory N/A

Compile Error

graphcraft.cpp: In function ‘int dp(std::vector<std::pair<int, int> >&, std::vector<int>&, int)’:
graphcraft.cpp:12:20: error: no matching function for call to ‘begin(std::pair<int, int>&)’
12 | for (auto p : V[C]){
| ^
In file included from /usr/include/c++/9/utility:76,
from /usr/include/c++/9/bits/stl_uninitialized.h:60,
from /usr/include/c++/9/vector:66,
from graphcraft.h:1,
from graphcraft.cpp:1:
/usr/include/c++/9/initializer_list:89:5: note: candidate: ‘template<class _Tp> constexpr const _Tp* std::begin(std::initializer_list<_Tp>)’
89 | begin(initializer_list<_Tp> __ils) noexcept
| ^~~~~
/usr/include/c++/9/initializer_list:89:5: note: template argument deduction/substitution failed:
graphcraft.cpp:12:20: note: ‘std::pair<int, int>’ is not derived from ‘std::initializer_list&l