molecules.cpp: In function 'std::vector<int> find_subset(int, int, std::vector<int>)':
molecules.cpp:13:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for( int i = 0 ; i < w.size() ; i++ ) v.emplace_back( pii( w[i], i ) );
~~^~~~~~~~~~
molecules.cpp:15:9: error: declaration of 'int l' shadows a parameter
int l = 0, r = 0;
^
molecules.cpp:17:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
while( l < w.size() ) {
~~^~~~~~~~~~
molecules.cpp:18:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
while( r < w.size() && sum < l ) sum += ( long long ) v[r++].x;
~~^~~~~~~~~~