Borderou de evaluare (job #2987215)
Utilizator | Data | 2 martie 2023 09:35:11 | |
---|---|---|---|
Problema | Panouri | Status | done |
Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'int main()':
main.cpp:27:25: error: no match for 'operator=' (operand types are 'std::vector<bool>' and 'int')
27 | f[p[j]]=1;
| ^
In file included from /usr/include/c++/10/vector:68,
from main.cpp:2:
/usr/include/c++/10/bits/stl_bvector.h:740:7: note: candidate: 'std::vector<bool, _Alloc>& std::vector<bool, _Alloc>::operator=(const std::vector<bool, _Alloc>&) [with _Alloc = std::allocator<bool>]'
740 | operator=(const vector& __x)
| ^~~~~~~~
/usr/include/c++/10/bits/stl_bvector.h:740:31: note: no known conversion for argument 1 from 'int' to 'const std::vector<bool>&'
740 | operator=(const vector& __x)
| ~~~~~~~~~~~~~~^~~
/usr/include/c++/10/bits/stl_bvector.h:771:7: note: candidate: 'std::vector<bool, _Alloc>& std::vector<bool, _Alloc>::operator=(std::vector<bool, _Alloc>&&) [with _Alloc = std::allocator<bool>]'
771 | operator=(vector&& __x) noexcept(_Bit_alloc_traits::_S_nothrow_move())
| ^~~~~~~~
/usr/include/c++/10/bits/stl_bvector.h:771:26: note: no known conversion for argument 1 from 'int' to 'std::vector<bool>&&'
771 | operator=(vector&& __x) noexcept(_Bit_alloc_traits::_S_nothrow_move())
| ~~~~~~~~~^~~
/usr/include/c++/10/bits/stl_bvector.h:796:7: note: candidate: 'std::vector<bool, _Alloc>& std::vector<bool, _Alloc>::operator=(std::initializer_list<bool>) [with _Alloc = std::allocator<bool>]'
796 | operator=(initializer_list<bool> __l)
| ^~~~~~~~
/usr/include/c++/10/bits/stl_bvector.h:796:40: note: no known conversion for argument 1 from 'int' to 'std::initializer_list<bool>'
796 | operator=(initializer_list<bool> __l)
| ~~~~~~~~~~~~~~~~~~~~~~~^~~
main.cpp:33:47: error: no match for 'operator==' (operand types are 'std::vector<bool>' and 'int')
33 | if(v[l]==p[k]&&f[p[k]]==0)
| ~~~~~~~^~~
| | |
| | int
| std::vector<bool>
In file included from /usr/include/c++/10/iosfwd:40,
from /usr/include/c++/10/ios:38,
from /usr/include/c++/10/ostream:38,
from /usr/include/c++/10/iostream:39,
from main.cpp:1:
/usr/include/c++/10/bits/postypes.h:222:5: note: candidate: 'template<class _StateT> bool std::operator==(const std::fpos<_StateT>&, const std::fpos<_StateT>&)'
222 | operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs)
| ^~~~~~~~
/usr/include/c++/10/bits/postypes.h:222:5: note: template argument deduction/substitution failed:
main.cpp:33:49: note: 'std::vector<bool>' is not derived from 'const std::fpos<_StateT>'
33 | if(v[l]==p[k]&&f[p[k]]==0)
| ^
In file included from /usr/include/c++/10/bits/stl_algobase.h:64,
from /usr/include/c++/10/bits/char_traits.h:39,
from /usr/include/c++/10/ios:40,
from /usr/include/c++/10/ostream:38,
from /usr/include/c++/10/iostream:39,
from main.cpp:1:
/usr/include/c++/10/bits/stl_pair.h:466:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator==(const std::pair<_T1, _T2>&, const std::pair<_T1, _T2>&)'
466 | operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !