eastereggs.cpp:1:1: error: 'vector' does not name a type
1 | vector<int>v[513];
| ^~~~~~
eastereggs.cpp:2:1: error: 'vector' does not name a type
2 | vector<int>order;
| ^~~~~~
eastereggs.cpp: In function 'void dfs(int, int)':
eastereggs.cpp:5:5: error: 'order' was not declared in this scope
5 | order.push_back(x);
| ^~~~~
eastereggs.cpp:6:18: error: 'v' was not declared in this scope
6 | for (int i : v[x])
| ^
eastereggs.cpp: At global scope:
eastereggs.cpp:14:20: error: 'vector' has not been declared
14 | int findEgg(int N, vector < pair < int, int > > bridges)
| ^~~~~~
eastereggs.cpp:14:27: error: expected ',' or '...' before '<' token
14 | int findEgg(int N, vector < pair < int, int > > bridges)
| ^
eastereggs.cpp: In function 'int findEgg(int, int)':
eastereggs.cpp:16:10: error: 'pair' was not declared in this scope
16 | for (pair<int, int>p : bridges)
| ^~~~
eastereggs.cpp:16:15: error: expected primary-expression before 'int'
16 | for (pair<int, int>p : bridges)
| ^~~
eastereggs.cpp:22:8: error: could not convert 'dfs(1, -1)' from 'void' to 'bool'
22 | dfs(1, -1);
| ~~~^~~~~~~
| |
| void
eastereggs.cpp:24:5: error: expected primary-expression before 'int'
24 | int l=1, r=N;
| ^~~
eastereggs.cpp:22:16: error: expected ')' before 'int'
22 | dfs(1, -1);
| ^
| )
23 |
24 | int l=1, r=N;
| ~~~
eastereggs.cpp:16:9: note: to match this '('
16 | for (pair<int, int>p : bridges)
| ^
eastereggs.cpp:24:9: warning: unused variable 'l' [-Wunused-variable]
24 | int l=1, r=N;
| ^
eastereggs.cpp:24:14: warning: unused variable 'r' [-Wunused-variable]
24 | int l=1, r=N;
| ^
eastereggs.cpp:25:12: error: 'l' was not declared in this scope
25 | while (l < r)
| ^
eastereggs.cpp:25:16: error: 'r' was not declared in this scope
25 | while (l < r)
| ^
eastereggs.cpp:29:9: error: 'vector' was not declared in this scope
29 | vector<int>curr;
| ^~~~~~
eastereggs.cpp:29:16: error: expected primary-expression before 'int'
29 | vector<int>curr;
| ^~~
eastereggs.cpp:31:13: error: 'curr' was not declared in this scope
31 | curr.push_back(order[i]);
| ^~~~
eastereggs.cpp:31:28: error: 'order' was not declared in this scope
31 | curr.push_back(order[i]);
| ^~~~~
eastereggs.cpp:33:19: error: 'curr' was not declared in this scope
33 | if (query(curr))
| ^~~~
eastereggs.cpp:33:13: error: 'query' was not declared in this scope
33 | if (query(curr))
| ^~~~~
eastereggs.cpp:39:12: error: 'order' was not declared in this scope
39 | return order[r-1];
| ^~~~~
eastereggs.cpp:39:18: error: 'r' was not declared in this scope
39 | return order[r-1];
| ^