Borderou de evaluare (job #2905831)

Utilizator TindecheTindeche Alexandru Tindeche Data 23 mai 2022 21:40:17
Problema Heapuri cu reuniune Status done
Runda Arhiva educationala Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In function 'int main()': main.cpp:152:36: error: cannot convert 'std::vector<Node*>' to 'Node*' 152 | sets[x] = insert(sets[x], y); | ~~~~~~^ | | | std::vector<Node*> main.cpp:105:21: note: initializing argument 1 of 'Node* insert(Node*, int)' 105 | Node *insert(Node * a, int key) | ~~~~~~~^ main.cpp:157:29: error: base operand of '->' has non-pointer type 'std::vector<Node*>' 157 | fout << sets[x] -> root() << '\n'; | ^~ main.cpp:158:43: error: base operand of '->' has non-pointer type 'std::vector<Node*>' 158 | sets[x] = delete_root(sets[x] -> getLChild()); | ^~ main.cpp:163:35: error: cannot convert 'std::vector<Node*>' to 'Node*' 163 | sets[x] = merge(sets[x], sets[y]); | ~~~~~~^ | | | std::vector<Node*> main.cpp:92:19: note: initializing argument 1 of 'Node* merge(Node*, Node*)' 92 | Node *merge(Node *a, Node *b) | ~~~~~~^ main.cpp:164:23: error: no match for 'operator=' (operand types are 'std::vector<Node*>' and 'std::nullptr_t') 164 | sets[y] = nullptr; | ^~~~~~~ In file included from /usr/include/c++/10/vector:72, from main.cpp:3: /usr/include/c++/10/bits/vector.tcc:198:5: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = Node*; _Alloc = std::allocator<Node*>]' 198 | vector<_Tp, _Alloc>:: | ^~~~~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/vector.tcc:199:42: note: no known conversion for argument 1 from 'std::nullptr_t' to 'const std::vector<Node*>&' 199 | operator=(const vector<_Tp, _Alloc>& __x) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ In file included from /usr/include/c++/10/vector:67, from main.cpp:3: /usr/include/c++/10/bits/stl_vector.h:709:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = Node*; _Alloc = std::allocator<Node*>]' 709 | operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move()) | ^~~~~~~~ /usr/include/c++/10/bits/stl_vector.h:709:26: note: no known conversion for argument 1 from 'std::nullptr_t' to 'std::vector<Node*>&&' 709 | operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move()) | ~~~~~~~~~^~~ /usr/include/c++/10/bits/stl_vector.h:730:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = Node*; _Alloc = std::allocator<Node*>]' 730 | operator=(initializer_list<value_type> __l) | ^~~~~~~~ /usr/include/c++/10/bits/stl_vector.h:730:46: note: no known conversion for argument 1 from 'std::nullptr_t' to 'std::initializer_list<Node*>' 730 | operator=(initializer_list<value_type> __l) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ Non zero exit status: 1

Ceva nu functioneaza?