Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ma 100001
bool count[ma]={0};
int pen[ma]={0};
int main()
{
  int n,m;cin>>n>>m;
  string *s=new string[m];
  int *p=new int[m];
  for(int i=0;i<m;i++)
    cin>>p[i]>>s[i];
  
  for(int i=0;i<m;i++)
  {
    if(!count[i])
    {
    if(s[i]=="AC")
      count[i]=1;
    else
      pen[i]++;
    }
  }
  int  c=0,pe=0;
  for(int i=1;i<ma;i++)
  {
    if(count[i])
    {c++;
     pe+=pen[i];
    }
  }
  cout<<c<<" "<<pe;
  return 0;
}
  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:16:9: error: reference to 'count' is ambiguous
   16 |     if(!count[i])
      |         ^~~~~
In file included from /usr/include/c++/14/algorithm:86,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:101:1: note: candidates are: '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);
      | ^~~~~
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:4025:5: note:                 'template<class _IIter, class _Tp> typename std::iterator_traits< <template-parameter-1-1> >::difference_type std::count(_IIter, _IIter, const _Tp&)'
 4025 |     count(_InputIterator __first, _InputIterator __last, const _Tp& __value)
      |     ^~~~~
a.cc:4:6: note:                 'bool count [100001]'
    4 | bool count[ma]={0};
      |      ^~~~~
a.cc:19:7: error: reference to 'count' is ambiguous
   19 |       count[i]=1;
      |       ^~~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:101:1: note: candidates are: '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++/14/bits/stl_algo.h:4025:5: note:                 'template<class _IIter, class _Tp> typename std::iterator_traits< <template-parameter-1-1> >::difference_type std::count(_IIter, _IIter, const _Tp&)'
 4025 |     count(_InputIterator __first, _InputIterator __last, const _Tp& __value)
      |     ^~~~~
a.cc:4:6: note:                 'bool count [100001]'
    4 | bool count[ma]={0};
      |      ^~~~~
a.cc:27:8: error: reference to 'count' is ambiguous
   27 |     if(count[i])
      |        ^~~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:101:1: note: candidates are: '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++/14/bits/stl_algo.h:4025:5: note:                 'template<class _IIter, class _Tp> typename std::iterator_traits< <template-parameter-1-1> >::difference_type std::count(_IIter, _IIter, const _Tp&)'
 4025 |     count(_InputIterator __first, _InputIterator __last, const _Tp& __value)
      |     ^~~~~
a.cc:4:6: note:                 'bool count [100001]'
    4 | bool count[ma]={0};
      |      ^~~~~