QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#65226#4809. Maximum Rangexyz4531Compile Error//C++208.9kb2022-11-28 07:15:362022-11-28 07:15:39

Details

In file included from /usr/include/c++/11/cassert:44,
                 from answer.code:4:
answer.code: In function ‘int main()’:
answer.code:346:40: error: no matching function for call to ‘std::set<std::pair<int, int> >::find(int&, int&)’
  346 |                         assert(sto.find(from, to) == sto.end());
      |                                ~~~~~~~~^~~~~~~~~~
In file included from /usr/include/c++/11/set:61,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:87,
                 from answer.code:1:
/usr/include/c++/11/bits/stl_set.h:804:9: note: candidate: ‘template<class _Kt> decltype (std::set<_Key, _Compare, _Alloc>::iterator{((std::set<_Key, _Compare, _Alloc>*)this)->std::set<_Key, _Compare, _Alloc>::_M_t._M_find_tr(__x)}) std::set<_Key, _Compare, _Alloc>::find(const _Kt&) [with _Kt = _Kt; _Key = std::pair<int, int>; _Compare = std::less<std::pair<int, int> >; _Alloc = std::allocator<std::pair<int, int> >]’
  804 |         find(const _Kt& __x)
      |         ^~~~
/usr/include/c++/11/bits/stl_set.h:804:9: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/11/cassert:44,
                 from answer.code:4:
answer.code:346:40: note:   candidate expects 1 argument, 2 provided
  346 |                         assert(sto.find(from, to) == sto.end());
      |                                ~~~~~~~~^~~~~~~~~~
In file included from /usr/include/c++/11/set:61,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:87,
                 from answer.code:1:
/usr/include/c++/11/bits/stl_set.h:810:9: note: candidate: ‘template<class _Kt> decltype (std::set<_Key, _Compare, _Alloc>::const_iterator{((const std::set<_Key, _Compare, _Alloc>*)this)->std::set<_Key, _Compare, _Alloc>::_M_t._M_find_tr(__x)}) std::set<_Key, _Compare, _Alloc>::find(const _Kt&) const [with _Kt = _Kt; _Key = std::pair<int, int>; _Compare = std::less<std::pair<int, int> >; _Alloc = std::allocator<std::pair<int, int> >]’
  810 |         find(const _Kt& __x) const
      |         ^~~~
/usr/include/c++/11/bits/stl_set.h:810:9: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/11/cassert:44,
                 from answer.code:4:
answer.code:346:40: note:   candidate expects 1 argument, 2 provided
  346 |                         assert(sto.find(from, to) == sto.end());
      |                                ~~~~~~~~^~~~~~~~~~
In file included from /usr/include/c++/11/set:61,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:87,
                 from answer.code:1:
/usr/include/c++/11/bits/stl_set.h:794:7: note: candidate: ‘std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::find(const key_type&) [with _Key = std::pair<int, int>; _Compare = std::less<std::pair<int, int> >; _Alloc = std::allocator<std::pair<int, int> >; std::set<_Key, _Compare, _Alloc>::iterator = std::_Rb_tree<std::pair<int, int>, std::pair<int, int>, std::_Identity<std::pair<int, int> >, std::less<std::pair<int, int> >, std::allocator<std::pair<int, int> > >::const_iterator; std::set<_Key, _Compare, _Alloc>::key_type = std::pair<int, int>]’
  794 |       find(const key_type& __x)
      |       ^~~~
/usr/include/c++/11/bits/stl_set.h:794:7: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/11/bits/stl_set.h:798:7: note: candidate: ‘std::set<_Key, _Compare, _Alloc>::const_iterator std::set<_Key, _Compare, _Alloc>::find(const key_type&) const [with _Key = std::pair<int, int>; _Compare = std::less<std::pair<int, int> >; _Alloc = std::allocator<std::pair<int, int> >; std::set<_Key, _Compare, _Alloc>::const_iterator = std::_Rb_tree<std::pair<int, int>, std::pair<int, int>, std::_Identity<std::pair<int, int> >, std::less<std::pair<int, int> >, std::allocator<std::pair<int, int> > >::const_iterator; std::set<_Key, _Compare, _Alloc>::key_type = std::pair<int, int>]’
  798 |       find(const key_type& __x) const
      |       ^~~~
/usr/include/c++/11/bits/stl_set.h:798:7: note:   candidate expects 1 argument, 2 provided