Borderou de evaluare (job #2801411)
Utilizator | Data | 16 noiembrie 2021 10:44:06 | |
---|---|---|---|
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 Graph::DFS(int)':
main.cpp:168:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
168 | for (int i = 0; i < adj[node].size(); i++)
| ~~^~~~~~~~~~~~~~~~~~
main.cpp: In member function 'void Graph::afis_adj(int)':
main.cpp:174:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
174 | for (int i = 0; i < adj[node].size(); i++)
| ~~^~~~~~~~~~~~~~~~~~
main.cpp: In member function 'void Graph::BFS(int)':
main.cpp:244:5: error: 'memset' was not declared in this scope
244 | memset(cost, -1, sizeof(cost));
| ^~~~~~
main.cpp:17:1: note: 'memset' is defined in header '<cstring>'; did you forget to '#include <cstring>'?
16 | #include <set>
+++ |+#include <cstring>
17 | #include <tuple>
main.cpp:254:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
254 | for (int i = 0; i < adj[node].size(); i++) //parcurg toti vecinii sai
| ~~^~~~~~~~~~~~~~~~~~
main.cpp: In member function 'void Graph::calculateIndegree(int*)':
main.cpp:372:5: error: 'memset' was not declared in this scope
372 | memset(indegree, 0, no_nodes);
| ^~~~~~
main.cpp:372:5: note: 'memset' is defined in header '<cstring>'; did you forget to '#include <cstring>'?
main.cpp: In member function 'void Graph::topSort(int*, std::queue<int>)':
main.cpp:396:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
396 | for (int i = 0; i < adj[node].size(); i++)
| ~~^~~~~~~~~~~~~~~~~~
main.cpp: In member function 'bool Graph::graphExists(std::vector<int>)':
main.cpp:419:9: error: 'sort' was not declared in this scope; did you mean 'qsort'?
419 | sort(degree_seq.begin(), degree_seq.end(), greater<>());
| ^~~~
| qsort
main.cpp:427:17: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
427 | if (top > degree_seq.size()) // daca valoarea primului element este mare decat numarul de elemente ramase, nu putem construi un astfel de graf
| ~~~~^~~~~~~~~~~~~~~~~~~
main.cpp:430:28: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
430 | for (int i = 0 ; i < degree_seq.size(); i++) //dupa eliminarea primului element, scadem gradul "nodurilor" ramase
| ~~^~~~~~~~~~~~~~~~~~~
main.cpp: In member function 'void Graph::Dijkstra()':
main.cpp:19:13: error: 'INT_MAX' was not declared in this scope
19 | #define INF INT_MAX
| ^~~~~~~
main.cpp:562:19: note: in expansion of macro 'INF'
562 | dist[i] = INF;
| ^~~
main.cpp:17:1: note: 'INT_MAX' is defined in header '<climits>'; did you forget to '#include <climits>'?
16 | #include <set>
+++ |+#include <climits>
17 | #include <tuple>
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !