QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#397438 | #4804. Regular Expression | ucup-team2335# | Compile Error | / | / | C++17 | 866b | 2024-04-24 08:47:49 | 2024-04-24 08:47:50 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
詳細信息
answer.code:4:22: error: ‘ranges’ is not a namespace-name 4 | using namespace std::ranges; | ^~~~~~ answer.code: In function ‘int main()’: answer.code:39:25: error: no matching function for call to ‘count(std::string&, __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type&)’ 39 | if(count(s, s[0]) == size(s)) { | ~~~~~^~~~~~~~~ In file included from /usr/include/c++/13/algorithm:61, from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:51, from answer.code:1: /usr/include/c++/13/bits/stl_algo.h:4072:5: note: candidate: ‘template<class _IIter, class _Tp> typename std::iterator_traits< <template-parameter-1-1> >::difference_type std::count(_IIter, _IIter, const _Tp&)’ 4072 | count(_InputIterator __first, _InputIterator __last, const _Tp& __value) | ^~~~~ /usr/include/c++/13/bits/stl_algo.h:4072:5: note: template argument deduction/substitution failed: answer.code:39:25: note: deduced conflicting types for parameter ‘_IIter’ (‘std::__cxx11::basic_string<char>’ and ‘char’) 39 | if(count(s, s[0]) == size(s)) { | ~~~~~^~~~~~~~~ In file included from /usr/include/c++/13/algorithm:73: /usr/include/c++/13/pstl/glue_algorithm_defs.h:101:1: note: candidate: ‘template<class _ExecutionPolicy, class _ForwardIterator, class _Tp> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, typename std::iterator_traits<_II>::difference_type> std::count(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, const _Tp&)’ 101 | count(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value); | ^~~~~ /usr/include/c++/13/pstl/glue_algorithm_defs.h:101:1: note: template argument deduction/substitution failed: answer.code:39:25: note: candidate expects 4 arguments, 2 provided 39 | if(count(s, s[0]) == size(s)) { | ~~~~~^~~~~~~~~