molecules.cpp: In function 'std::vector<int> find_subset(int, int, std::vector<int>)':
molecules.cpp:19:25: error: no match for 'operator-=' (operand types are 'int' and '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> > >::value_type {aka std::pair<int, int>}')
while(sum>u) sum-=sub.front(),sub.pop_front();
~~~^~~~~~~~~~~~~
molecules.cpp:23:39: error: 'class std::deque<std::pair<int, int> >' has no member named 'second'; did you mean 'end'?
for(auto i:sub) ans.push_back(sub.second);
^~~~~~
end