Borderou de evaluare (job #2787833)
| Utilizator | Data | 24 octombrie 2021 10:19:32 | |
|---|---|---|---|
| Problema | Parcurgere DFS - componente conexe | Status | done |
| Runda | Arhiva educationala | Compilator | cpp-64 | Vezi sursa |
| Scor | 0 | ||
Raport evaluator
Eroare de compilare:
main.cpp: In function 'void DFS(int)':
main.cpp:10:8: error: no match for 'operator=' (operand types are 'std::vector<bool>' and 'int')
10 | v[x]=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:13:10: error: no match for 'operator!' (operand type is 'std::vector<bool>')
13 | {if (!v[i]) DFS(i);
| ^~~~~
main.cpp:13:10: note: candidate: 'operator!(bool)' (built-in)
main.cpp:13:10: note: no known conversion for argument 1 from 'std::vector<bool>' to 'bool'
main.cpp:9:7: warning: unused variable 'i' [-Wunused-variable]
9 | { int i;
| ^
main.cpp: In function 'int main()':
main.cpp:26:9: error: no match for 'operator!' (operand type is 'std::vector<bool>')
26 | {if(!v[i])
| ^~~~~
main.cpp:26:9: note: candidate: 'operator!(bool)' (built-in)
main.cpp:26:9: note: no known conversion for argument 1 from 'std::vector<bool>' to 'bool'
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !
