insects.cpp:8:54: error: 'vector' has not been declared
8 | void check(int N, int d, int &always_add, int &rsBs, vector<bool> &vis) {
| ^~~~~~
insects.cpp:8:60: error: expected ',' or '...' before '<' token
8 | void check(int N, int d, int &always_add, int &rsBs, vector<bool> &vis) {
| ^
insects.cpp: In function 'void check(int, int, int&, int&, int)':
insects.cpp:14:5: error: 'vector' was not declared in this scope
14 | vector<int> poz;
| ^~~~~~
insects.cpp:14:5: note: suggested alternatives:
In file included from /usr/include/c++/10/vector:67,
from insects.cpp:2:
/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 insects.cpp:2:
/usr/include/c++/10/vector:86:13: note: 'std::pmr::vector'
86 | using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
| ^~~~~~
insects.cpp:14:12: error: expected primary-expression before 'int'
14 | vector<int> poz;
| ^~~
insects.cpp:16:13: error: 'vis' was not declared in this scope
16 | if (vis[i]) {
| ^~~
insects.cpp:24:9: error: 'poz' was not declared in this scope
24 | poz.emplace_back(i);
| ^~~
insects.cpp:27:20: error: 'poz' was not declared in this scope
27 | for (auto it : poz) {
| ^~~
insects.cpp:31:9: error: 'poz' was not declared in this scope
31 | if (poz.size() == mid * d) { /// e plin
| ^~~
insects.cpp:33:13: error: 'vis' was not declared in this scope
33 | vis[it] = true;
| ^~~
insects.cpp:38:16: error: 'min' was not declared in this scope; did you mean 'std::min'?
38 | rsBs = min(rsBs, mid);
| ^~~
| std::min
In file included from /usr/include/c++/10/vector:60,
from insects.cpp:2:
/usr/include/c++/10/bits/stl_algobase.h:278:5: note: 'std::min' declared here
278 | min(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
insects.cpp:42:17: error: 'vis' was not declared in this scope
42 | if (vis[i]) {
| ^~~
insects.cpp:49:17: error: 'vis' was not declared in this scope
49 | vis[i] = true;
| ^~~
insects.cpp: In function 'int min_cardinality(int)':
insects.cpp:58:5: error: 'vector' was not declared in this scope
58 | vector<bool> vis(N + 1);
| ^~~~~~
insects.cpp:58:5: note: suggested alternatives:
In file included from /usr/include/c++/10/vector:67,
from insects.cpp:2:
/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 insects.cpp:2:
/usr/include/c++/10/vector:86:13: note: 'std::pmr::vector'
86 | using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
| ^~~~~~
insects.cpp:58:12: error: expected primary-expression before 'bool'
58 | vector<bool> vis(N + 1);
| ^~~~
insects.cpp:63:16: error: expected primary-expression before 'int'
63 | vector<int> temp;
| ^~~
insects.cpp:70:13: error: 'temp' was not declared in this scope
70 | temp.emplace_back(i);
| ^~~~
insects.cpp:72:13: error: 'temp' was not declared in this scope
72 | d = temp.size();
| ^~~~
insects.cpp:84:39: error: 'vis' was not declared in this scope
84 | check(N, d, always_add, rsBs, vis);
| ^~~