QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#79454 | #2464. Taxed Editor | GuanYunchang | Compile Error | / | / | C++ | 1.2kb | 2023-02-20 08:59:57 | 2023-02-20 08:59:58 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
詳細信息
answer.code:43:10: error: reference to ‘data’ is ambiguous 43 | bool cmp(data a, data b) { | ^~~~ In file included from /usr/include/c++/11/string:54, from /usr/include/c++/11/bits/locale_classes.h:40, from /usr/include/c++/11/bits/ios_base.h:41, from /usr/include/c++/11/ios:42, from /usr/include/c++/11/ostream:38, from /usr/include/c++/11/iostream:39, from answer.code:1: /usr/include/c++/11/bits/range_access.h:319:5: note: candidates are: ‘template<class _Tp> constexpr const _Tp* std::data(std::initializer_list<_Tp>)’ 319 | data(initializer_list<_Tp> __il) noexcept | ^~~~ /usr/include/c++/11/bits/range_access.h:310:5: note: ‘template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])’ 310 | data(_Tp (&__array)[_Nm]) noexcept | ^~~~ /usr/include/c++/11/bits/range_access.h:300:5: note: ‘template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)’ 300 | data(const _Container& __cont) noexcept(noexcept(__cont.data())) | ^~~~ /usr/include/c++/11/bits/range_access.h:290:5: note: ‘template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)’ 290 | data(_Container& __cont) noexcept(noexcept(__cont.data())) | ^~~~ answer.code:10:8: note: ‘struct data’ 10 | struct data{ | ^~~~ answer.code:43:18: error: reference to ‘data’ is ambiguous 43 | bool cmp(data a, data b) { | ^~~~ In file included from /usr/include/c++/11/string:54, from /usr/include/c++/11/bits/locale_classes.h:40, from /usr/include/c++/11/bits/ios_base.h:41, from /usr/include/c++/11/ios:42, from /usr/include/c++/11/ostream:38, from /usr/include/c++/11/iostream:39, from answer.code:1: /usr/include/c++/11/bits/range_access.h:319:5: note: candidates are: ‘template<class _Tp> constexpr const _Tp* std::data(std::initializer_list<_Tp>)’ 319 | data(initializer_list<_Tp> __il) noexcept | ^~~~ /usr/include/c++/11/bits/range_access.h:310:5: note: ‘template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])’ 310 | data(_Tp (&__array)[_Nm]) noexcept | ^~~~ /usr/include/c++/11/bits/range_access.h:300:5: note: ‘template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)’ 300 | data(const _Container& __cont) noexcept(noexcept(__cont.data())) | ^~~~ /usr/include/c++/11/bits/range_access.h:290:5: note: ‘template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)’ 290 | data(_Container& __cont) noexcept(noexcept(__cont.data())) | ^~~~ answer.code:10:8: note: ‘struct data’ 10 | struct data{ | ^~~~ answer.code:43:24: error: expression list treated as compound expression in initializer [-fpermissive] 43 | bool cmp(data a, data b) { | ^ In file included from /usr/include/c++/11/bits/stl_algobase.h:71, from /usr/include/c++/11/bits/char_traits.h:39, from /usr/include/c++/11/ios:40, from /usr/include/c++/11/ostream:38, from /usr/include/c++/11/iostream:39, from answer.code:1: /usr/include/c++/11/bits/predefined_ops.h: In instantiation of ‘constexpr bool __gnu_cxx::__ops::_Iter_comp_iter<_Compare>::operator()(_Iterator1, _Iterator2) [with _Iterator1 = data*; _Iterator2 = data*; _Compare = bool]’: /usr/include/c++/11/bits/stl_algo.h:82:17: required from ‘void std::__move_median_to_first(_Iterator, _Iterator, _Iterator, _Iterator, _Compare) [with _Iterator = data*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool>]’ /usr/include/c++/11/bits/stl_algo.h:1904:34: required from ‘_RandomAccessIterator std::__unguarded_partition_pivot(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = data*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool>]’ /usr/include/c++/11/bits/stl_algo.h:1938:38: required from ‘void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = data*; _Size = long int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool>]’ /usr/include/c++/11/bits/stl_algo.h:1954:25: required from ‘void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = data*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool>]’ /usr/include/c++/11/bits/stl_algo.h:4875:18: required from ‘void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = data*; _Compare = bool]’ answer.code:51:9: required from here /usr/include/c++/11/bits/predefined_ops.h:158:30: error:...