QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#424392 | #8732. Zečevi | monstersqwq | Compile Error | / | / | C++17 | 5.5kb | 2024-05-29 09:11:41 | 2024-05-29 09:11:43 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
詳細信息
answer.code:81:8: error: reference to ‘data’ is ambiguous 81 | ll cal(data x){if(x.ct) return x.b/x.ct;else if(x.b<0) return 0;else return 2e9;} | ^~~~ In file included from /usr/include/c++/13/string:53, from answer.code:4: /usr/include/c++/13/bits/range_access.h:346:5: note: candidates are: ‘template<class _Tp> constexpr const _Tp* std::data(initializer_list<_Tp>)’ 346 | data(initializer_list<_Tp> __il) noexcept | ^~~~ /usr/include/c++/13/bits/range_access.h:336:5: note: ‘template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])’ 336 | data(_Tp (&__array)[_Nm]) noexcept | ^~~~ /usr/include/c++/13/bits/range_access.h:325:5: note: ‘template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)’ 325 | data(const _Container& __cont) noexcept(noexcept(__cont.data())) | ^~~~ /usr/include/c++/13/bits/range_access.h:314:5: note: ‘template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)’ 314 | data(_Container& __cont) noexcept(noexcept(__cont.data())) | ^~~~ answer.code:70:8: note: ‘struct data’ 70 | struct data | ^~~~ answer.code: In function ‘bool del(int, ll, ll)’: answer.code:95:36: error: ‘cal’ cannot be used as a function 95 | Q.push({cal(h[ct]),ct});return 1; | ~~~^~~~~~~ answer.code:95:31: error: no matching function for call to ‘std::priority_queue<std::pair<long long int, long long int>, std::vector<std::pair<long long int, long long int> >, std::greater<std::pair<long long int, long long int> > >::push(<brace-enclosed initializer list>)’ 95 | Q.push({cal(h[ct]),ct});return 1; | ~~~~~~^~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/13/queue:66, from answer.code:13: /usr/include/c++/13/bits/stl_queue.h:738:7: note: candidate: ‘void std::priority_queue<_Tp, _Sequence, _Compare>::push(const value_type&) [with _Tp = std::pair<long long int, long long int>; _Sequence = std::vector<std::pair<long long int, long long int> >; _Compare = std::greater<std::pair<long long int, long long int> >; value_type = std::pair<long long int, long long int>]’ 738 | push(const value_type& __x) | ^~~~ /usr/include/c++/13/bits/stl_queue.h:738:30: note: no known conversion for argument 1 from ‘<brace-enclosed initializer list>’ to ‘const std::priority_queue<std::pair<long long int, long long int>, std::vector<std::pair<long long int, long long int> >, std::greater<std::pair<long long int, long long int> > >::value_type&’ {aka ‘const std::pair<long long int, long long int>&’} 738 | push(const value_type& __x) | ~~~~~~~~~~~~~~~~~~^~~ /usr/include/c++/13/bits/stl_queue.h:746:7: note: candidate: ‘void std::priority_queue<_Tp, _Sequence, _Compare>::push(value_type&&) [with _Tp = std::pair<long long int, long long int>; _Sequence = std::vector<std::pair<long long int, long long int> >; _Compare = std::greater<std::pair<long long int, long long int> >; value_type = std::pair<long long int, long long int>]’ 746 | push(value_type&& __x) | ^~~~ /usr/include/c++/13/bits/stl_queue.h:746:25: note: no known conversion for argument 1 from ‘<brace-enclosed initializer list>’ to ‘std::priority_queue<std::pair<long long int, long long int>, std::vector<std::pair<long long int, long long int> >, std::greater<std::pair<long long int, long long int> > >::value_type&&’ {aka ‘std::pair<long long int, long long int>&&’} 746 | push(value_type&& __x) | ~~~~~~~~~~~~~^~~ answer.code:99:28: error: ‘cal’ cannot be used as a function 99 | Q.push({cal(h[ct]),ct}); | ~~~^~~~~~~ answer.code:99:23: error: no matching function for call to ‘std::priority_queue<std::pair<long long int, long long int>, std::vector<std::pair<long long int, long long int> >, std::greater<std::pair<long long int, long long int> > >::push(<brace-enclosed initializer list>)’ 99 | Q.push({cal(h[ct]),ct}); | ~~~~~~^~~~~~~~~~~~~~~~~ /usr/include/c++/13/bits/stl_queue.h:738:7: note: candidate: ‘void std::priority_queue<_Tp, _Sequence, _Compare>::push(const value_type&) [with _Tp = std::pair<long long int, long long int>; _Sequence = std::vector<std::pair<long long int, long long int> >; _Compare = std::greater<std::pair<long long int, long long int> >; value_type = std::pair<long long int, long long int>]’ 738 | push(const value_type& __x) | ^~~~ /usr/include/c++/13/bits/stl_queue.h:738:30: note: no known conversion for argument 1 from ‘<brace-enclosed initializer list>’ to ‘const std::priority_queue<std::pair<long long int, long long int>, std::vector<std::pair<long long int, long long int> >,...