eastereggs.cpp:1:1: error: 'vector' does not name a type
1 | vector<int> order;
| ^~~~~~
eastereggs.cpp:2:1: error: 'vector' does not name a type
2 | vector<vector<int>> listaAdy;
| ^~~~~~
eastereggs.cpp: In function 'void dfs(int, int)':
eastereggs.cpp:5:5: error: 'order' was not declared in this scope
5 | order.push_back(nodo);
| ^~~~~
eastereggs.cpp:6:21: error: 'listaAdy' was not declared in this scope
6 | for(int vecino: listaAdy[nodo]){
| ^~~~~~~~
eastereggs.cpp: At global scope:
eastereggs.cpp:12:21: error: 'vector' has not been declared
12 | int findEgg (int N, vector < pair < int, int > > bridges)
| ^~~~~~
eastereggs.cpp:12:28: error: expected ',' or '...' before '<' token
12 | int findEgg (int N, vector < pair < int, int > > bridges)
| ^
eastereggs.cpp: In function 'int findEgg(int, int)':
eastereggs.cpp:14:5: error: 'listaAdy' was not declared in this scope
14 | listaAdy = vector<vector<int>>(N+1);
| ^~~~~~~~
eastereggs.cpp:14:16: error: 'vector' was not declared in this scope
14 | listaAdy = vector<vector<int>>(N+1);
| ^~~~~~
eastereggs.cpp:14:30: error: expected primary-expression before 'int'
14 | listaAdy = vector<vector<int>>(N+1);
| ^~~
eastereggs.cpp:15:9: error: 'pair' was not declared in this scope
15 | for(pair<int, int> bridge: bridges){
| ^~~~
eastereggs.cpp:15:14: error: expected primary-expression before 'int'
15 | for(pair<int, int> bridge: bridges){
| ^~~
eastereggs.cpp:19:8: error: could not convert 'dfs(0, -1)' from 'void' to 'bool'
19 | dfs(0, -1);
| ~~~^~~~~~~
| |
| void
eastereggs.cpp:20:5: error: expected primary-expression before 'int'
20 | int ans = 0;
| ^~~
eastereggs.cpp:19:16: error: expected ')' before 'int'
19 | dfs(0, -1);
| ^
| )
20 | int ans = 0;
| ~~~
eastereggs.cpp:15:8: note: to match this '('
15 | for(pair<int, int> bridge: bridges){
| ^
eastereggs.cpp:20:9: warning: unused variable 'ans' [-Wunused-variable]
20 | int ans = 0;
| ^~~
eastereggs.cpp:21:17: error: 'hi' was not declared in this scope
21 | int lo = 0; hi = N-1;
| ^~
eastereggs.cpp:24:16: error: expected primary-expression before 'int'
24 | vector<int> ask(mid);
| ^~~
eastereggs.cpp:25:38: error: 'ask' was not declared in this scope
25 | for(int i = 0; i < mid; ++i) ask[i] = order[i];
| ^~~
eastereggs.cpp:25:47: error: 'order' was not declared in this scope
25 | for(int i = 0; i < mid; ++i) ask[i] = order[i];
| ^~~~~
eastereggs.cpp:26:18: error: 'ask' was not declared in this scope
26 | if(query(ask)){
| ^~~
eastereggs.cpp:26:12: error: 'query' was not declared in this scope
26 | if(query(ask)){
| ^~~~~
eastereggs.cpp:30:13: error: 'ans' was not declared in this scope
30 | ans = mid;
| ^~~
eastereggs.cpp:34:12: error: 'ans' was not declared in this scope
34 | return ans+1;
| ^~~