Borderou de evaluare (job #3217914)

Utilizator Mihai_OctMihai Octavian Mihai_Oct Data 25 martie 2024 10:04:23
Problema Planificare Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In function 'int main()': main.cpp:22:38: error: no matching function for call to 'std::multiset<Interval>::insert(int)' 22 | for(i = 1; i <= k; i++) tv.insert(0); | ~~~~~~~~~^~~ In file included from /usr/include/c++/12.2.1/set:62, from /usr/include/c++/12.2.1/x86_64-pc-linux-gnu/bits/stdc++.h:87, from main.cpp:1: /usr/include/c++/12.2.1/bits/stl_multiset.h:552:9: note: candidate: 'template<class _InputIterator> void std::multiset<_Key, _Compare, _Alloc>::insert(_InputIterator, _InputIterator) [with _Key = Interval; _Compare = std::less<Interval>; _Alloc = std::allocator<Interval>]' 552 | insert(_InputIterator __first, _InputIterator __last) | ^~~~~~ /usr/include/c++/12.2.1/bits/stl_multiset.h:552:9: note: template argument deduction/substitution failed: main.cpp:22:38: note: candidate expects 2 arguments, 1 provided 22 | for(i = 1; i <= k; i++) tv.insert(0); | ~~~~~~~~~^~~ /usr/include/c++/12.2.1/bits/stl_multiset.h:503:7: note: candidate: 'std::multiset<_Key, _Compare, _Alloc>::iterator std::multiset<_Key, _Compare, _Alloc>::insert(const value_type&) [with _Key = Interval; _Compare = std::less<Interval>; _Alloc = std::allocator<Interval>; iterator = std::_Rb_tree<Interval, Interval, std::_Identity<Interval>, std::less<Interval>, std::allocator<Interval> >::const_iterator; value_type = Interval]' 503 | insert(const value_type& __x) | ^~~~~~ /usr/include/c++/12.2.1/bits/stl_multiset.h:503:32: note: no known conversion for argument 1 from 'int' to 'const std::multiset<Interval>::value_type&' {aka 'const Interval&'} 503 | insert(const value_type& __x) | ~~~~~~~~~~~~~~~~~~^~~ /usr/include/c++/12.2.1/bits/stl_multiset.h:508:7: note: candidate: 'std::multiset<_Key, _Compare, _Alloc>::iterator std::multiset<_Key, _Compare, _Alloc>::insert(value_type&&) [with _Key = Interval; _Compare = std::less<Interval>; _Alloc = std::allocator<Interval>; iterator = std::_Rb_tree<Interval, Interval, std::_Identity<Interval>, std::less<Interval>, std::allocator<Interval> >::const_iterator; value_type = Interval]' 508 | insert(value_type&& __x) | ^~~~~~ /usr/include/c++/12.2.1/bits/stl_multiset.h:508:27: note: no known conversion for argument 1 from 'int' to 'std::multiset<Interval>::value_type&&' {aka 'Interval&&'} 508 | insert(value_type&& __x) | ~~~~~~~~~~~~~^~~ /usr/include/c++/12.2.1/bits/stl_multiset.h:533:7: note: candidate: 'std::multiset<_Key, _Compare, _Alloc>::iterator std::multiset<_Key, _Compare, _Alloc>::insert(const_iterator, const value_type&) [with _Key = Interval; _Compare = std::less<Interval>; _Alloc = std::allocator<Interval>; iterator = std::_Rb_tree<Interval, Interval, std::_Identity<Interval>, std::less<Interval>, std::allocator<Interval> >::const_iterator; const_iterator = std::_Rb_tree<Interval, Interval, std::_Identity<Interval>, std::less<Interval>, std::allocator<Interval> >::const_iterator; value_type = Interval]' 533 | insert(const_iterator __position, const value_type& __x) | ^~~~~~ /usr/include/c++/12.2.1/bits/stl_multiset.h:533:7: note: candidate expects 2 arguments, 1 provided /usr/include/c++/12.2.1/bits/stl_multiset.h:538:7: note: candidate: 'std::multiset<_Key, _Compare, _Alloc>::iterator std::multiset<_Key, _Compare, _Alloc>::insert(const_iterator, value_type&&) [with _Key = Interval; _Compare = std::less<Interval>; _Alloc = std::allocator<Interval>; iterator = std::_Rb_tree<Interval, Interval, std::_Identity<Interval>, std::less<Interval>, std::allocator<Interval> >::const_iterator; const_iterator = std::_Rb_tree<Interval, Interval, std::_Identity<Interval>, std::less<Interval>, std::allocator<Interval> >::const_iterator; value_type = Interval]' 538 | insert(const_iterator __position, value_type&& __x) | ^~~~~~ /usr/include/c++/12.2.1/bits/stl_multiset.h:538:7: note: candidate expects 2 arguments, 1 provided /usr/include/c++/12.2.1/bits/stl_multiset.h:564:7: note: candidate: 'void std::multiset<_Key, _Compare, _Alloc>::insert(std::initializer_list<_Tp>) [with _Key = Interval; _Compare = std::less<Interval>; _Alloc = std::allocator<Interval>]' 564 | insert(initializer_list<value_type> __l) | ^~~~~~ /usr/include/c++/12.2.1/bits/stl_multiset.h:564:43: note: no known conversion for argument 1 from 'int' to 'std::initializer_list<Interval>' 564 | insert(initializer_list<value_type> __l) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ /usr/include/c++/12.2.1/bits/stl_multiset.h:584:7: note: candidate: 'std::multiset<_Key, _Compare, _Alloc>::iterator std::multiset<_Key, _Compare, _Alloc>::insert(node_type&&) [with _Key = Interval; _Compare = std::less<Interval>; _Alloc = std::allocator<Interval>; iterator = std::_Rb_tree<Interval, Interval, std::_Identity<Interval>, std::less<Interval>, std::allocator<Interval> >::const_iterator; node_type = std::_Rb_tree<Interval, Interval, std::_Identity<Interval>, std::less<Interval>, std::allocator<Interval> >::node_type]' 584 | insert(node_type&& __nh) | ^~~~~~ /usr/include/c++/12.2.1/bits/stl_multiset.h:584:26: note: no known conversion for argument 1 from 'int' to 'std::multiset<Interval>::node_type&&' {aka 'std::_Rb_tree<Interval, Interval, std::_Identity<Interval>, std::less<Interval>, std::allocator<Interval> >::node_type&&'} 584 | insert(node_type&& __nh) | ~~~~~~~~~~~~^~~~ /usr/include/c++/12.2.1/bits/stl_multiset.h:589:7: note: candidate: 'std::multiset<_Key, _Compare, _Alloc>::iterator std::multiset<_Key, _Compare, _Alloc>::insert(const_iterator, node_type&&) [with _Key = Interval; _Compare = std::less<Interval>; _Alloc = std::allocator<Interval>; iterator = std::_Rb_tree<Interval, Interval, std::_Identity<Interval>, std::less<Interval>, std::allocator<Interval> >::const_iterator; const_iterator = std::_Rb_tree<Interval, Interval, std::_Identity<Interval>, std::less<Interval>, std::allocator<Interval> >::const_iterator; node_type = std::_Rb_tree<Interval, Interval, std::_Identity<Interval>, std::less<Interval>, std::allocator<Interval> >::node_type]' 589 | insert(const_iterator __hint, node_type&& __nh) | ^~~~~~ /usr/include/c++/12.2.1/bits/stl_multiset.h:589:7: note: candidate expects 2 arguments, 1 provided Non zero exit status: 1

Ceva nu functioneaza?