robots.cpp: In function 'int putaway(int, int, int, int*, int*, int*, int*)':
robots.cpp:16:26: error: no matching function for call to 'std::vector<std::tuple<int, int, int> >::emplace(int&, int&, int&)'
16 | by_weight.emplace(W[i], S[i], i);
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/vector:67,
from /usr/include/c++/11/functional:62,
from /usr/include/c++/11/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/11/algorithm:74,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:65,
from robots.cpp:2:
/usr/include/c++/11/bits/stl_vector.h:1248:9: note: candidate: 'template<class ... _Args> std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::emplace(std::vector<_Tp, _Alloc>::const_iterator, _Args&& ...) [with _Args = {_Args ...}; _Tp = std::tuple<int, int, int>; _Alloc = std::allocator<std::tuple<int, int, int> >]'
1248 | emplace(const_iterator __position, _Args&&... __args)
| ^~~~~~~
/usr/include/c++/11/bits/stl_vector.h:1248:9: note: template argument deduction/substitution failed:
robots.cpp:16:30: note: cannot convert '*(W + ((sizetype)(((long unsigned int)i) * 4)))' (type 'int') to type 'std::vector<std::tuple<int, int, int> >::const_iterator'
16 | by_weight.emplace(W[i], S[i], i);
| ~~~^
robots.cpp: In lambda function:
robots.cpp:41:32: error: 'idx' was not declared in this scope
41 | by_size.emplace(-S[idx]);
| ^~~