Compile Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:13:30: error: no match for 'operator>=' (operand types are 'int' and 'cy')
   13 |                 for(int j=T;j>=a[i];j--)
      |                             ~^~~~~~
      |                             |     |
      |                             int   cy
In file included from /usr/include/c++/12/regex:66,
                 from /usr/include/x86_64-linux-gnu/c++/12/bits/stdc++.h:110,
                 from /in/foo.cc:1:
/usr/include/c++/12/bits/regex.h:1125:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator>=(const sub_match<_BiIter>&, const sub_match<_BiIter>&)'
 1125 |     operator>=(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs)
      |     ^~~~~~~~
/usr/include/c++/12/bits/regex.h:1125:5: note:   template argument deduction/substitution failed:
/in/foo.cc:13:35: note:   mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int'
   13 |                 for(int j=T;j>=a[i];j--)
      |                                   ^
/usr/include/c++/12/bits/regex.h:1208:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator>=(__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const sub_match<_BiIter>&)'
 1208 |     operator>=(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/12/bits/regex.h:1208:5: note:   template argument deduction/substitution failed:
/in/foo.cc:13:35: note:   mismatched types 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>' and 'int'
   13 |                 for(int j=T;j>=a[i];j--)
      |                                   ^
/usr/include/c++/12/bits/regex.h:1301:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator>=(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)'
 1301 |     operator>=(const sub_match<_Bi_iter>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/12/bits/regex.h:1301:5: note:   template argument deduction/substitution failed:
/in/foo.cc:13:35: note:   mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int'
   13 |                 for(int j=T;j>=a[i];j--)
      |                                   ^
/usr/include/c++/12/bits/regex.h:1375:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator>=(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)'
 1375 |     operator>=(typename iterator_traits<_Bi_iter>::value_type const* __lhs,
      |     ^~~~~~~~
/usr/include/c++/12/bits/regex.h:1375:5: note:   template argument deduction/substitution failed:
/in/foo.cc:13:35: note:   'cy' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
   13 |                 for(int j=T;j>=a[i];j--)
      |                                   ^
/usr/include/c++/12/bits/regex.h:1469:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator>=(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)'
 1469 |     operator>=(const sub_match<_Bi_iter>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/12/bits/regex.h:1469:5: note:   template argument deduction/substitution failed:
/in/foo.cc:13:35: note:   mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int'
   13 |                 for(int j=T;j>=a[i];j--)
      |                                   ^
/usr/include/c++/12/bits/regex.h:1546:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator>=(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)'
 1546 |     operator>=(typename iterator_traits<_Bi_iter>::value_type const& __lhs,
      |     ^~~~~~~~
/usr/include/c++/12/bits/regex.h:1546:5: note:   template argument deduction/substitution failed:
/in/foo.cc:13:35: note:   'cy' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
   13 |                 for(int j=T;j>=a[i];j--)
      |                                   ^
/usr/include/c++/12/bits/regex.h:1646:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator>=(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)'
 1646 |     operator>=(const sub_match<_Bi_iter>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/12/bits/regex.h:1646:5: note:   template argument deduction/substitution failed:
/in/foo.cc:13:35: note:   mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int'
   13 |                 for(int j=T;j>=a[i];j--)
      |                                   ^
In file included from /usr/include/c++/12/string:47,
                 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:
/usr/include/c++/12/bits/stl_iterator.h:479:5: note: candidate: 'template<class _Iterator> bool std::operator>=(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
  479 |     operator>=(const reverse_iterator<_Iterator>& __x,
      |     ^~~~~~~~
/usr/include/c++/12/bits/stl_iterator.h:479:5: note:   template argument deduction/substitution failed:
/in/foo.cc:13:35: note:   mismatched types 'const std::reverse_iterator<_Iterator>' and 'int'
   13 |                 for(int j=T;j>=a[i];j--)
      |                                   ^
/usr/include/c++/12/bits/stl_iterator.h:523:5: note: candidate: 'template<class _IteratorL, class _IteratorR> bool std::operator>=(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
  523 |     operator>=(const reverse_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/include/c++/12/bits/stl_iterator.h:523:5: note:   template argument deduction/substitution failed:
/in/foo.cc:13:35: note:   mismatched types 'const std::reverse_iterator<_Iterator>' and 'int'
   13 |                 for(int j=T;j>=a[i];j--)
      |                                   ^
/usr/include/c++/12/bits/stl_iterator.h:1713:5: note: candidate: 'template<class _IteratorL, class _IteratorR> bool std::operator>=(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
 1713 |     operator>=(const move_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/include/c++/12/bits/stl_iterator.h:1713:5: note:   template argument deduction/substitution failed:
/in/foo.cc:13:35: note:   mismatched types 'const std::move_iterator<_IteratorL>' and 'int'
   13 |                 for(int j=T;j>=a[i];j--)
      |                                   ^
/usr/include/c++/12/bits/stl_iterator.h:1769:5: note: candidate: 'template<class _Iterator> bool std::operator>=(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
 1769 |     operator>=(const move_iterator<_Iterator>& __x,
      |     ^~~~~~~~
/usr/include/c++/12/bits/stl_iterator.h:1769:5: note:   template argument deduction/substitution failed:
/in/foo.cc:13:35: note:   mismatched types 'const std::move_iterator<_IteratorL>' and 'int'
   13 |                 for(int j=T;j>=a[i];j--)
      |                                   ^
In file included from /usr/include/c++/12/bits/stl_algobase.h:64,
                 from /usr/include/c++/12/string:50:
/usr/include/c++/12/bits/stl_pair.h:688:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator>=(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
  688 |     operator>=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
      |     ^~~~~~~~
/usr/include/c++/12/bits/stl_pair.h:688:5: note:   template argument deduction/substitution failed:
/in/foo.cc:13:35: note:   mismatched types 'const std::pair<_T1, _T2>' and 'int'
   13 |                 for(int j=T;j>=a[i];j--)
      |                                   ^
In file included from /usr/include/c++/12/string:53:
/usr/include/c++/12/bits/basic_string.h:3805:5: note: candidate: 'template<class _CharT, class _Traits, 

信息

递交者
类型
递交
题目
P1449 采药
语言
C++
递交时间
2026-02-24 09:36:02
评测时间
2026-02-24 09:36:02
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes