Borderou de evaluare (job #2789343)
| Utilizator | Data | 27 octombrie 2021 14:10:05 | |
|---|---|---|---|
| Problema | Parcurgere DFS - componente conexe | Status | done |
| Runda | Arhiva educationala | Compilator | cpp-64 | Vezi sursa |
| Scor | 0 | ||
Raport evaluator
Eroare de compilare:
main.cpp:16:5: error: 'unordered_map' does not name a type
16 | unordered_map<int, list<int>> listaAdiacenta;
| ^~~~~~~~~~~~~
main.cpp:61:24: error: 'vector' has not been declared
61 | void DFS(int nodS, vector<bool>& vizitat)
| ^~~~~~
main.cpp:61:30: error: expected ',' or '...' before '<' token
61 | void DFS(int nodS, vector<bool>& vizitat)
| ^
main.cpp: In member function 'void Graf::citireGraf()':
main.cpp:39:13: error: 'listaAdiacenta' was not declared in this scope
39 | listaAdiacenta[x].push_back(y);
| ^~~~~~~~~~~~~~
main.cpp: In member function 'int Graf::componenteConexe()':
main.cpp:49:9: error: 'vector' was not declared in this scope
49 | vector<bool> vizitat(nrNoduri + 1, false);
| ^~~~~~
main.cpp:5:1: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'?
4 | #include <list>
+++ |+#include <vector>
5 | using namespace std;
main.cpp:49:16: error: expected primary-expression before 'bool'
49 | vector<bool> vizitat(nrNoduri + 1, false);
| ^~~~
main.cpp:52:18: error: 'vizitat' was not declared in this scope
52 | if (!vizitat[i])
| ^~~~~~~
main.cpp: In member function 'void Graf::DFS(int, int)':
main.cpp:63:9: error: 'vizitat' was not declared in this scope
63 | vizitat[nodS] = true;
| ^~~~~~~
main.cpp:65:27: error: 'listaAdiacenta' was not declared in this scope
65 | for (auto vecin : listaAdiacenta[nodS])
| ^~~~~~~~~~~~~~
main.cpp: In function 'int main()':
main.cpp:73:15: warning: unused variable 's' [-Wunused-variable]
73 | int n, m, s;
| ^
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !
