Problem supertrees
User Potato3218
Submission Time 2023-02-05 18:53:22
Score 0
Max Time N/A
Max Memory N/A

Compile Error

supertrees.cpp: In function ‘int construct(std::vector<std::vector<int> >)’:
supertrees.cpp:66:59: error: no match for ‘operator=’ (operand types are ‘__gnu_cxx::__alloc_traits<std::allocator<std::vector<int> >, std::vector<int> >::value_type’ {aka ‘std::vector<int>’} and ‘int’)
66 | if(mxno == 2) answer[val[n-1]] = answer[val[0]] = 1;
| ^
In file included from /usr/include/c++/9/vector:72,
from supertrees.h:1,
from supertrees.cpp:1:
/usr/include/c++/9/bits/vector.tcc:198:5: note: candidate: ‘std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = int; _Alloc = std::allocator<int>]’
198 | vector<_Tp, _Alloc>::
| ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/9/bits/vector.tcc:199:42: note: no known conversion for argumen