Problem cousin
User Hijackedsoul
Submission Time 2024-03-07 16:49:09
Score 0
Max Time N/A
Max Memory N/A

Compile Error

cousin.cpp:3:6: error: ‘vector’ in namespace ‘std’ does not name a template type
3 | std::vector <int> preorder, postorder, mp(200005), dist(200005, 0);
| ^~~~~~
cousin.cpp:2:1: note: ‘std::vector’ is defined in header ‘<vector>’; did you forget to ‘#include <vector>’?
1 | #include "cousin.h"
+++ |+#include <vector>
2 |
cousin.cpp:4:6: error: ‘vector’ in namespace ‘std’ does not name a template type
4 | std::vector <std::vector<int>> adj, twok(20, vector<int>(200005, -1));
| ^~~~~~
cousin.cpp:4:1: note: ‘std::vector’ is defined in header ‘<vector>’; did you forget to ‘#include <vector>’?
4 | std::vector <std::vector<int>> adj, twok(20, vector<int>(200005, -1));
| ^~~
cousin.cpp: In function ‘void dfs(int, int)’:
cousin.cpp:9:2: error: ‘preorder’ was not declared in this scope
9 | preorder[node]=cnt;
| ^~~~