Compile Error

/in/foo.cc: In function 'bool is_super_prime(int)':
/in/foo.cc:10:21: error: 'isprime' was not declared in this scope; did you mean 'is_prime'?
   10 |                 if(!isprime(x))return 0;
      |                     ^~~~~~~
      |                     is_prime
/in/foo.cc: In function 'int main()':
/in/foo.cc:16:38: error: reference to 'count' is ambiguous
   16 |                 if(is_super_prime(i))count++;
      |                                      ^~~~~
In file included from /usr/include/c++/12/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/12/bits/stdc++.h:65,
                 from /in/foo.cc:1:
/usr/include/c++/12/bits/stl_algo.h:4026:5: note: candidates are: 'template<class _IIter, class _Tp> typename std::iterator_traits< <template-parameter-1-1> >::difference_type std::count(_IIter, _IIter, const _Tp&)'
 4026 |     count(_InputIterator __first, _InputIterator __last, const _Tp& __value)
      |     ^~~~~
/in/foo.cc:3:7: note:                 'int count'
    3 | int n,count;
      |       ^~~~~
/in/foo.cc:17:16: error: reference to 'count' is ambiguous
   17 |         }cout<<count;
      |                ^~~~~
/usr/include/c++/12/bits/stl_algo.h:4026:5: note: candidates are: 'template<class _IIter, class _Tp> typename std::iterator_traits< <template-parameter-1-1> >::difference_type std::count(_IIter, _IIter, const _Tp&)'
 4026 |     count(_InputIterator __first, _InputIterator __last, const _Tp& __value)
      |     ^~~~~
/in/foo.cc:3:7: note:                 'int count'
    3 | int n,count;
      |       ^~~~~

信息

递交者
类型
递交
题目
P1061 A5-2 超级素数的个数
语言
C++
递交时间
2026-05-16 15:00:04
评测时间
2026-05-16 15:00:04
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes