Borderou de evaluare (job #2808420)
Utilizator | Data | 25 noiembrie 2021 00:18:45 | |
---|---|---|---|
Problema | Algoritmul lui Dijkstra | Status | done |
Runda | Arhiva educationala | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In member function 'void graf::BFS(int)':
main.cpp:70:31: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
70 | for (int i = 0; i < matriceAd[x].size(); ++i) {
| ~~^~~~~~~~~~~~~~~~~~~~~
main.cpp:63:16: warning: unused variable 'y' [-Wunused-variable]
63 | int x, y;
| ^
main.cpp: In member function 'void graf::DFS()':
main.cpp:93:39: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
93 | for (int j = 1; j < matriceAd[x].size(); ++j) {
| ~~^~~~~~~~~~~~~~~~~~~~~
main.cpp: In member function 'void graf::sortaret(std::vector<int>&)':
main.cpp:114:31: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
114 | for (int i = 1; i < matriceAd[x].size(); ++i) {
| ~~^~~~~~~~~~~~~~~~~~~~~
main.cpp: In member function 'int graf::minDist(std::vector<int>&, std::vector<bool>&)':
main.cpp:162:19: error: 'INT_MAX' was not declared in this scope
162 | int min = INT_MAX, j;
| ^~~~~~~
main.cpp:5:1: note: 'INT_MAX' is defined in header '<climits>'; did you forget to '#include <climits>'?
4 | #include <queue>
+++ |+#include <climits>
5 | using namespace std;
main.cpp:166:17: error: 'j' was not declared in this scope
166 | j = i;
| ^
main.cpp:169:16: error: 'j' was not declared in this scope
169 | return j;
| ^
main.cpp: In member function 'void graf::dijkstra(std::vector<std::vector<int> >&, int)':
main.cpp:173:36: error: 'INT_MAX' was not declared in this scope
173 | vector<int> dist (nrN + 1, INT_MAX);
| ^~~~~~~
main.cpp:173:36: note: 'INT_MAX' is defined in header '<climits>'; did you forget to '#include <climits>'?
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !