Borderou de evaluare (job #2757258)
Utilizator | Data | 4 iunie 2021 18:56:16 | |
---|---|---|---|
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 'void BellmanFord(int, const CostGraph&)':
main.cpp:27:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 0; i < distances.size(); ++i)
~~^~~~~~~~~~~~~~~~~~
main.cpp:39:75: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
while (relaxedNodes.size() && nodeUsedFrequency[relaxedNodes.front()] <= graph.size())
main.cpp:64:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 2; i < graph.size(); ++i)
~~^~~~~~~~~~~~~~
main.cpp: In function 'int main()':
main.cpp:79:29: error: 'void std::basic_ios<_CharT, _Traits>::set_rdbuf(std::basic_streambuf<_CharT, _Traits>*) [with _CharT = char; _Traits = std::char_traits<char>]' is protected within this context
cin.set_rdbuf(in.rdbuf());
^
In file included from /usr/include/c++/6/ios:44:0,
from /usr/include/c++/6/ostream:38,
from /usr/include/c++/6/iostream:39,
from main.cpp:1:
/usr/include/c++/6/bits/basic_ios.h:505:7: note: declared protected here
set_rdbuf(basic_streambuf<_CharT, _Traits>* __sb)
^~~~~~~~~
main.cpp:80:31: error: 'void std::basic_ios<_CharT, _Traits>::set_rdbuf(std::basic_streambuf<_CharT, _Traits>*) [with _CharT = char; _Traits = std::char_traits<char>]' is protected within this context
cout.set_rdbuf(out.rdbuf());
^
In file included from /usr/include/c++/6/ios:44:0,
from /usr/include/c++/6/ostream:38,
from /usr/include/c++/6/iostream:39,
from main.cpp:1:
/usr/include/c++/6/bits/basic_ios.h:505:7: note: declared protected here
set_rdbuf(basic_streambuf<_CharT, _Traits>* __sb)
^~~~~~~~~
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !