Borderou de evaluare (job #2886593)

Utilizator UrsuDanUrsu Dan UrsuDan Data 7 aprilie 2022 21:56:19
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 'void Solution::printDist(std::vector<int>&, std::ofstream&)': main.cpp:58:21: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare] 58 | for (int i = 2; i <= dist.size(); ++i) { | ~~^~~~~~~~~~~~~~ main.cpp:59:20: error: no match for 'operator==' (operand types are 'std::basic_ostream<char>' and 'int') 59 | fout << dist[i] == INT_MAX ? 0 : dist[i] << " "; | ^~ main.cpp:59:20: note: candidate: 'operator==(int, int)' (built-in) 59 | fout << dist[i] == INT_MAX ? 0 : dist[i] << " "; | ^ main.cpp:59:20: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'int' In file included from /usr/include/c++/10/regex:62, from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:110, from main.cpp:1: /usr/include/c++/10/bits/regex.h:1035:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator==(const std::__cxx11::sub_match<_BiIter>&, const std::__cxx11::sub_match<_BiIter>&)' 1035 | operator==(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs) | ^~~~~~~~ /usr/include/c++/10/bits/regex.h:1035:5: note: template argument deduction/substitution failed: main.cpp:59:23: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 59 | fout << dist[i] == INT_MAX ? 0 : dist[i] << " "; | ^~~~~~~ /usr/include/c++/10/bits/regex.h:1131:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator==(std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const std::__cxx11::sub_match<_BiIter>&)' 1131 | operator==(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/10/bits/regex.h:1131:5: note: template argument deduction/substitution failed: main.cpp:59:23: note: 'std::basic_ostream<char>' is not derived from 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>' 59 | fout << dist[i] == INT_MAX ? 0 : dist[i] << " "; | ^~~~~~~ /usr/include/c++/10/bits/regex.h:1206:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator==(const std::__cxx11::sub_match<_BiIter>&, std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)' 1206 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/10/bits/regex.h:1206:5: note: template argument deduction/substitution failed: main.cpp:59:23: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 59 | fout << dist[i] == INT_MAX ? 0 : dist[i] << " "; | ^~~~~~~ /usr/include/c++/10/bits/regex.h:1298:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type*, const std::__cxx11::sub_match<_BiIter>&)' 1298 | operator==(typename iterator_traits<_Bi_iter>::value_type const* __lhs, | ^~~~~~~~ /usr/include/c++/10/bits/regex.h:1298:5: note: template argument deduction/substitution failed: main.cpp:59:23: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int' 59 | fout << dist[i] == INT_MAX ? 0 : dist[i] << " "; | ^~~~~~~ /usr/include/c++/10/bits/regex.h:1373:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const std::__cxx11::sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)' 1373 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/10/bits/regex.h:1373:5: note: template argument deduction/substitution failed: main.cpp:59:23: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 59 | fout << dist[i] == INT_MAX ? 0 : dist[i] << " "; | ^~~~~~~ /usr/include/c++/10/bits/regex.h:1466:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type&, const std::__cxx11::sub_match<_BiIter>&)' Non zero exit status: 1

Ceva nu functioneaza?