QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#79451 | #2464. Taxed Editor | HuangHanSheng | Compile Error | / | / | C++17 | 1.2kb | 2023-02-20 08:58:17 | 2023-02-20 08:58:18 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
详细
answer.code:42:10: error: reference to ‘data’ is ambiguous 42 | 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:9:8: note: ‘struct data’ 9 | struct data{ | ^~~~ answer.code:42:18: error: reference to ‘data’ is ambiguous 42 | 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:9:8: note: ‘struct data’ 9 | struct data{ | ^~~~ answer.code:42:24: error: expression list treated as compound expression in initializer [-fpermissive] 42 | bool cmp(data a, data b) { | ^ answer.code: In function ‘int main()’: answer.code:50:5: error: ‘sort’ was not declared in this scope; did you mean ‘short’? 50 | sort(p+1, p+1+n, cmp); | ^~~~ | short