Borderou de evaluare (job #2668164)

Utilizator BulaceanuAlexandraBulaceanu Alexandra-Irina BulaceanuAlexandra Data 4 noiembrie 2020 16:23:58
Problema BFS - Parcurgere in latime Status done
Runda Arhiva educationala Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In function 'void bfs(int)': main.cpp:14:14: error: no match for 'operator=' (operand types are 'std::vector<int>' and 'int') nrArce[s] = 0; ^ In file included from /usr/include/c++/6/vector:69:0, from /usr/include/c++/6/queue:61, from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:86, from main.cpp:1: /usr/include/c++/6/bits/vector.tcc:167:5: note: candidate: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = int; _Alloc = std::allocator<int>] vector<_Tp, _Alloc>:: ^~~~~~~~~~~~~~~~~~~ /usr/include/c++/6/bits/vector.tcc:167:5: note: no known conversion for argument 1 from 'int' to 'const std::vector<int>&' In file included from /usr/include/c++/6/vector:64:0, from /usr/include/c++/6/queue:61, from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:86, from main.cpp:1: /usr/include/c++/6/bits/stl_vector.h:450:7: note: candidate: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = int; _Alloc = std::allocator<int>] operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move()) ^~~~~~~~ /usr/include/c++/6/bits/stl_vector.h:450:7: note: no known conversion for argument 1 from 'int' to 'std::vector<int>&&' /usr/include/c++/6/bits/stl_vector.h:471:7: note: candidate: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = int; _Alloc = std::allocator<int>] operator=(initializer_list<value_type> __l) ^~~~~~~~ /usr/include/c++/6/bits/stl_vector.h:471:7: note: no known conversion for argument 1 from 'int' to 'std::initializer_list<int>' main.cpp:23:40: error: no match for 'operator+' (operand types are 'std::vector<int>' and 'int') nrArce[nod_curent] = nrArce[vecin] + 1; ~~~~~~~~~~~~~~^~~ In file included from /usr/include/c++/6/bits/stl_algobase.h:67:0, from /usr/include/c++/6/bits/char_traits.h:39, from /usr/include/c++/6/ios:40, from /usr/include/c++/6/istream:38, from /usr/include/c++/6/sstream:38, from /usr/include/c++/6/complex:45, from /usr/include/c++/6/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:52, from main.cpp:1: /usr/include/c++/6/bits/stl_iterator.h:341:5: note: candidate: template<class _Iterator> std::reverse_iterator<_Iterator> std::operator+(typename std::reverse_iterator<_Iterator>::difference_type, const std::reverse_iterator<_Iterator>&) operator+(typename reverse_iterator<_Iterator>::difference_type __n, ^~~~~~~~ /usr/include/c++/6/bits/stl_iterator.h:341:5: note: template argument deduction/substitution failed: main.cpp:23:42: note: mismatched types 'const std::reverse_iterator<_Iterator>' and 'int' nrArce[nod_curent] = nrArce[vecin] + 1; ^ In file included from /usr/include/c++/6/bits/stl_algobase.h:67:0, from /usr/include/c++/6/bits/char_traits.h:39, from /usr/include/c++/6/ios:40, from /usr/include/c++/6/istream:38, from /usr/include/c++/6/sstream:38, from /usr/include/c++/6/complex:45, from /usr/include/c++/6/ccomplex:39, Non zero exit status: 1

Ceva nu functioneaza?