Borderou de evaluare (job #3367522)

Utilizator MariaB144Maria Belceanu MariaB144 Data 8 octombrie 2026 16:35:40
Problema Parcurgere DFS - componente conexe Status done
Runda Arhiva educationala Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp:12:8: error: 'vector' was not declared in this scope 12 | vector<vector<int>>adj; | ^~~~~~ main.cpp:3:1: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'? 2 | #include <fstream> +++ |+#include <vector> 3 | main.cpp:12:8: error: 'vector' was not declared in this scope 12 | vector<vector<int>>adj; | ^~~~~~ main.cpp:12:8: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'? main.cpp:12:8: error: 'vector' was not declared in this scope main.cpp:12:8: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'? main.cpp:12:8: error: 'vector' was not declared in this scope main.cpp:12:8: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'? main.cpp:12:8: error: 'vector' was not declared in this scope main.cpp:12:8: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'? main.cpp:12:8: error: 'vector' was not declared in this scope main.cpp:12:8: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'? main.cpp:12:8: error: 'vector' was not declared in this scope main.cpp:12:8: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'? main.cpp:12:8: error: 'vector' was not declared in this scope main.cpp:12:8: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'? main.cpp:12:8: error: 'vector' was not declared in this scope main.cpp:12:8: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'? main.cpp:12:1: error: 'vector' does not name a type 12 | vector<vector<int>>adj; | ^~~~~~ main.cpp:13:1: error: 'vector' does not name a type 13 | vector<int>viz; | ^~~~~~ main.cpp: In function 'void DFS(int)': main.cpp:16:5: error: 'viz' was not declared in this scope 16 | viz[nod]=1; | ^~~ main.cpp:17:17: error: 'adj' was not declared in this scope 17 | for(int i : adj[nod]){ | ^~~ main.cpp: In function 'int main()': main.cpp:26:5: error: 'adj' was not declared in this scope 26 | adj.resize(n+5);///a must altfel eroare la compilare - trebuie definit un size | ^~~ main.cpp:27:5: error: 'viz' was not declared in this scope 27 | viz.resize(n+5); | ^~~ Non zero exit status: 1

Ceva nu functioneaza?