fish.cpp: In function 'int64_t max_weights(int64_t, int64_t, std::vector<long int>, std::vector<long int>, std::vector<long int>)':
fish.cpp:19:36: error: no match for 'operator=' (operand types are 'std::array<std::vector<long int>, 2>' and 'std::vector<long int>')
19 | p = vector<int>(n+1);
| ^
In file included from /usr/include/c++/10/tuple:39,
from /usr/include/c++/10/functional:54,
from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/10/algorithm:74,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from fish.cpp:1:
/usr/include/c++/10/array:94:12: note: candidate: 'std::array<std::vector<long int>, 2>& std::array<std::vector<long int>, 2>::operator=(const std::array<std::vector<long int>, 2>&)'
94 | struct array
| ^~~~~
/usr/include/c++/10/array:94:12: note: no known conversion for argument 1 from 'std::vector<long int>' to 'const std::array<std::vector<long int>, 2>&'
/usr/include/c++/10/array:94:12: note: candidate: 'std::array<std::vector<long int>, 2>& std::array<std::vector<long int>, 2>::operator=(std::array<std::vector<long int>, 2>&&)'
/usr/include/c++/10/array:94:12: note: no known conversion for argument 1 from 'std::vector<long int>' to 'std::array<std::vector<long int>, 2>&&'
fish.cpp:24:35: warning: comparison of integer expressions of different signedness: 'int64_t' {aka 'long int'} and 'std::vector<std::array<long int, 2> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
24 | if (_next < t[i].size() && j > t[i][_next][0]) p[j] += t[i][_next++][1];
| ~~~~~~^~~~~~~~~~~~~
fish.cpp:24:77: error: no match for 'operator+=' (operand types are 'std::array<std::vector<long int>, 2>::value_type' {aka 'std::vector<long int>'} and 'std::array<long int, 2>::value_type' {aka 'long int'})
24 | if (_next < t[i].size() && j > t[i][_next][0]) p[j] += t[i][_next++][1];