/ Vijos /

记录详情

Compile Error

In file included from /usr/include/c++/12/string:50,
                 from /usr/include/c++/12/bits/locale_classes.h:40,
                 from /usr/include/c++/12/bits/ios_base.h:41,
                 from /usr/include/c++/12/ios:42,
                 from /usr/include/c++/12/istream:38,
                 from /usr/include/c++/12/sstream:38,
                 from /usr/include/c++/12/complex:45,
                 from /usr/include/c++/12/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/12/bits/stdc++.h:54,
                 from /in/foo.cc:1:
/usr/include/c++/12/bits/stl_algobase.h: In instantiation of 'const _Tp& std::max(const _Tp&, const _Tp&) [with _Tp = Big]':
/in/foo.cc:190:18:   required from here
/usr/include/c++/12/bits/stl_algobase.h:259:15: error: no match for 'operator<' (operand types are 'const Big' and 'const Big')
  259 |       if (__a < __b)
      |           ~~~~^~~~~
/in/foo.cc:145:6: note: candidate: 'bool operator<(Big&, Big&)' (near match)
  145 | bool operator <(Big& a, Big &b) {
      |      ^~~~~~~~
/in/foo.cc:145:6: note:   conversion of argument 2 would be ill-formed:
/usr/include/c++/12/bits/stl_algobase.h:259:15: error: binding reference of type 'Big&' to 'const Big' discards qualifiers
  259 |       if (__a < __b)
      |           ~~~~^~~~~
In file included from /usr/include/c++/12/string:47:
/usr/include/c++/12/bits/stl_iterator.h:451:5: note: candidate: 'template<class _Iterator> bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
  451 |     operator<(const reverse_iterator<_Iterator>& __x,
      |     ^~~~~~~~
/usr/include/c++/12/bits/stl_iterator.h:451:5: note:   template argument deduction/substitution failed:
/usr/include/c++/12/bits/stl_algobase.h:259:15: note:   'const Big' is not derived from 'const std::reverse_iterator<_Iterator>'
  259 |       if (__a < __b)
      |           ~~~~^~~~~
/usr/include/c++/12/bits/stl_iterator.h:496:5: note: candidate: 'template<class _IteratorL, class _IteratorR> bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
  496 |     operator<(const reverse_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/include/c++/12/bits/stl_iterator.h:496:5: note:   template argument deduction/substitution failed:
/usr/include/c++/12/bits/stl_algobase.h:259:15: note:   'const Big' is not derived from 'const std::reverse_iterator<_Iterator>'
  259 |       if (__a < __b)
      |           ~~~~^~~~~
/usr/include/c++/12/bits/stl_iterator.h:1683:5: note: candidate: 'template<class _IteratorL, class _IteratorR> bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
 1683 |     operator<(const move_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/include/c++/12/bits/stl_iterator.h:1683:5: note:   template argument deduction/substitution failed:
/usr/include/c++/12/bits/stl_algobase.h:259:15: note:   'const Big' is not derived from 'const std::move_iterator<_IteratorL>'
  259 |       if (__a < __b)
      |           ~~~~^~~~~
/usr/include/c++/12/bits/stl_iterator.h:1748:5: note: candidate: 'template<class _Iterator> bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
 1748 |     operator<(const move_iterator<_Iterator>& __x,
      |     ^~~~~~~~
/usr/include/c++/12/bits/stl_iterator.h:1748:5: note:   template argument deduction/substitution failed:
/usr/include/c++/12/bits/stl_algobase.h:259:15: note:   'const Big' is not derived from 'const std::move_iterator<_IteratorL>'
  259 |       if (__a < __b)
      |           ~~~~^~~~~
In file included from /usr/include/c++/12/bits/stl_algobase.h:64:
/usr/include/c++/12/bits/stl_pair.h:663:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator<(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
  663 |     operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
      |     ^~~~~~~~
/usr/include/c++/12/bits/stl_pair.h:663:5: note:   template argument deduction/substitution failed:
/usr/include/c++/12/bits/stl_algobase.h:259:15: note:   'const Big' is not derived from 'const std::pair<_T1, _T2>'
  259 |       if (__a < __b)
      |           ~~~~^~~~~

信息

递交者
类型
自测
题目
P1779 国王游戏
语言
C++
递交时间
2025-06-03 14:31:42
评测时间
2025-06-03 14:31:42
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes