Borderou de evaluare (job #3259276)

Utilizator YuzukyIstrate Andreea Ruxandra Yuzuky Data 25 noiembrie 2024 17:05:20
Problema Ciclu Eulerian Status done
Runda Arhiva educationala Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In function 'void euler(int)': main.cpp:38:9: error: request for member 'push_back' in 'res', which is of non-class type 'std::vector<int> [100006]' 38 | res.push_back(node); | ^~~~~~~~~ main.cpp:40:14: error: no match for 'operator=' (operand types are 'std::vector<int>' and 'int') 40 | res[cnt]=node; | ^~~~ In file included from /usr/include/c++/12.2.1/vector:70, from main.cpp:3: /usr/include/c++/12.2.1/bits/vector.tcc:204:5: note: candidate: 'constexpr std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = int; _Alloc = std::allocator<int>]' 204 | vector<_Tp, _Alloc>:: | ^~~~~~~~~~~~~~~~~~~ /usr/include/c++/12.2.1/bits/vector.tcc:205:42: note: no known conversion for argument 1 from 'int' to 'const std::vector<int>&' 205 | operator=(const vector<_Tp, _Alloc>& __x) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ In file included from /usr/include/c++/12.2.1/vector:64: /usr/include/c++/12.2.1/bits/stl_vector.h:761:7: note: candidate: 'constexpr std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = int; _Alloc = std::allocator<int>]' 761 | operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move()) | ^~~~~~~~ /usr/include/c++/12.2.1/bits/stl_vector.h:761:26: note: no known conversion for argument 1 from 'int' to 'std::vector<int>&&' 761 | operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move()) | ~~~~~~~~~^~~ /usr/include/c++/12.2.1/bits/stl_vector.h:783:7: note: candidate: 'constexpr std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = int; _Alloc = std::allocator<int>]' 783 | operator=(initializer_list<value_type> __l) | ^~~~~~~~ /usr/include/c++/12.2.1/bits/stl_vector.h:783:46: note: no known conversion for argument 1 from 'int' to 'std::initializer_list<int>' 783 | operator=(initializer_list<value_type> __l) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ main.cpp: In function 'int main()': main.cpp:46:5: error: 'vis' was not declared in this scope 46 | vis.resize(n+1); | ^~~ main.cpp:47:5: error: 'graf' was not declared in this scope 47 | graf.resize(n+1); | ^~~~ main.cpp:52:9: error: 'v' was not declared in this scope 52 | v[x].push_back(i); | ^ Non zero exit status: 1

Ceva nu functioneaza?