molecules.cpp: In function 'std::vector<int> find_subset(int, int, std::vector<int>)':
molecules.cpp:9:16: error: 'mp' was not declared in this scope
v[i] = mp(w[i] , i);
^~
molecules.cpp:15:43: error: 'j' was not declared in this scope
for(int i = 0 ; i < (int)w.size() ; ++j){
^
molecules.cpp:16:49: error: request for member 'first' in 'w.std::vector<int>::operator[](((std::vector<int>::size_type)jj))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int> >::value_type {aka int}'
while(jj < (int)w.size() && sum + w[jj].first <= u)sum += w[jj++].first;
^~~~~
molecules.cpp:16:75: error: request for member 'first' in 'w.std::vector<int>::operator[](((std::vector<int>::size_type)(jj ++)))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int> >::value_type {aka int}'
while(jj < (int)w.size() && sum + w[jj].first <= u)sum += w[jj++].first;
^~~~~
molecules.cpp:18:46: error: 'class std::vector<int>' has no member named 'pb'
for(int j = i ; j < jj ; ++j)ans.pb(w[j].second);
^~
molecules.cpp:18:54: error: request for member 'second' in 'w.std::vector<int>::operator[](((std::vector<int>::size_type)j))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int> >::value_type {aka int}'
for(int j = i ; j < jj ; ++j)ans.pb(w[j].second);
^~~~~~
molecules.cpp:21:21: error: request for member 'first' in 'w.std::vector<int>::operator[](((std::vector<int>::size_type)i))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int> >::value_type {aka int}'
sum -= w[i].first;
^~~~~