Borderou de evaluare (job #3374640)
| Utilizator | Data | 9 noiembrie 2026 08:21:07 | |
|---|---|---|---|
| Problema | Autobuze | Status | done |
| Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
| Scor | 0 | ||
Raport evaluator
Eroare de compilare:
main.cpp: In function 'int findDSU(int)':
main.cpp:19:28: error: no matching function for call to 'find(int&)'
19 | return parent[u] = find(parent[u]);
| ~~~~^~~~~~~~~~~
In file included from /usr/include/c++/12.2.1/bits/locale_facets.h:48,
from /usr/include/c++/12.2.1/bits/basic_ios.h:37,
from /usr/include/c++/12.2.1/ios:44,
from /usr/include/c++/12.2.1/istream:38,
from /usr/include/c++/12.2.1/sstream:38,
from /usr/include/c++/12.2.1/complex:45,
from /usr/include/c++/12.2.1/ccomplex:39,
from /usr/include/c++/12.2.1/x86_64-pc-linux-gnu/bits/stdc++.h:54,
from main.cpp:1:
/usr/include/c++/12.2.1/bits/streambuf_iterator.h:434:5: note: candidate: 'template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT, std::char_traits<_CharT> > >::__type std::find(istreambuf_iterator<_CharT, char_traits<_CharT> >, istreambuf_iterator<_CharT, char_traits<_CharT> >, const _CharT2&)'
434 | find(istreambuf_iterator<_CharT> __first,
| ^~~~
/usr/include/c++/12.2.1/bits/streambuf_iterator.h:434:5: note: template argument deduction/substitution failed:
main.cpp:19:28: note: mismatched types 'std::istreambuf_iterator<_CharT, std::char_traits<_CharT> >' and 'int'
19 | return parent[u] = find(parent[u]);
| ~~~~^~~~~~~~~~~
In file included from /usr/include/c++/12.2.1/algorithm:61,
from /usr/include/c++/12.2.1/x86_64-pc-linux-gnu/bits/stdc++.h:65:
/usr/include/c++/12.2.1/bits/stl_algo.h:3843:5: note: candidate: 'template<class _IIter, class _Tp> constexpr _IIter std::find(_IIter, _IIter, const _Tp&)'
3843 | find(_InputIterator __first, _InputIterator __last,
| ^~~~
/usr/include/c++/12.2.1/bits/stl_algo.h:3843:5: note: template argument deduction/substitution failed:
main.cpp:19:28: note: candidate expects 3 arguments, 1 provided
19 | return parent[u] = find(parent[u]);
| ~~~~^~~~~~~~~~~
In file included from /usr/include/c++/12.2.1/algorithm:73:
/usr/include/c++/12.2.1/pstl/glue_algorithm_defs.h:60:1: note: candidate: 'template<class _ExecutionPolicy, class _ForwardIterator, class _Tp> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> std::find(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, const _Tp&)'
60 | find(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value);
| ^~~~
/usr/include/c++/12.2.1/pstl/glue_algorithm_defs.h:60:1: note: template argument deduction/substitution failed:
main.cpp:19:28: note: candidate expects 4 arguments, 1 provided
19 | return parent[u] = find(parent[u]);
| ~~~~^~~~~~~~~~~
main.cpp: In function 'void unionDSU(int, int)':
main.cpp:24:9: error: declaration of 'int u' shadows a parameter
24 | int u = findDSU(u);
| ^
main.cpp:22:19: note: 'int u' previously declared here
22 | void unionDSU(int u, int v){
| ~~~~^
main.cpp:25:9: error: declaration of 'int v' shadows a parameter
25 | int v = findDSU(v);
| ^
main.cpp:22:26: note: 'int v' previously declared here
22 | void unionDSU(int u, int v){
| ~~~~^
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !
