molecules.cpp: In function 'std::vector<int> find_subset(int, int, std::vector<int>)':
molecules.cpp:12:5: error: 'vector' was not declared in this scope
12 | vector<pair<int, int>> ww;
| ^~~~~~
molecules.cpp:12:5: note: suggested alternatives:
In file included from /usr/include/c++/10/vector:67,
from molecules.h:3,
from molecules.cpp:1:
/usr/include/c++/10/bits/stl_vector.h:389:11: note: 'std::vector'
389 | class vector : protected _Vector_base<_Tp, _Alloc>
| ^~~~~~
In file included from molecules.h:3,
from molecules.cpp:1:
/usr/include/c++/10/vector:86:13: note: 'std::pmr::vector'
86 | using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
| ^~~~~~
molecules.cpp:12:12: error: 'pair' was not declared in this scope; did you mean 'std::pair'?
12 | vector<pair<int, int>> ww;
| ^~~~
| std::pair
In file included from /usr/include/c++/10/bits/stl_algobase.h:64,
from /usr/include/c++/10/vector:60,
from molecules.h:3,
from molecules.cpp:1:
/usr/include/c++/10/bits/stl_pair.h:211:12: note: 'std::pair' declared here
211 | struct pair
| ^~~~
molecules.cpp:12:17: error: expected primary-expression before 'int'
12 | vector<pair<int, int>> ww;
| ^~~
molecules.cpp:13:5: error: 'll' was not declared in this scope; did you mean 'l'?
13 | ll sum = 0;
| ^~
| l
molecules.cpp:14:25: error: 'n' was not declared in this scope
14 | for (int i = 0; i < n; i++)
| ^
molecules.cpp:16:9: error: 'sum' was not declared in this scope
16 | sum += w[i];
| ^~~
molecules.cpp:17:9: error: 'ww' was not declared in this scope; did you mean 'w'?
17 | ww.push_back(make_pair(w[i], i));
| ^~
| w
molecules.cpp:17:22: error: 'make_pair' was not declared in this scope; did you mean 'std::make_pair'?
17 | ww.push_back(make_pair(w[i], i));
| ^~~~~~~~~
| std::make_pair
In file included from /usr/include/c++/10/bits/stl_algobase.h:64,
from /usr/include/c++/10/vector:60,
from molecules.h:3,
from molecules.cpp:1:
/usr/include/c++/10/bits/stl_pair.h:567:5: note: 'std::make_pair' declared here
567 | make_pair(_T1&& __x, _T2&& __y)
| ^~~~~~~~~
molecules.cpp:19:10: error: 'ww' was not declared in this scope; did you mean 'w'?
19 | sort(ww.begin(), ww.end());
| ^~
| w
molecules.cpp:19:5: error: 'sort' was not declared in this scope; did you mean 'short'?
19 | sort(ww.begin(), ww.end());
| ^~~~
| short
molecules.cpp:20:12: error: expected primary-expression before 'int'
20 | vector<int> id;
| ^~~
molecules.cpp:21:18: error: 'n' was not declared in this scope
21 | for (int i = n - 1, j = n; i < j && i >= -1;)
| ^
molecules.cpp:21:36: error: 'j' was not declared in this scope
21 | for (int i = n - 1, j = n; i < j && i >= -1;)
| ^
molecules.cpp:23:16: error: 'sum' was not declared in this scope
23 | while (sum > u && i >= 0)
| ^~~
molecules.cpp:28:18: error: 'sum' was not declared in this scope
28 | if (l <= sum && sum <= u)
| ^~~
molecules.cpp:31:17: error: 'id' was not declared in this scope; did you mean 'i'?
31 | id.push_back(ww[p].second);
| ^~
| i
molecules.cpp:33:17: error: 'id' was not declared in this scope; did you mean 'i'?
33 | id.push_back(ww[p].second);
| ^~
| i
molecules.cpp:34:20: error: 'id' was not declared in this scope; did you mean 'i'?
34 | return id;
| ^~
| i
molecules.cpp:37:9: error: 'sum' was not declared in this scope
37 | sum += ww[j].first;
| ^~~
molecules.cpp:39:19: error: expected primary-expression before 'int'
39 | return vector<int>();
| ^~~
molecules.cpp:39:19: error: expected ';' before 'int'
39 | return vector<int>();
| ^~~
| ;
molecules.cpp:39:22: error: expected unqualified-id before '>' token
39 | return vector<int>();
| ^