Borderou de evaluare (job #2821889)
Utilizator | Data | 23 decembrie 2021 11:12:27 | |
---|---|---|---|
Problema | Parcurgere DFS - componente conexe | 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::PrimMST(int&)':
main.cpp:133:42: error: 'INT_MAX' was not declared in this scope
133 | vector<int> minCost(this->nrNodes+1, INT_MAX);
| ^~~~~~~
main.cpp:8:1: note: 'INT_MAX' is defined in header '<climits>'; did you forget to '#include <climits>'?
7 | #include <sys/resource.h> // posix header
+++ |+#include <climits>
8 |
main.cpp: In member function 'std::vector<int> Graph::Dijkstra(const int&)':
main.cpp:196:42: error: 'INT_MAX' was not declared in this scope
196 | vector<int> minCost(this->nrNodes+1, INT_MAX);
| ^~~~~~~
main.cpp:196:42: note: 'INT_MAX' is defined in header '<climits>'; did you forget to '#include <climits>'?
main.cpp: In member function 'std::vector<int> Graph::BellmanFord(const int&)':
main.cpp:229:42: error: 'INT_MAX' was not declared in this scope
229 | vector<int> minCost(this->nrNodes+1, INT_MAX);
| ^~~~~~~
main.cpp:229:42: note: 'INT_MAX' is defined in header '<climits>'; did you forget to '#include <climits>'?
main.cpp: In member function 'std::vector<std::vector<int> > Graph::getMinCostMatrix()':
main.cpp:316:20: error: 'INT_MAX' was not declared in this scope
316 | int infinity = INT_MAX / 4; //avoid overflow
| ^~~~~~~
main.cpp:316:20: note: 'INT_MAX' is defined in header '<climits>'; did you forget to '#include <climits>'?
main.cpp: In member function 'int Graph::getMinSalesmanCost(const int&, std::vector<int>&)':
main.cpp:371:24: error: 'INT_MAX' was not declared in this scope
371 | dp[i][j] = INT_MAX;
| ^~~~~~~
main.cpp:371:24: note: 'INT_MAX' is defined in header '<climits>'; did you forget to '#include <climits>'?
main.cpp:379:34: error: 'INT_MAX' was not declared in this scope
379 | if(dp[node][mask] == INT_MAX)
| ^~~~~~~
main.cpp:379:34: note: 'INT_MAX' is defined in header '<climits>'; did you forget to '#include <climits>'?
main.cpp:396:15: error: 'INT_MAX' was not declared in this scope
396 | int ans = INT_MAX;
| ^~~~~~~
main.cpp:396:15: note: 'INT_MAX' is defined in header '<climits>'; did you forget to '#include <climits>'?
main.cpp: In member function 'bool UndirectedGraph::havelHakimi(std::vector<int>)':
main.cpp:566:23: 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]
566 | if(degrees[0] > degrees.size() - loops)
main.cpp: In member function 'std::vector<int> DirectedGraph::topologicalSorting()':
main.cpp:686:28: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<bool>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
686 | for(int node = 1; node < visited.size(); ++node)
| ~~~~~^~~~~~~~~~~~~~~~
main.cpp: In member function 'int DirectedGraph::EdmondsKarpBFS(const int&, const int&, std::vector<int>&, std::vector<std::vector<int> >&)':
main.cpp:739:30: error: 'INT_MAX' was not declared in this scope
739 | toBeVisited.push({start, INT_MAX}); //edge to start does not exist
| ^~~~~~~
main.cpp:739:30: note: 'INT_MAX' is defined in header '<climits>'; did you forget to '#include <climits>'?
main.cpp:739:38: error: no matching function for call to 'std::queue<std::pair<int, int> >::push(<brace-enclosed initializer list>)'
739 | toBeVisited.push({start, INT_MAX}); //edge to start does not exist
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !