QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#118494#4303. New LevellarryzhongCompile Error//C++172.2kb2023-07-03 16:41:502023-07-03 16:41:51

Details

answer.code: In function ‘int main()’:
answer.code:66:41: error: no match for ‘operator[]’ (operand types are ‘std::tuple_element<1, std::pair<int, std::__cxx11::list<int> > >::type’ {aka ‘std::__cxx11::list<int>’} and ‘int’)
   66 |                 if (v.size() != d.size(v[0])) continue;
      |                                         ^
answer.code:78:35: error: no match for ‘operator[]’ (operand types are ‘std::tuple_element<1, std::pair<int, std::__cxx11::list<int> > >::type’ {aka ‘std::__cxx11::list<int>’} and ‘int’)
   78 |                 int bel = d.find(v[0]);
      |                                   ^
answer.code:83:58: error: no matching function for call to ‘std::__cxx11::list<int>::splice(std::__cxx11::list<int>::iterator, std::__cxx11::list<int>::iterator, std::__cxx11::list<int>::iterator)’
   83 |                                         group[bel].splice(group[bel].end(), group[bel2].begin(), group[bel2].end());
      |                                         ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/list:63,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:79,
                 from answer.code:1:
/usr/include/c++/11/bits/stl_list.h:1518:7: note: candidate: ‘void std::__cxx11::list<_Tp, _Alloc>::splice(std::__cxx11::list<_Tp, _Alloc>::const_iterator, std::__cxx11::list<_Tp, _Alloc>&&) [with _Tp = int; _Alloc = std::allocator<int>; std::__cxx11::list<_Tp, _Alloc>::const_iterator = std::__cxx11::list<int>::const_iterator]’
 1518 |       splice(const_iterator __position, list&& __x) noexcept
      |       ^~~~~~
/usr/include/c++/11/bits/stl_list.h:1518:7: note:   candidate expects 2 arguments, 3 provided
/usr/include/c++/11/bits/stl_list.h:1537:7: note: candidate: ‘void std::__cxx11::list<_Tp, _Alloc>::splice(std::__cxx11::list<_Tp, _Alloc>::const_iterator, std::__cxx11::list<_Tp, _Alloc>&) [with _Tp = int; _Alloc = std::allocator<int>; std::__cxx11::list<_Tp, _Alloc>::const_iterator = std::__cxx11::list<int>::const_iterator]’
 1537 |       splice(const_iterator __position, list& __x) noexcept
      |       ^~~~~~
/usr/include/c++/11/bits/stl_list.h:1537:7: note:   candidate expects 2 arguments, 3 provided
/usr/include/c++/11/bits/stl_list.h:1553:7: note: candidate: ‘void std::__cxx11::list<_Tp, _Alloc>::splice(std::__cxx11::list<_Tp, _Alloc>::const_iterator, std::__cxx11::list<_Tp, _Alloc>&&, std::__cxx11::list<_Tp, _Alloc>::const_iterator) [with _Tp = int; _Alloc = std::allocator<int>; std::__cxx11::list<_Tp, _Alloc>::const_iterator = std::__cxx11::list<int>::const_iterator]’
 1553 |       splice(const_iterator __position, list&& __x, const_iterator __i) noexcept
      |       ^~~~~~
/usr/include/c++/11/bits/stl_list.h:1553:48: note:   no known conversion for argument 2 from ‘std::__cxx11::list<int>::iterator’ to ‘std::__cxx11::list<int>&&’
 1553 |       splice(const_iterator __position, list&& __x, const_iterator __i) noexcept
      |                                         ~~~~~~~^~~
/usr/include/c++/11/bits/stl_list.h:1595:7: note: candidate: ‘void std::__cxx11::list<_Tp, _Alloc>::splice(std::__cxx11::list<_Tp, _Alloc>::const_iterator, std::__cxx11::list<_Tp, _Alloc>&, std::__cxx11::list<_Tp, _Alloc>::const_iterator) [with _Tp = int; _Alloc = std::allocator<int>; std::__cxx11::list<_Tp, _Alloc>::const_iterator = std::__cxx11::list<int>::const_iterator]’
 1595 |       splice(const_iterator __position, list& __x, const_iterator __i) noexcept
      |       ^~~~~~
/usr/include/c++/11/bits/stl_list.h:1595:47: note:   no known conversion for argument 2 from ‘std::__cxx11::list<int>::iterator’ to ‘std::__cxx11::list<int>&’
 1595 |       splice(const_iterator __position, list& __x, const_iterator __i) noexcept
      |                                         ~~~~~~^~~
/usr/include/c++/11/bits/stl_list.h:1614:7: note: candidate: ‘void std::__cxx11::list<_Tp, _Alloc>::splice(std::__cxx11::list<_Tp, _Alloc>::const_iterator, std::__cxx11::list<_Tp, _Alloc>&&, std::__cxx11::list<_Tp, _Alloc>::const_iterator, std::__cxx11::list<_Tp, _Alloc>::const_iterator) [with _Tp = int; _Alloc = std::allocator<int>; std::__cxx11::list<_Tp, _Alloc>::const_iterator = std::__cxx11::list<int>::const_iterator]’
 1614 |       splice(const_iterator __position, list&& __x, const_iterator __first,
      |       ^~~~~~
/usr/include/c++/11/bits/stl_list.h:1614:7: note:   candidate expects 4 arguments, 3 provided
/usr/include/c++/11/bits/stl_list.h:1664:7: note: candidate: ‘void std::__cxx11::list<_Tp, _Alloc>::splice(std::__cxx11::list<_Tp, _Alloc>::const_iterator, std::__cxx11::list<_Tp, _Alloc>&, std::__cxx11::list<_Tp, _Alloc>::const_iterator, std::__cxx11::list<_Tp, _Alloc>::const_iterator) [with _Tp = int; _Alloc = std::allocator<int>; std::__cxx11::list<_Tp, _Alloc>::const_iterator = std::__cxx11::list<int>::const_iterator]’
 1664 |       splice(const_iterator __position, list& __x, const_iterator __first,
      |       ^~~...