insects.cpp: In function 'int min_cardinality(int)':
insects.cpp:3:25: error: 'memset' was not declared in this scope
3 | bool marked[N]; memset(marked,false,sizeof(marked));
| ^~~~~~
insects.cpp:1:1: note: 'memset' is defined in header '<cstring>'; did you forget to '#include <cstring>'?
+++ |+#include <cstring>
1 | int min_cardinality(int N) {
insects.cpp:4:9: error: 'set' was not declared in this scope
4 | set<int> s;
| ^~~
insects.cpp:4:13: error: expected primary-expression before 'int'
4 | set<int> s;
| ^~~
insects.cpp:5:9: error: 'vector' was not declared in this scope
5 | vector<int> to_remove;
| ^~~~~~
insects.cpp:5:16: error: expected primary-expression before 'int'
5 | vector<int> to_remove;
| ^~~
insects.cpp:7:20: error: 's' was not declared in this scope
7 | if(s.find(i)==s.end()){
| ^
insects.cpp:8:25: error: 'move_inside' was not declared in this scope
8 | move_inside(i);
| ^~~~~~~~~~~
insects.cpp:11:27: error: 'press_button' was not declared in this scope
11 | int res = press_button();
| ^~~~~~~~~~~~
insects.cpp:13:28: error: 's' was not declared in this scope
13 | if(s.find(i)!=s.end()){
| ^
insects.cpp:14:33: error: 'move_outside' was not declared in this scope
14 | move_outside(i);
| ^~~~~~~~~~~~
insects.cpp:27:17: error: 'to_remove' was not declared in this scope
27 | to_remove.clear();
| ^~~~~~~~~
insects.cpp:28:24: error: expected primary-expression before 'int'
28 | vector<int> to_mark;
| ^~~
insects.cpp:32:28: error: 's' was not declared in this scope
32 | if(s.find(i)==s.end()){
| ^
insects.cpp:33:33: error: 'move_inside' was not declared in this scope
33 | move_inside(i);
| ^~~~~~~~~~~
insects.cpp:36:43: error: 'press_button' was not declared in this scope
36 | int res = press_button();
| ^~~~~~~~~~~~
insects.cpp:39:49: error: 'move_outside' was not declared in this scope
39 | move_outside(i);
| ^~~~~~~~~~~~
insects.cpp:41:49: error: 'to_mark' was not declared in this scope
41 | to_mark.push_back(i);
| ^~~~~~~
insects.cpp:53:29: error: 'max' was not declared in this scope
53 | ans=max(ans,mid);
| ^~~
insects.cpp:58:36: error: 's' was not declared in this scope
58 | if(s.find(x)!=s.end()) {
| ^
insects.cpp:59:41: error: 'move_outside' was not declared in this scope
59 | move_outside(x);
| ^~~~~~~~~~~~
insects.cpp:63:36: error: 'to_mark' was not declared in this scope
63 | for(int x: to_mark) marked[x]=true;
| ^~~~~~~