Borderou de evaluare (job #3214293)
Utilizator | Data | 14 martie 2024 05:15:54 | |
---|---|---|---|
Problema | Drumuri2 | Status | done |
Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In member function 'void FordFulkerson::init()':
main.cpp:35:43: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::vector<std::pair<int, int> > >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
35 | for (int i = 0; i < g.size(); i++){
| ~~^~~~~~~~~~
main.cpp:36:51: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
36 | for (int j = 0; j < g[i].size(); j++){
| ~~^~~~~~~~~~~~~
main.cpp: In member function 'bool FordFulkerson::findAndUpdate(int, int, int&)':
main.cpp:56:51: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
56 | for (int i = 0; i < eIndexes[u].size(); i++){
| ~~^~~~~~~~~~~~~~~~~~~~
main.cpp:73:42: error: no matching function for call to 'min(int&, long long int)'
73 | uFlow=min(uFlow, edges[from[current].second].c-
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
74 | edges[from[current].second].f);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/12.2.1/string:50,
from /usr/include/c++/12.2.1/bits/locale_classes.h:40,
from /usr/include/c++/12.2.1/bits/ios_base.h:41,
from /usr/include/c++/12.2.1/ios:42,
from /usr/include/c++/12.2.1/ostream:38,
from /usr/include/c++/12.2.1/iostream:39,
from main.cpp:1:
/usr/include/c++/12.2.1/bits/stl_algobase.h:230:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
230 | min(const _Tp& __a, const _Tp& __b)
| ^~~
/usr/include/c++/12.2.1/bits/stl_algobase.h:230:5: note: template argument deduction/substitution failed:
main.cpp:73:42: note: deduced conflicting types for parameter 'const _Tp' ('int' and 'long long int')
73 | uFlow=min(uFlow, edges[from[current].second].c-
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
74 | edges[from[current].second].f);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/12.2.1/bits/stl_algobase.h:278:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
278 | min(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
/usr/include/c++/12.2.1/bits/stl_algobase.h:278:5: note: template argument deduction/substitution failed:
main.cpp:73:42: note: deduced conflicting types for parameter 'const _Tp' ('int' and 'long long int')
73 | uFlow=min(uFlow, edges[from[current].second].c-
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
74 | edges[from[current].second].f);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.cpp: In function 'void DFS(std::vector<std::set<int> >&, std::vector<std::set<int> >&, std::vector<int>&, int)':
main.cpp:96:36: error: binding reference of type 'int&' to 'const int' discards qualifiers
96 | for(int &hijo : edges[padre]){
| ^
main.cpp:96:18: warning: loop variable 'hijo' of type 'int&' binds to a temporary constructed from type 'const int' [-Wrange-loop-construct]
96 | for(int &hijo : edges[padre]){
| ^~~~
main.cpp:96:18: note: use non-reference type 'int' to make the copy explicit or 'const int&' to prevent copying
main.cpp: In function 'int main()':
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !