molecules.cpp: In function 'std::vector<int> find_subset(int, int, std::vector<int>)':
molecules.cpp:24:24: error: request for member 'first' in 'w.std::vector<int>::operator[](((std::vector<int>::size_type)right))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
24 | sum+= w[right].first;
| ^~~~~
molecules.cpp:26:26: error: request for member 'first' in 'w.std::vector<int>::operator[](((std::vector<int>::size_type)left))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
26 | sum-=w[left].first;
| ^~~~~
molecules.cpp:34:37: error: request for member 'second' 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>, int>::value_type' {aka 'int'}
34 | ans.push_back({w[i].second});
| ^~~~~~
molecules.cpp:34:30: error: no matching function for call to 'std::vector<int>::push_back(<brace-enclosed initializer list>)'
34 | ans.push_back({w[i].second});
| ~~~~~~~~~~~~~^~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/vector:67,
from molecules.h:3,
from molecules.cpp:1:
/usr/include/c++/11/bits/stl_vector.h:1187:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::value_type = int]'
1187 | push_back(const value_type& __x)
| ^~~~~~~~~
/usr/include/c++/11/bits/stl_vector.h:1187:35: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const value_type&' {aka 'const int&'}
1187 | push_back(const value_type& __x)
| ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/11/bits/stl_vector.h:1203:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(std::vector<_Tp, _Alloc>::value_type&&) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::value_type = int]'
1203 | push_back(value_type&& __x)
| ^~~~~~~~~
/usr/include/c++/11/bits/stl_vector.h:1203:30: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::vector<int>::value_type&&' {aka 'int&&'}
1203 | push_back(value_type&& __x)
| ~~~~~~~~~~~~~^~~
molecules.h:1:9: warning: #pragma once in main file
1 | #pragma once
| ^~~~
molecules_c.h:1:9: warning: #pragma once in main file
1 | #pragma once
| ^~~~