molecules.cpp: In function 'std::vector<int> find_subset(int, int, std::vector<int>)':
molecules.cpp:7:11: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
7 | for(;r<w.size();r++)v.push_back({w[r],r});
| ~^~~~~~~~~
molecules.cpp:9:14: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
9 | for(r=0;r<w.size();r++){
| ~^~~~~~~~~
molecules.cpp:11:28: error: 'j' was not declared in this scope
11 | while(sum>r)sum-=v[j++].first;
| ^