molecules.cpp: In function 'std::vector<int> find_subset(int, int, std::vector<int>)':
molecules.cpp:4:5: error: 'vector' was not declared in this scope
4 | vector<int> res;
| ^~~~~~
molecules.cpp:4:5: note: suggested alternatives:
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:428:11: note: 'std::vector'
428 | class vector : protected _Vector_base<_Tp, _Alloc>
| ^~~~~~
/usr/include/c++/13/vector:86:13: note: 'std::pmr::vector'
86 | using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
| ^~~~~~
molecules.cpp:4:12: error: expected primary-expression before 'int'
4 | vector<int> res;
| ^~~
molecules.cpp:5:12: error: 'pair' was not declared in this scope; did you mean 'std::pair'?
5 | vector<pair<int, int>> a;
| ^~~~
| std::pair
In file included from /usr/include/c++/13/bits/stl_algobase.h:64,
from /usr/include/c++/13/vector:62:
/usr/include/c++/13/bits/stl_pair.h:187:12: note: 'std::pair' declared here
187 | struct pair
| ^~~~
molecules.cpp:5:17: error: expected primary-expression before 'int'
5 | vector<pair<int, int>> a;
| ^~~
molecules.cpp:7:32: error: 'a' was not declared in this scope
7 | for(int i = 0; i < n; ++i) a.emplace_back(w[i], i);
| ^
molecules.cpp:9:10: error: 'a' was not declared in this scope
9 | sort(a.begin(), a.end());
| ^
molecules.cpp:9:5: error: 'sort' was not declared in this scope; did you mean 'short'?
9 | sort(a.begin(), a.end());
| ^~~~
| short
molecules.cpp:19:17: error: 'res' was not declared in this scope
19 | res.push_back(a[k].second);
| ^~~
molecules.cpp:25:12: error: 'res' was not declared in this scope
25 | return res;
| ^~~