molecules.cpp:6:39: error: 'vi' has not been declared
6 | vector<int> find_subset(int l, int u, vi w) {
| ^~
molecules.cpp: In function 'std::vector<int> find_subset(int, int, int)':
molecules.cpp:8:25: error: request for member 'size' in 'w', which is of non-class type 'int'
8 | for (int i = 0; i < w.size(); ++i) {
| ^~~~
molecules.cpp:9:19: error: invalid types 'int[int]' for array subscript
9 | v.push_back({w[i], i});
| ^
molecules.cpp:9:16: error: no matching function for call to 'std::vector<std::pair<int, int> >::push_back(<brace-enclosed initializer list>)'
9 | v.push_back({w[i], i});
| ~~~~~~~~~~~^~~~~~~~~~~
In file included from /usr/include/c++/13/vector:66,
from molecules.h:3,
from molecules.cpp:1:
/usr/include/c++/13/bits/stl_vector.h:1281:7: note: candidate: 'constexpr void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = std::pair<int, int>; _Alloc = std::allocator<std::pair<int, int> >; value_type = std::pair<int, int>]'
1281 | push_back(const value_type& __x)
| ^~~~~~~~~
/usr/include/c++/13/bits/stl_vector.h:1281:35: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const std::vector<std::pair<int, int> >::value_type&' {aka 'const std::pair<int, int>&'}
1281 | push_back(const value_type& __x)
| ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/13/bits/stl_vector.h:1298:7: note: candidate: 'constexpr void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = std::pair<int, int>; _Alloc = std::allocator<std::pair<int, int> >; value_type = std::pair<int, int>]'
1298 | push_back(value_type&& __x)
| ^~~~~~~~~
/usr/include/c++/13/bits/stl_vector.h:1298:30: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::vector<std::pair<int, int> >::value_type&&' {aka 'std::pair<int, int>&&'}
1298 | push_back(value_type&& __x)
| ~~~~~~~~~~~~~^~~
molecules.cpp:12:30: error: invalid types 'int[int]' for array subscript
12 | int lp = 0, rp = 0, cur = w[0];
| ^
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
| ^~~~