Language: C++

#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(n);i++)

int main(){
  int n,m;
  cin>>n>>m;
  vector<int>ac[n],pena[n];
  rep(i,m){
      int p;
      string s;
      cin>>p>>s;
      if(ac[p]) continue;
      if(s=="AC") ac[p]=1;
      else pena[p]++;
  }
  int AC=0,WA=0;
  rep(i,n){
      AC+=ac[i];
      if(ac[i]) WA+=pena[i];
  }
  cout<<AC<<" "<<WA<<endl;
}
  


Compiler output:
a.cc: In function 'int main()':
a.cc:13:14: error: could not convert 'ac[p]' from 'std::vector<int>' to 'bool'
   13 |       if(ac[p]) continue;
      |          ~~~~^
      |              |
      |              std::vector<int>
a.cc:14:25: error: no match for 'operator=' (operand types are 'std::vector<int>' and 'int')
   14 |       if(s=="AC") ac[p]=1;
      |                         ^
In file included from /usr/include/c++/14/vector:72,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/usr/include/c++/14/bits/vector.tcc:210:5: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = int; _Alloc = std::allocator<int>]'
  210 |     vector<_Tp, _Alloc>::
      |     ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/vector.tcc:211:42: note:   no known conversion for argument 1 from 'int' to 'const std::vector<int>&'
  211 |     operator=(const vector<_Tp, _Alloc>& __x)
      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
In file included from /usr/include/c++/14/vector:66:
/usr/include/c++/14/bits/stl_vector.h:766:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = int; _Alloc = std::allocator<int>]'
  766 |       operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:766:26: note:   no known conversion for argument 1 from 'int' to 'std::vector<int>&&'
  766 |       operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
      |                 ~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:788:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = int; _Alloc = std::allocator<int>]'
  788 |       operator=(initializer_list<value_type> __l)
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:788:46: note:   no known conversion for argument 1 from 'int' to 'std::initializer_list<int>'
  788 |       operator=(initializer_list<value_type> __l)
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
a.cc:15:19: error: no 'operator++(int)' declared for postfix '++' [-fpermissive]
   15 |       else pena[p]++;
      |            ~~~~~~~^~
a.cc:19:9: error: no match for 'operator+=' (operand types are 'int' and 'std::vector<int>')
   19 |       AC+=ac[i];
      |       ~~^~~~~~~
a.cc:20:14: error: could not convert 'ac[i]' from 'std::vector<int>' to 'bool'
   20 |       if(ac[i]) WA+=pena[i];
      |          ~~~~^
      |              |
      |              std::vector<int>
a.cc:20:19: error: no match for 'operator+=' (operand types are 'int' and 'std::vector<int>')
   20 |       if(ac[i]) WA+=pena[i];
      |                 ~~^~~~~~~~~