Borderou de evaluare (job #2805662)
Utilizator | Data | 21 noiembrie 2021 17:23:36 | |
---|---|---|---|
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 'std::vector<int> Graph::bfs(int)':
main.cpp:109:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
109 | for (int i = 0; i < neighbors[aux.front()].size(); i++)
| ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.cpp: In member function 'void Graph::dfs(int, std::vector<bool>&)':
main.cpp:146:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
146 | for (int i = 0; i < neighbors[x].size(); i++)
| ~~^~~~~~~~~~~~~~~~~~~~~
main.cpp: In member function 'void Graph::biconnected_dfs(int, int&, std::vector<int>&, std::vector<int>&, std::stack<int>&, std::vector<std::vector<int> >&, std::vector<int>&)':
main.cpp:193:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
193 | for (int i = 0; i < neighbors[x].size(); i++)
| ~~^~~~~~~~~~~~~~~~~~~~~
main.cpp: In member function 'void Graph::stronglyconnected_dfs(int, int&, std::vector<int>&, std::vector<int>&, std::stack<int>&, std::vector<std::vector<int> >&, std::vector<bool>&)':
main.cpp:256:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
256 | for (int i = 0; i < neighbors[x].size(); i++)
| ~~^~~~~~~~~~~~~~~~~~~~~
main.cpp: In member function 'void Graph::topological_dfs(int, std::vector<bool>&, std::stack<int>&)':
main.cpp:311:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
311 | for (int i = 0; i < neighbors[x].size(); i++)
| ~~^~~~~~~~~~~~~~~~~~~~~
main.cpp: In member function 'bool Graph::havel_hakimi(std::vector<int>&)':
main.cpp:327:24: warning: comparison of integer expressions of different signedness: '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'} and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
327 | if (degrees[0] > degrees.size() - 1) //gradul unui nod este mai mare decat nr de noduri disponibile
main.cpp: In member function 'void Graph::cconnections_dfs(int, int&, std::vector<int>&, std::vector<int>&, std::vector<int>&, std::vector<std::vector<int> >&)':
main.cpp:370:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
370 | for (int i = 0; i < neighbors[x].size(); i++)
| ~~^~~~~~~~~~~~~~~~~~~~~
main.cpp: In member function 'std::vector<int> Graph::apm(int&)':
main.cpp:418:24: error: 'INT_MAX' was not declared in this scope
418 | keys.push_back(INT_MAX); //setam costurile minime ca fiind infinit
| ^~~~~~~
main.cpp:7:1: note: 'INT_MAX' is defined in header '<climits>'; did you forget to '#include <climits>'?
6 | #include <algorithm>
+++ |+#include <climits>
7 | #include <utility>
main.cpp:437:31: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
437 | for (int i = 0; i < neighbors[current_node].size(); i++)
| ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.cpp: In member function 'std::vector<int> Graph::dijkstra()':
main.cpp:460:29: error: 'INT_MAX' was not declared in this scope
460 | distances.push_back(INT_MAX); //setam distantele minime ca fiind infinit
| ^~~~~~~
main.cpp:460:29: note: 'INT_MAX' is defined in header '<climits>'; did you forget to '#include <climits>'?
main.cpp:477:31: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
477 | for (int i = 0; i < neighbors[current_node].size(); i++)
| ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.cpp:471:13: warning: unused variable 'current_key' [-Wunused-variable]
471 | int current_key = pq.top().first;
| ^~~~~~~~~~~
main.cpp: In function 'int main()':
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !