QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#577776#9313. Make MaxtrjCompile Error//C++234.3kb2024-09-20 14:44:222024-09-20 14:44:25

詳細信息

answer.code: In function ‘void solve()’:
answer.code:156:31: error: no matching function for call to ‘std::set<std::array<long long int, 3> >::insert(<brace-enclosed initializer list>)’
  156 |                         st.in ({a[i - 1], lst, i - 1});
      |                         ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/13/set:63,
                 from answer.code:6:
/usr/include/c++/13/bits/stl_set.h:568:9: note: candidate: ‘template<class _InputIterator> void std::set<_Key, _Compare, _Alloc>::insert(_InputIterator, _InputIterator) [with _Key = std::array<long long int, 3>; _Compare = std::less<std::array<long long int, 3> >; _Alloc = std::allocator<std::array<long long int, 3> >]’
  568 |         insert(_InputIterator __first, _InputIterator __last)
      |         ^~~~~~
/usr/include/c++/13/bits/stl_set.h:568:9: note:   template argument deduction/substitution failed:
answer.code:156:31: note:   candidate expects 2 arguments, 1 provided
  156 |                         st.in ({a[i - 1], lst, i - 1});
      |                         ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/13/bits/stl_set.h:511:7: note: candidate: ‘std::pair<typename std::_Rb_tree<_Key, _Key, std::_Identity<_Tp>, _Compare, typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key>::other>::const_iterator, bool> std::set<_Key, _Compare, _Alloc>::insert(const value_type&) [with _Key = std::array<long long int, 3>; _Compare = std::less<std::array<long long int, 3> >; _Alloc = std::allocator<std::array<long long int, 3> >; typename std::_Rb_tree<_Key, _Key, std::_Identity<_Tp>, _Compare, typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key>::other>::const_iterator = std::_Rb_tree<std::array<long long int, 3>, std::array<long long int, 3>, std::_Identity<std::array<long long int, 3> >, std::less<std::array<long long int, 3> >, std::allocator<std::array<long long int, 3> > >::const_iterator; typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key>::other = std::allocator<std::array<long long int, 3> >; typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key> = __gnu_cxx::__alloc_traits<std::allocator<std::array<long long int, 3> >, std::array<long long int, 3> >::rebind<std::array<long long int, 3> >; typename _Alloc::value_type = std::array<long long int, 3>; value_type = std::array<long long int, 3>]’
  511 |       insert(const value_type& __x)
      |       ^~~~~~
/usr/include/c++/13/bits/stl_set.h:511:32: note:   no known conversion for argument 1 from ‘<brace-enclosed initializer list>’ to ‘const std::set<std::array<long long int, 3> >::value_type&’ {aka ‘const std::array<long long int, 3>&’}
  511 |       insert(const value_type& __x)
      |              ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/13/bits/stl_set.h:520:7: note: candidate: ‘std::pair<typename std::_Rb_tree<_Key, _Key, std::_Identity<_Tp>, _Compare, typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key>::other>::const_iterator, bool> std::set<_Key, _Compare, _Alloc>::insert(value_type&&) [with _Key = std::array<long long int, 3>; _Compare = std::less<std::array<long long int, 3> >; _Alloc = std::allocator<std::array<long long int, 3> >; typename std::_Rb_tree<_Key, _Key, std::_Identity<_Tp>, _Compare, typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key>::other>::const_iterator = std::_Rb_tree<std::array<long long int, 3>, std::array<long long int, 3>, std::_Identity<std::array<long long int, 3> >, std::less<std::array<long long int, 3> >, std::allocator<std::array<long long int, 3> > >::const_iterator; typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key>::other = std::allocator<std::array<long long int, 3> >; typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key> = __gnu_cxx::__alloc_traits<std::allocator<std::array<long long int, 3> >, std::array<long long int, 3> >::rebind<std::array<long long int, 3> >; typename _Alloc::value_type = std::array<long long int, 3>; value_type = std::array<long long int, 3>]’
  520 |       insert(value_type&& __x)
      |       ^~~~~~
/usr/include/c++/13/bits/stl_set.h:520:27: note:   no known conversion for argument 1 from ‘<brace-enclosed initializer list>’ to ‘std::set<std::array<long long int, 3> >::value_type&&’ {aka ‘std::array<long long int, 3>&&’}
  520 |       insert(value_type&& __x)
      |              ~~~~~~~~~~~~~^~~
/usr/include/c++/13/bits/stl_set.h:548:7: note: candidate: ‘std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::insert(const_iterator, const value_type&) [with _Key = std::array<long long int, 3>; _Compare = std::less<std::array<long long int, 3> >; _Alloc = std::allocator<std::array<long long int, 3> >; iterator = std::_Rb_tree<std::array<long long int, 3>, std::array<long long int, 3>, std::_Identity<std::array<long long int, 3> >, std::less<std::array<long long int, 3> >, std::allocator<std::array<long long int, 3> > >::const_iterator; const_iterator = std::_Rb_tree<std::array<long long int, 3>, std::array<long long int, 3>, std::_Identity<std...