Borderou de evaluare (job #3221203)
Utilizator | Data | 6 aprilie 2024 12:11:18 | |
---|---|---|---|
Problema | Algoritmul lui Dijkstra | Status | done |
Runda | Arhiva educationala | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'void display_graph()':
main.cpp:61:28: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
61 | for(int j = 0; j < V[i].size(); ++j)
| ~~^~~~~~~~~~~~~
main.cpp: In function 'void display_costs()':
main.cpp:76:28: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
76 | for(int j = 0; j < V[i].size(); ++j)
| ~~^~~~~~~~~~~~~
main.cpp: In function 'void dijkstra()':
main.cpp:148:30: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
148 | for(int i = 0; i < V[ curr ].size(); ++i) {
| ~~^~~~~~~~~~~~~~~~~~
main.cpp:153:46: error: expected ';' before 'if'
153 | 1
| ^
| ;
154 | if( distMin[ y ] > distMin[ curr ] + cost) {
| ~~
main.cpp:153:45: warning: statement has no effect [-Wunused-value]
153 | 1
| ^
main.cpp:150:19: warning: unused variable 'y' [-Wunused-variable]
150 | int y = V[ curr ][i];//2
| ^
main.cpp:152:19: warning: unused variable 'cost' [-Wunused-variable]
152 | int cost = C[ curr ][i];//1
| ^~~~
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !