molecules.cpp: In function 'std::vector<int> find_subset(int, int, std::vector<int>)':
molecules.cpp:18:38: error: no matching function for call to 'std::deque<int>::push_back(__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> > >::value_type&)'
sum+=w[i],sub.push_back(wp[i]);
^
In file included from /usr/include/c++/7/deque:64:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:68,
from molecules.cpp:2:
/usr/include/c++/7/bits/stl_deque.h:1542:7: note: candidate: void std::deque<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = int; _Alloc = std::allocator<int>; std::deque<_Tp, _Alloc>::value_type = int]
push_back(const value_type& __x)
^~~~~~~~~
/usr/include/c++/7/bits/stl_deque.h:1542:7: note: no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> > >::value_type {aka std::pair<int, int>}' to 'const value_type& {aka const int&}'
/usr/include/c++/7/bits/stl_deque.h:1557:7: note: candidate: void std::deque<_Tp, _Alloc>::push_back(std::deque<_Tp, _Alloc>::value_type&&) [with _Tp = int; _Alloc = std::allocator<int>; std::deque<_Tp, _Alloc>::value_type = int]
push_back(value_type&& __x)
^~~~~~~~~
/usr/include/c++/7/bits/stl_deque.h:1557:7: note: no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> > >::value_type {aka std::pair<int, int>}' to 'std::deque<int>::value_type&& {aka int&&}'
molecules.cpp:23:39: error: 'class std::deque<int>' has no member named 'second'; did you mean 'end'?
for(auto i:sub) ans.push_back(sub.second);
^~~~~~
end
molecules.cpp:23:14: warning: unused variable 'i' [-Wunused-variable]
for(auto i:sub) ans.push_back(sub.second);
^