Borderou de evaluare (job #3271470)
Utilizator | Data | 26 ianuarie 2025 12:26:47 | |
---|---|---|---|
Problema | Paduri de multimi disjuncte | Status | done |
Runda | Arhiva educationala | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp:10:5: error: 'vector' does not name a type
10 | vector<int> parent;
| ^~~~~~
main.cpp:11:5: error: 'vector' does not name a type
11 | vector<int> height;
| ^~~~~~
main.cpp: In constructor 'DisjointSets::DisjointSets(int)':
main.cpp:16:9: error: 'parent' was not declared in this scope
16 | parent = vector<int>(nodeCount + 1);
| ^~~~~~
main.cpp:16:18: error: 'vector' was not declared in this scope
16 | parent = vector<int>(nodeCount + 1);
| ^~~~~~~~~~~
main.cpp:4:1: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'?
3 | #include <fstream>
+++ |+#include <vector>
4 |
main.cpp:17:9: error: 'height' was not declared in this scope
17 | height = vector<int>(nodeCount + 1, 1);
| ^~~~~~
main.cpp:17:25: error: expected primary-expression before 'int'
17 | height = vector<int>(nodeCount + 1, 1);
| ^~~
main.cpp: In member function 'int DisjointSets::getParent(int)':
main.cpp:23:16: error: 'parent' was not declared in this scope
23 | while (parent[node] != node)
| ^~~~~~
main.cpp: In member function 'void DisjointSets::unite(int, int)':
main.cpp:35:13: error: 'height' was not declared in this scope
35 | if (height[firstNode] <= height[secondNode])
| ^~~~~~
main.cpp:37:13: error: 'parent' was not declared in this scope
37 | parent[firstNode] = secondNode;
| ^~~~~~
main.cpp:42:13: error: 'parent' was not declared in this scope
42 | parent[secondNode] = firstNode;
| ^~~~~~
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !