Borderou de evaluare (job #3197051)

Utilizator CzarPopescu Cezar Stefan Cristian Czar Data 25 ianuarie 2024 16:10:28
Problema Algoritmul lui Dijkstra Status done
Runda Arhiva educationala Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp:21:9: error: 'list' does not name a type 21 | list<iPair>* adj; | ^~~~ main.cpp: In constructor 'Graph::Graph(long long int)': main.cpp:25:17: error: 'adj' was not declared in this scope 25 | adj = new list<iPair>[V]; | ^~~ main.cpp:25:27: error: 'list' does not name a type 25 | adj = new list<iPair>[V]; | ^~~~ main.cpp:25:37: error: expected primary-expression before '>' token 25 | adj = new list<iPair>[V]; | ^ main.cpp: In lambda function: main.cpp:25:41: error: expected '{' before ';' token 25 | adj = new list<iPair>[V]; | ^ main.cpp: In member function 'void Graph::addEdge(long long int, long long int, long long int)': main.cpp:29:17: error: 'adj' was not declared in this scope 29 | adj[u].push_back({ v, w }); | ^~~ main.cpp: In member function 'void Graph::shortestPath(long long int)': main.cpp:40:25: error: 'list' was not declared in this scope 40 | list<iPair>::iterator i; | ^~~~ main.cpp:13:1: note: 'std::list' is defined in header '<list>'; did you forget to '#include <list>'? 12 | #include<iomanip> +++ |+#include <list> 13 | using namespace std; main.cpp:40:35: error: expected primary-expression before '>' token 40 | list<iPair>::iterator i; | ^ main.cpp:40:47: error: missing template arguments before 'i' 40 | list<iPair>::iterator i; | ^ main.cpp:41:30: error: 'i' was not declared in this scope; did you mean 'in'? 41 | for (i = adj[u].begin(); i != adj[u].end(); i++) { | ^ | in main.cpp:41:34: error: 'adj' was not declared in this scope 41 | for (i = adj[u].begin(); i != adj[u].end(); i++) { | ^~~ Non zero exit status: 1

Ceva nu functioneaza?