Borderou de evaluare (job #3242681)
Utilizator | Data | 13 septembrie 2024 13:17:21 | |
---|---|---|---|
Problema | Algoritmul Bellman-Ford | Status | done |
Runda | Arhiva educationala | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'std::vector<int> bellman_ford(std::vector<std::vector<std::pair<int, int> > >&, int)':
main.cpp:14:29: error: 'INT_MAX' was not declared in this scope
14 | vector<int> dist(n + 1, INT_MAX);
| ^~~~~~~
main.cpp:4:1: note: 'INT_MAX' is defined in header '<climits>'; did you forget to '#include <climits>'?
3 | #include <queue>
+++ |+#include <climits>
4 | using namespace std;
main.cpp:39:44: warning: comparison of integer expressions of different signedness: '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'} and 'std::vector<std::vector<std::pair<int, int> > >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
39 | if (nr_of_visits[node] > list.size()) { //cycle
main.cpp: In function 'int main()':
main.cpp:68:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
68 | for (int i = 2; i < dist.size(); i++) {
| ~~^~~~~~~~~~~~~
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !