Borderou de evaluare (job #2498788)
Utilizator | Data | 24 noiembrie 2019 13:54:05 | |
---|---|---|---|
Problema | Lowest Common Ancestor | Status | done |
Runda | Arhiva educationala | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp:18:46: error: 'std::vector' has not been declared
void dfs(int currentNode, int prevNode, std::vector<int>& depth,
^~~~~~
main.cpp:18:52: error: expected ',' or '...' before '<' token
void dfs(int currentNode, int prevNode, std::vector<int>& depth,
^
main.cpp: In function 'void dfs(int, int, int)':
main.cpp:20:5: error: 'parent' was not declared in this scope
parent[currentNode][0] = prevNode;
^~~~~~
main.cpp:21:5: error: 'depth' was not declared in this scope
depth[currentNode] = depth[prevNode] + 1;
^~~~~
main.cpp:23:25: error: 'graph' was not declared in this scope
for (int i = 0; i < graph[currentNode].size(); i++) {
^~~~~
main.cpp: At global scope:
main.cpp:37:32: error: 'std::vector' has not been declared
void getAllParents(int n, std::vector<std::vector<int>>& parent) {
^~~~~~
main.cpp:37:38: error: expected ',' or '...' before '<' token
void getAllParents(int n, std::vector<std::vector<int>>& parent) {
^
main.cpp: In function 'void getAllParents(int, int)':
main.cpp:40:17: error: 'parent' was not declared in this scope
if (parent[i][level-1] != -1) {
^~~~~~
main.cpp: At global scope:
main.cpp:47:6: error: 'vector' in namespace 'std' does not name a template type
std::vector<int> lca(const std::vector<std::vector<int>>& graph, const std::vector< std::pair<int, int> >& queries) {
^~~~~~
main.cpp:101:32: error: 'std::vector' has not been declared
void addEdge(int a,int b, std::vector<std::vector<int>>& graph)
^~~~~~
main.cpp:101:38: error: expected ',' or '...' before '<' token
void addEdge(int a,int b, std::vector<std::vector<int>>& graph)
^
main.cpp: In function 'void addEdge(int, int, int)':
main.cpp:103:5: error: 'graph' was not declared in this scope
graph[a].push_back(b);
^~~~~
main.cpp: In function 'int main()':
main.cpp:118:5: error: 'vector' is not a member of 'std'
std::vector<std::vector<int>> graph(n + 5);
^~~
main.cpp:118:17: error: 'vector' is not a member of 'std'
std::vector<std::vector<int>> graph(n + 5);
^~~
main.cpp:118:29: error: expected primary-expression before 'int'
std::vector<std::vector<int>> graph(n + 5);
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !