Borderou de evaluare (job #822815)

Utilizator avatar LukiLuck Obretin Luca Andrei LukiLuck IP ascuns
Problemă Pav Compilator cpp-32
Rundă Arhiva de probleme Status evaluat
Dată 7 mai 2025 14:19:35 Scor 0

Raport evaluator

Eroare de compilare: main.cpp:26:6: error: redefinition of 'void dfs(int, int)' 26 | void dfs(int nod,int niv){ | ^~~ main.cpp:16:6: note: 'void dfs(int, int)' previously defined here 16 | void dfs(int nod,int niv){ | ^~~ main.cpp: In function 'int main()': main.cpp:43:17: error: no match for 'operator=' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<std::vector<int> >, std::vector<int> >::value_type' {aka 'std::vector<int>'} and 'int') 43 | graf[x]=y; | ^ In file included from /usr/lib/gcc/i686-pc-linux-gnu/14/include/g++-v14/vector:72, from /usr/lib/gcc/i686-pc-linux-gnu/14/include/g++-v14/queue:63, from /usr/lib/gcc/i686-pc-linux-gnu/14/include/g++-v14/i686-pc-linux-gnu/bits/stdc++.h:157, from main.cpp:2: /usr/lib/gcc/i686-pc-linux-gnu/14/include/g++-v14/bits/vector.tcc:210:5: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = int; _Alloc = std::allocator<int>]' 210 | vector<_Tp, _Alloc>:: | ^~~~~~~~~~~~~~~~~~~ /usr/lib/gcc/i686-pc-linux-gnu/14/include/g++-v14/bits/vector.tcc:211:42: note: no known conversion for argument 1 from 'int' to 'const std::vector<int>&' 211 | operator=(const vector<_Tp, _Alloc>& __x) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ In file included from /usr/lib/gcc/i686-pc-linux-gnu/14/include/g++-v14/vector:66: /usr/lib/gcc/i686-pc-linux-gnu/14/include/g++-v14/bits/stl_vector.h:766:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = int; _Alloc = std::allocator<int>]' 766 | operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move()) | ^~~~~~~~ /usr/lib/gcc/i686-pc-linux-gnu/14/include/g++-v14/bits/stl_vector.h:766:26: note: no known conversion for argument 1 from 'int' to 'std::vector<int>&&' 766 | operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move()) | ~~~~~~~~~^~~ /usr/lib/gcc/i686-pc-linux-gnu/14/include/g++-v14/bits/stl_vector.h:788:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = int; _Alloc = std::allocator<int>]' 788 | operator=(initializer_list<value_type> __l) | ^~~~~~~~ /usr/lib/gcc/i686-pc-linux-gnu/14/include/g++-v14/bits/stl_vector.h:788:46: note: no known conversion for argument 1 from 'int' to 'std::initializer_list<int>' 788 | operator=(initializer_list<value_type> __l) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ main.cpp:44:17: error: no match for 'operator=' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<std::vector<int> >, std::vector<int> >::value_type' {aka 'std::vector<int>'} and 'int') 44 | graf[y]=x; | ^ /usr/lib/gcc/i686-pc-linux-gnu/14/include/g++-v14/bits/vector.tcc:210:5: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = int; _Alloc = std::allocator<int>]' 210 | vector<_Tp, _Alloc>:: | ^~~~~~~~~~~~~~~~~~~ /usr/lib/gcc/i686-pc-linux-gnu/14/include/g++-v14/bits/vector.tcc:211:42: note: no known conversion for argument 1 from 'int' to 'const std::vector<int>&' 211 | operator=(const vector<_Tp, _Alloc>& __x) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ /usr/lib/gcc/i686-pc-linux-gnu/14/include/g++-v14/bits/stl_vector.h:766:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = int; _Alloc = std::allocator<int>]' 766 | operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move()) | ^~~~~~~~ /usr/lib/gcc/i686-pc-linux-gnu/14/include/g++-v14/bits/stl_vector.h:766:26: note: no known conversion for argument 1 from 'int' to 'std::vector<int>&&' 766 | operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move()) | ~~~~~~~~~^~~ /usr/lib/gcc/i686-pc-linux-gnu/14/include/g++-v14/bits/stl_vector.h:788:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = int; _Alloc = std::allocator<int>]' 788 | operator=(initializer_list<value_type> __l)