Borderou de evaluare (job #2793522)

Utilizator vali_27Bojici Valentin vali_27 Data 3 noiembrie 2021 18:31:25
Problema Algoritmul Bellman-Ford 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::getTopologicalSort()': main.cpp:152:23: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'const int' [-Wsign-compare] 152 | return result.size() == N_NODES ? result : std::vector<int>(); // if cycle => empty | ~~~~~~~~~~~~~~^~~~~~~~~~ main.cpp: In member function 'std::vector<int> Graph::BellmanFord(int)': main.cpp:360:78: error: no matching function for call to 'std::exception::exception(const char [15])' 360 | if (dist[i] + x.cost < dist[x.node]) throw std::exception("Ciclu negativ!"); | ^ In file included from /usr/include/c++/10/exception:38, from /usr/include/c++/10/ios:39, from /usr/include/c++/10/ostream:38, from /usr/include/c++/10/iostream:39, from main.cpp:1: /usr/include/c++/10/bits/exception.h:68:5: note: candidate: 'constexpr std::exception::exception(std::exception&&)' 68 | exception(exception&&) = default; | ^~~~~~~~~ /usr/include/c++/10/bits/exception.h:68:15: note: no known conversion for argument 1 from 'const char [15]' to 'std::exception&&' 68 | exception(exception&&) = default; | ^~~~~~~~~~~ /usr/include/c++/10/bits/exception.h:66:5: note: candidate: 'constexpr std::exception::exception(const std::exception&)' 66 | exception(const exception&) = default; | ^~~~~~~~~ /usr/include/c++/10/bits/exception.h:66:15: note: no known conversion for argument 1 from 'const char [15]' to 'const std::exception&' 66 | exception(const exception&) = default; | ^~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/exception.h:63:5: note: candidate: 'std::exception::exception()' 63 | exception() _GLIBCXX_NOTHROW { } | ^~~~~~~~~ /usr/include/c++/10/bits/exception.h:63:5: note: candidate expects 0 arguments, 1 provided Non zero exit status: 1

Ceva nu functioneaza?