criyle/codenet-compile-errors huggingface dataset:
Language: C++

#include<cstdio>
#include<iostream>
#include<string>
#include<set>
#include<map>
#include<vector>
#include<deque>
#include<tuple>
#include<algorithm>
#include<numeric>
#include<limits>
#include<boost/multiprecision/cpp_int.hpp>
using namespace std;
using namespace boost::multiprecision;
#define BEGIN ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define END return EXIT_SUCCESS
#define rep(I,N) for(auto I=0;I<(N);++I)
#define up(I,A,B) for(auto I=(A);I<=(B);++I)
#define dw(I,A,B) for(auto I=(A);I>=(B);--I)
#define all(C) (C).begin(),(C).end()
#define rall(C) (C).rbegin(),(C).rend()
#define ft first
#define sd second
#define mp make_pair
#define mt make_tuple
#define pf push_front
#define pb push_back
#define lb lower_bound
#define ub upper_bound
#define rs resize
typedef long long ll;
typedef unsigned long long ull;
template<class T>inline bool chmax(T& a,T b){if(a<b){a=b;return 1;}return 0;}
template<class T>inline bool chmin(T& a,T b){if(a>b){a=b;return 1;}return 0;}
template<class T>inline void                                      in(T &p){cin>>p;}
template<class T1,class T2>inline void                            in(T1 &p1,T2 &p2){cin>>p1>>p2;}
template<class T1,class T2,class T3>inline void                   in(T1 &p1,T2 &p2,T3 &p3){cin>>p1>>p2>>p3;}
template<class T1,class T2,class T3,class T4>inline void          in(T1 &p1,T2 &p2,T3 &p3,T4 &p4){cin>>p1>>p2>>p3>>p4;}
template<class T1,class T2,class T3,class T4,class T5>inline void in(T1 &p1,T2 &p2,T3 &p3,T4 &p4,T5 &p5){cin>>p1>>p2>>p3>>p4>>p5;}
template<class T>inline void                                      ins(T &p){for_each(all(p),in<decltype(p[0])>);}
template<class T>inline void                             out(T p){cout<<p<<endl;}
template<class T1,class T2>inline void                   out(T1 p1,T2 p2){cout<<p1<<" "<<p2<<endl;}
template<class T1,class T2,class T3>inline void          out(T1 p1,T2 p2,T3 p3){cout<<p1<<" "<<p2<<" "<<p3<<endl;}
template<class T1,class T2,class T3,class T4>inline void out(T1 p1,T2 p2,T3 p3,T4 p4){cout<<p1<<" "<<p2<<" "<<p3<<" "<<p4<<endl;}
inline                                              void out(double p){printf("%.10f\n",p);}
template<class T>inline                             void outs(T p){for_each(all(p),out<decltype(p[0])>);}
template<class T>inline void outs(vector<T> V){int n=V.size();rep(i,n)cout<<V[i]<<" \n"[i==n-1];}
inline void solve(void){
  int N,M;in(N,M);
  map<int,int>c;
  vector<bool>f(N+1);
  rep(i,M){
    int p;string s;in(p,s);
    if(!f[p]){
      if(s=="WA")c[p]++;
      if(s=="AC")f[p]=true;
    }
  }
  int cnt_ac=0;
  for(auto e:f)if(e.sd)cnt_ac++;
  int cnt_wa=0;
  for(auto e:c)if(f[e.ft])cnt_wa+=e.sd;
  cout<<cnt_ac<<" "<<cnt_wa<<endl;
}
int main(int argc,char**argv){
  BEGIN;
  solve();
  END;
}


Compiler output:
a.cc:12:9: fatal error: boost/multiprecision/cpp_int.hpp: No such file or directory
   12 | #include<boost/multiprecision/cpp_int.hpp>
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<cstdio>
#include<iostream>
#include<string>
#include<set>
#include<map>
#include<vector>
#include<deque>
#include<tuple>
#include<algorithm>
#include<numeric>
#include<limits>
#include<boost/multiprecision/cpp_int.hpp>
using namespace std;
using namespace boost::multiprecision;
#define BEGIN ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define END return EXIT_SUCCESS
#define rep(I,N) for(auto I=0;I<(N);++I)
#define up(I,A,B) for(auto I=(A);I<=(B);++I)
#define dw(I,A,B) for(auto I=(A);I>=(B);--I)
#define all(C) (C).begin(),(C).end()
#define rall(C) (C).rbegin(),(C).rend()
#define ft first
#define sd second
#define mp make_pair
#define mt make_tuple
#define pf push_front
#define pb push_back
#define lb lower_bound
#define ub upper_bound
#define rs resize
typedef long long ll;
typedef unsigned long long ull;
template<class T>inline bool chmax(T& a,T b){if(a<b){a=b;return 1;}return 0;}
template<class T>inline bool chmin(T& a,T b){if(a>b){a=b;return 1;}return 0;}
template<class T>inline void                                      in(T &p){cin>>p;}
template<class T1,class T2>inline void                            in(T1 &p1,T2 &p2){cin>>p1>>p2;}
template<class T1,class T2,class T3>inline void                   in(T1 &p1,T2 &p2,T3 &p3){cin>>p1>>p2>>p3;}
template<class T1,class T2,class T3,class T4>inline void          in(T1 &p1,T2 &p2,T3 &p3,T4 &p4){cin>>p1>>p2>>p3>>p4;}
template<class T1,class T2,class T3,class T4,class T5>inline void in(T1 &p1,T2 &p2,T3 &p3,T4 &p4,T5 &p5){cin>>p1>>p2>>p3>>p4>>p5;}
template<class T>inline void                                      ins(T &p){for_each(all(p),in<decltype(p[0])>);}
template<class T>inline void                             out(T p){cout<<p<<endl;}
template<class T1,class T2>inline void                   out(T1 p1,T2 p2){cout<<p1<<" "<<p2<<endl;}
template<class T1,class T2,class T3>inline void          out(T1 p1,T2 p2,T3 p3){cout<<p1<<" "<<p2<<" "<<p3<<endl;}
template<class T1,class T2,class T3,class T4>inline void out(T1 p1,T2 p2,T3 p3,T4 p4){cout<<p1<<" "<<p2<<" "<<p3<<" "<<p4<<endl;}
inline                                              void out(double p){printf("%.10f\n",p);}
template<class T>inline                             void outs(T p){for_each(all(p),out<decltype(p[0])>);}
template<class T>inline void outs(vector<T> V){int n=V.size();rep(i,n)cout<<V[i]<<" \n"[i==n-1];}
inline void solve(void){
  int N,M;in(N,M);
  map<int,int>c;
  vector<bool>f(N+1);
  rep(i,M){
    int p;string s;in(p,s);
    if(!f[p]){
      switch(s){
        case "WA":
        c[p]++;
        break;
        case "AC":
        f[p]=true;
        break;
      }
    }
  }
  int cnt_ac=0;
  for(auto e:f)if(e.sd)cnt_ac++;
  int cnt_wa=0;
  for(auto e:c)if(f[e.ft])cnt_wa+=e.sd;
  cout<<cnt_ac<<" "<<cnt_wa<<endl;
}
int main(int argc,char**argv){
  BEGIN;
  solve();
  END;
}


Compiler output:
a.cc:12:9: fatal error: boost/multiprecision/cpp_int.hpp: No such file or directory
   12 | #include<boost/multiprecision/cpp_int.hpp>
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
    int n,m;
    cin >> n >> m;
    vector<int> ac(n),pena(n);
    for(int i = 0;i<m;++i){
        int p;
        string s;
        cin >> p >> s;
        --p;
        if(ac[p])continue;
        if(s == "AC"){
            ac[p] = 1;
        }else{
            pena[p]++;
        }
    }
    int AC = 0,PENA = 0;
    for(int i = 0;i<n;++i){
        AC += ac[i];
        if(ac[i]) PENA += pena[i];
    }
    cout << clear << " " << pena << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:25:13: error: 'clear' was not declared in this scope
   25 |     cout << clear << " " << pena << endl;
      |             ^~~~~
Language: C++

#include <iostream>
#include <string>

int main() {
  int N=0,M=0,correct=0,incorrect=0;
  std::cin >> N >> M;

  int p[M];
  string S[M];
  
  for(int i=0;i<M;i++){
    std::cin >> p[i] >> S[i];
  }
  
  for(int i=0;i<N;i++){
    for(int j=0;i<M;j++){
      if(S[j]=="AC") {
        ++correct;
        break;
      } else {
        ++incorrect;
      }
    }
  }
  cout << correct << incorrect << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: 'string' was not declared in this scope
    9 |   string S[M];
      |   ^~~~~~
a.cc:9:3: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:12:25: error: 'S' was not declared in this scope
   12 |     std::cin >> p[i] >> S[i];
      |                         ^
a.cc:17:10: error: 'S' was not declared in this scope
   17 |       if(S[j]=="AC") {
      |          ^
a.cc:25:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   25 |   cout << correct << incorrect << endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:25:35: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   25 |   cout << correct << incorrect << endl;
      |                                   ^~~~
      |                                   std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <iostream>

int main() {
  int N=0,M=0,correct=0,incorrect=0;
  std::cin >> N >> M;

  int p[M];
  string S[M];
  
  for(int i=0;i<M;i++){
    std::cin >> p[i] >> S[i];
  }
  
  for(int i=0;i<N;i++){
    for(int j=0;i<M;j++){
      if(S[j]=="AC") {
        ++correct;
        break;
      } else {
        ++incorrect;
      }
    }
  }
  cout << correct << incorrect << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 'string' was not declared in this scope
    8 |   string S[M];
      |   ^~~~~~
a.cc:8:3: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:11:25: error: 'S' was not declared in this scope
   11 |     std::cin >> p[i] >> S[i];
      |                         ^
a.cc:16:10: error: 'S' was not declared in this scope
   16 |       if(S[j]=="AC") {
      |          ^
a.cc:24:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   24 |   cout << correct << incorrect << endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:24:35: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   24 |   cout << correct << incorrect << endl;
      |                                   ^~~~
      |                                   std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <string>
#include <iostream>

int main() {
  int n, m;
  std::cin >> n >> m;
  std::vector<int> ac(n, 0), wa(n, 0);
  for (int i = 0; i < m; i++) {
	int p;
    std::string str;
    std::cin >> p >> str;
	if (ac.at(p) != 0) continue;
    if (str == "AC") {
	  ac.at(p)++;
    } else if (str == "WA") {
      wa.at(p)++;
    }
  }
  
  int ac_sum = 0;
  int wa_sum = 0;
  for (int i = 0; i < n; i++) {
	if (ac.at(i) == 1) {
      ac_sum++;
      wa_sum += wa.at(i);
    }
  }
  std::cout << ac_sum << " " << wa_sum << std::endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:8: error: 'vector' is not a member of 'std'
    7 |   std::vector<int> ac(n, 0), wa(n, 0);
      |        ^~~~~~
a.cc:3:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    2 | #include <iostream>
  +++ |+#include <vector>
    3 | 
a.cc:7:15: error: expected primary-expression before 'int'
    7 |   std::vector<int> ac(n, 0), wa(n, 0);
      |               ^~~
a.cc:12:13: error: 'ac' was not declared in this scope
   12 |         if (ac.at(p) != 0) continue;
      |             ^~
a.cc:14:11: error: 'ac' was not declared in this scope
   14 |           ac.at(p)++;
      |           ^~
a.cc:16:7: error: 'wa' was not declared in this scope
   16 |       wa.at(p)++;
      |       ^~
a.cc:23:13: error: 'ac' was not declared in this scope
   23 |         if (ac.at(i) == 1) {
      |             ^~
a.cc:25:17: error: 'wa' was not declared in this scope
   25 |       wa_sum += wa.at(i);
      |                 ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;

#define LL long long
typedef pair<int, int> pii;

template< typename T > inline void read(T &x)
{
    static char _c;
    static bool _f;

    x = 0;
    _f = 0;
    _c = getchar();

    while(_c < '0' || '9' < _c) {if(_c == '-') _f = true; _c = getchar();}
    while('0' <= _c && _c <= '9') {x = (x << 1) + (x << 3) + (_c & 15); _c = getchar();}
    if(_f) x = -x;
}

template < typename T > inline void Min(T &x, T y) {if(y < x) x = y;}
template < typename T > inline void Max(T &x, T y) {if(x < y) x = y;}


#define lowbit(x) ((x) & -(x))
#define lson l,mid,id<<1
#define rson mid+1,r,id<<1|1
#define ls id<<1
#define rs id<<1|1
#define MID(l,r) ((l)+(((r)-(l))>>1))
#define fi first
#define se second
#define mk make_pair
#define pb push_back

const int INF = 0x3f3f3f3f;
const int MOD = (int) 1e9 + 7;
//const int MOD = (int) 998244353;
const int maxn = (int) 2e5 + 20;
const int maxm = (int) 1000000 + 20;
const double pi = (double) acos(-1.0);
const double eps = (double) 1e-8;

inline int sig(double x) {return x < -eps ? -1 : eps < x;}
LL fp(LL a, LL n, LL m = MOD) {LL res = 1; for(; n; n >>= 1, a = a * a % m) if(n & 1) res = res * a % m; return res;}


void work()
{
    int n, m;
    map<int, int> s;

    cin >>n >>m;
    int ans = 0, ac = 0;
    for(int i = 0; i < m; i++)
    {
        int id;
        string res;
        cin >>id >>res;

        if(res == "AC")
        {
            if(mp[id] != -1)
            {
                ac++;
                ans += mp[id];
                mp[id] = -1;
            }
        }
        else
        {
            if(mp[id] != -1) mp[id]++;
        }
    }
    cout <<ac <<" " <<ans <<endl;
}


int main()
{
#ifdef yukihana0416
freopen("in.txt", "r", stdin);
//freopen("out.txt", "w", stdout);
#endif // yukihana0416
//    get_prime();
    int tc = 1;
//    read(tc);
    for(int ca = 1; ca <= tc; ca++)
    {
//        printf("Case #%d: ", ca);
        work();
    }
    return 0;
}


Compiler output:
a.cc: In function 'void work()':
a.cc:63:16: error: 'mp' was not declared in this scope; did you mean 'm'?
   63 |             if(mp[id] != -1)
      |                ^~
      |                m
a.cc:72:16: error: 'mp' was not declared in this scope; did you mean 'm'?
   72 |             if(mp[id] != -1) mp[id]++;
      |                ^~
      |                m
Language: C++

#include<bits/stdc++.h>

using namespace std;

int main()
{
    int n,m,cnt=0,t=0;
    cin>>n>>m;
    string s;
    cin>>s;
    int a[n]={0},b[n]={0};
    for(int i=0;i<m;i++)
    {
        cin>>n>>s;
     if(s="WA" && b[n]!=1)
        a[n]++;
     if(s="AC")
        b[n]=1;
     }
    for(int j=0;j<n;j++)
    {
        t+=b[j];
        cnt+=a[j];
    }
     cout<<t<<" "<<cnt;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:10: error: could not convert 's.std::__cxx11::basic_string<char>::operator=(((int)((char)((((const char*)"WA") != 0) && (b[n] != 1)))))' from 'std::__cxx11::basic_string<char>' to 'bool'
   15 |      if(s="WA" && b[n]!=1)
      |         ~^~~~~~~~~~~~~~~~
      |          |
      |          std::__cxx11::basic_string<char>
a.cc:17:10: error: could not convert 's.std::__cxx11::basic_string<char>::operator=(((const char*)"AC"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   17 |      if(s="AC")
      |         ~^~~~~
      |          |
      |          std::__cxx11::basic_string<char>
Language: C++

#include<bits/stdc++.h>

using namespace std;

int main()
{
    int n,m,cnt=0,t=0;
    cin>>n>>m;
    string s;
    cin>>s;
    int a[n]={0},b[n]={0};
    for(int i=0;i<m;i++)
    {
        cin>>n>>s;
     if(s="WA" && b[n]!=1)
        a[x]++;
     if(s="AC")
        b[x]=1;
         
     }
    for(int j=0;j<n;j++)
    {
        t+=b[j];
        cnt+=a[j];
    }
     cout<<t<<" "<<cnt;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:10: error: could not convert 's.std::__cxx11::basic_string<char>::operator=(((int)((char)((((const char*)"WA") != 0) && (b[n] != 1)))))' from 'std::__cxx11::basic_string<char>' to 'bool'
   15 |      if(s="WA" && b[n]!=1)
      |         ~^~~~~~~~~~~~~~~~
      |          |
      |          std::__cxx11::basic_string<char>
a.cc:16:11: error: 'x' was not declared in this scope
   16 |         a[x]++;
      |           ^
a.cc:17:10: error: could not convert 's.std::__cxx11::basic_string<char>::operator=(((const char*)"AC"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   17 |      if(s="AC")
      |         ~^~~~~
      |          |
      |          std::__cxx11::basic_string<char>
a.cc:18:11: error: 'x' was not declared in this scope
   18 |         b[x]=1;
      |           ^
Language: C++

#include<bits/stdc++.h>

using namespace std;

int main()
{
    int n,m,cnt=0,t=0;
    cin>>n>>m;
    string s;
    cin>>s;
    int a[n];
    for(int i=0;i<n;i++)
        cin>>a[i];
     for(int i=0;i<n;i++)
     {
         int j=0;
         while(j<m)
         {
             if(s[j]!="AC")
               {
                cnt++;
                j++;
               }
         }
         t++;
     }
     cout<<t<<" "<<cnt;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   19 |              if(s[j]!="AC")
Language: C++

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

int main() {
  int n, m; cin >> n >> m;
  vector<int> ac(n), wa(n)
  int num=0; 
  string s;
  rep(i,m) {
    cin >> num >> s;    
    if (ac[num]) continue;
    if (ac[num]="AC") {
      ac[num] = 1;
    } else {
      wa[num]++;
    }
  }
  int AC=0, WA=0;
  rep(i,n) {
    AC += ac[i];
    if (ac[i]) WA += wa[num];
  }
  printf("%d %d", AC, WA);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: expected ',' or ';' before 'int'
    9 |   int num=0;
      |   ^~~
a.cc:12:12: error: 'num' was not declared in this scope; did you mean 'enum'?
   12 |     cin >> num >> s;
      |            ^~~
      |            enum
a.cc:23:25: error: 'num' was not declared in this scope; did you mean 'enum'?
   23 |     if (ac[i]) WA += wa[num];
      |                         ^~~
      |                         enum
Language: C++

n, m = map(int, input().split())
ac = {}
wa = {}
for _ in range(m):
    p, s = input().split()
    p = int(p)
    if s == 'AC':
        ac[p] = 1
    else:
        if not ac.get(p, 0):
            wa[p] = wa.get(p, 0) + 1
pen = 0
for p in ac:
    pen += wa.get(p, 0)
print(len(ac), pen)

Compiler output:
a.cc:7:13: warning: multi-character character constant [-Wmultichar]
    7 |     if s == 'AC':
      |             ^~~~
a.cc:1:1: error: 'n' does not name a type
    1 | n, m = map(int, input().split())
      | ^
a.cc:3:1: error: 'wa' does not name a type
    3 | wa = {}
      | ^~
a.cc:4:1: error: expected unqualified-id before 'for'
    4 | for _ in range(m):
      | ^~~
Language: C++

#include <iostream>
using namespace std;
int main ()
{
	int n, m, acc=0, pen=0; cin>>n>>m;
	vector <bool> test(n);
	vector <int> arr(m);
	vector <int> p(m);
	vector <string> s(m);
	for (int i=0; i<m; i++)
	{
		cin>>p[i];
		cin>>s[i];
		if (test [p[i]]==false && s[i]=="AC")
		{
			test[p[i]]=true;
			acc++;
		}
		if (test[p[i]]==false && s[i]=="WA")
		{
			arr[p[i]]++;
		}
	}
	for (int i=0; i<m; i++)
	{
		if (s[p[i]]=="AC")
		pen+=arr[p[i]];
	}
	cout<<acc<<endl<<pen<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'vector' was not declared in this scope
    6 |         vector <bool> test(n);
      |         ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include <iostream>
  +++ |+#include <vector>
    2 | using namespace std;
a.cc:6:17: error: expected primary-expression before 'bool'
    6 |         vector <bool> test(n);
      |                 ^~~~
a.cc:7:17: error: expected primary-expression before 'int'
    7 |         vector <int> arr(m);
      |                 ^~~
a.cc:8:17: error: expected primary-expression before 'int'
    8 |         vector <int> p(m);
      |                 ^~~
a.cc:9:23: error: expected primary-expression before '>' token
    9 |         vector <string> s(m);
      |                       ^
a.cc:9:25: error: 's' was not declared in this scope
    9 |         vector <string> s(m);
      |                         ^
a.cc:12:22: error: 'p' was not declared in this scope
   12 |                 cin>>p[i];
      |                      ^
a.cc:14:21: error: 'test' was not declared in this scope
   14 |                 if (test [p[i]]==false && s[i]=="AC")
      |                     ^~~~
a.cc:19:21: error: 'test' was not declared in this scope
   19 |                 if (test[p[i]]==false && s[i]=="WA")
      |                     ^~~~
a.cc:21:25: error: 'arr' was not declared in this scope
   21 |                         arr[p[i]]++;
      |                         ^~~
a.cc:26:23: error: 'p' was not declared in this scope
   26 |                 if (s[p[i]]=="AC")
      |                       ^
a.cc:27:22: error: 'arr' was not declared in this scope
   27 |                 pen+=arr[p[i]];
      |                      ^~~
Language: C++

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

int main {
  int n, m;
  cin >> n >> m;
  int ACnum = 0, WAnum = 0;
  vector<bool> ac(n);
  vector<int> wa(n);
  rep(i, n) {
    ac(i) = false;
    wa(i) = 0;
  }
  rep(i, m) {
    int p;
    string s;
    cin >> p >> s;
    --p;
    if(ac[p]) continue;
    if(s == "AC") {
      ac[p] = true;
      ACnum++;
      WAnum += wa(p);
    } else if(s == "WA") {
      wa[p]++;
    }
  }
  cout << ACnum << " " << WAnum << endl;
}

Compiler output:
a.cc:6:5: error: cannot declare '::main' to be a global variable
    6 | int main {
      |     ^~~~
a.cc:7:3: error: expected primary-expression before 'int'
    7 |   int n, m;
      |   ^~~
a.cc:7:3: error: expected '}' before 'int'
a.cc:6:10: note: to match this '{'
    6 | int main {
      |          ^
a.cc:8:3: error: 'cin' does not name a type
    8 |   cin >> n >> m;
      |   ^~~
a.cc:10:19: error: 'n' was not declared in this scope; did you mean 'yn'?
   10 |   vector<bool> ac(n);
      |                   ^
      |                   yn
a.cc:11:18: error: 'n' was not declared in this scope; did you mean 'yn'?
   11 |   vector<int> wa(n);
      |                  ^
      |                  yn
a.cc:2:19: error: expected unqualified-id before 'for'
    2 | #define rep(i, n) for (int i = 0; i < (n); ++i)
      |                   ^~~
a.cc:12:3: note: in expansion of macro 'rep'
   12 |   rep(i, n) {
      |   ^~~
a.cc:12:7: error: 'i' does not name a type
   12 |   rep(i, n) {
      |       ^
a.cc:2:35: note: in definition of macro 'rep'
    2 | #define rep(i, n) for (int i = 0; i < (n); ++i)
      |                                   ^
a.cc:2:44: error: expected unqualified-id before '++' token
    2 | #define rep(i, n) for (int i = 0; i < (n); ++i)
      |                                            ^~
a.cc:12:3: note: in expansion of macro 'rep'
   12 |   rep(i, n) {
      |   ^~~
a.cc:2:19: error: expected unqualified-id before 'for'
    2 | #define rep(i, n) for (int i = 0; i < (n); ++i)
      |                   ^~~
a.cc:16:3: note: in expansion of macro 'rep'
   16 |   rep(i, m) {
      |   ^~~
a.cc:16:7: error: 'i' does not name a type
   16 |   rep(i, m) {
      |       ^
a.cc:2:35: note: in definition of macro 'rep'
    2 | #define rep(i, n) for (int i = 0; i < (n); ++i)
      |                                   ^
a.cc:2:44: error: expected unqualified-id before '++' token
    2 | #define rep(i, n) for (int i = 0; i < (n); ++i)
      |                                            ^~
a.cc:16:3: note: in expansion of macro 'rep'
   16 |   rep(i, m) {
      |   ^~~
a.cc:30:3: error: 'cout' does not name a type
   30 |   cout << ACnum << " " << WAnum << endl;
      |   ^~~~
a.cc:31:1: error: expected declaration before '}' token
   31 | }
      | ^
Language: C++

int main() {
  // llはintに読み替えてください
  ll N, M;
  cin >> N >> M;

  // 問題回答済みかどうかの配列
  vector<ll> p(N, 0);
  // wrongの配列
  vector<ll> wa(N, 0);
　
  ll pn; // 問題番号を入れる
  string s; // ACかWAか入れる

  for(int i = 0; i < M; i++){
    cin >> pn >> s;
    
    // ACの場合
    if (s == "AC"){
      p.at(pn-1) = 1; 
    } else { // WAの場合
      if (p.at(pn-1) == 0) { // 不正解の場合
        wa.at(pn-1)++; // waの配列の数を1増やす
        // 上はwa.at(pn - 1) = wa.at(pn - 1) + 1の書き方と同じ
      }
    }
  }

  ll rp = 0, rw=0;
  // ACとWAの数を数える
  for (int i = 0; i < N; i++) {
    rp += p.at(i); // WAのものは0になっているため無視して足して良い
    if (p.at(i) == 1) { // ACされているものの中でWAのものを数える
      rw += wa.at(i); 
    }
  }
  
  cout << rp << " " << rw << endl;

}

Compiler output:
a.cc:10:1: error: extended character 　 is not valid in an identifier
   10 | 　
      | ^
a.cc: In function 'int main()':
a.cc:3:3: error: 'll' was not declared in this scope
    3 |   ll N, M;
      |   ^~
a.cc:4:3: error: 'cin' was not declared in this scope
    4 |   cin >> N >> M;
      |   ^~~
a.cc:4:10: error: 'N' was not declared in this scope
    4 |   cin >> N >> M;
      |          ^
a.cc:4:15: error: 'M' was not declared in this scope
    4 |   cin >> N >> M;
      |               ^
a.cc:7:3: error: 'vector' was not declared in this scope
    7 |   vector<ll> p(N, 0);
      |   ^~~~~~
a.cc:7:14: error: 'p' was not declared in this scope
    7 |   vector<ll> p(N, 0);
      |              ^
a.cc:9:14: error: 'wa' was not declared in this scope
    9 |   vector<ll> wa(N, 0);
      |              ^~
a.cc:10:1: error: '\U00003000' was not declared in this scope
   10 | 　
      | ^~
a.cc:12:3: error: 'string' was not declared in this scope
   12 |   string s; // ACかWAか入れる
      |   ^~~~~~
a.cc:15:12: error: 'pn' was not declared in this scope
   15 |     cin >> pn >> s;
      |            ^~
a.cc:15:18: error: 's' was not declared in this scope
   15 |     cin >> pn >> s;
      |                  ^
a.cc:28:5: error: expected ';' before 'rp'
   28 |   ll rp = 0, rw=0;
      |     ^~~
      |     ;
a.cc:31:5: error: 'rp' was not declared in this scope
   31 |     rp += p.at(i); // WAのものは0になっているため無視して足して良い
      |     ^~
a.cc:33:7: error: 'rw' was not declared in this scope
   33 |       rw += wa.at(i);
      |       ^~
a.cc:37:3: error: 'cout' was not declared in this scope
   37 |   cout << rp << " " << rw << endl;
      |   ^~~~
a.cc:37:11: error: 'rp' was not declared in this scope
   37 |   cout << rp << " " << rw << endl;
      |           ^~
a.cc:37:24: error: 'rw' was not declared in this scope
   37 |   cout << rp << " " << rw << endl;
      |                        ^~
a.cc:37:30: error: 'endl' was not declared in this scope
   37 |   cout << rp << " " << rw << endl;
      |                              ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main(){
	int n, m, n;
	int current = 0;
	int ac = 0;
	int total_wa = 0;
	int wa = 0;
	int before_p = 0;
	bool is_ac = false;
	string s;
	map<int, bool> ac_list;

	cin >> n >> m;

	for(size_t i = 0; i < m; i++) {
		cin >> n >> s;
		
		if(ac_list.find(n) == ac_list.end()) {
			ac_list[n] = false;
			wa = 0;
		}
		
		if(ac_list[n]) {
			continue;
		}

		if(s == "AC") {
			ac_list[n] = true;
			ac++;
			total_wa += wa;
		} else {
			wa++;
		}
	}

	printf("%d %d\n", ac, total_wa);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:19: error: redeclaration of 'int n'
    5 |         int n, m, n;
      |                   ^
a.cc:5:13: note: 'int n' previously declared here
    5 |         int n, m, n;
      |             ^
Language: C++

#include<bits/stdc++.h>
using namespace std;

int N,M;
int WA[105000];
bool AC[105000];

void solve(){
    cin>>N>>M;
    int WAnum=0;
    int ACnum=0;
    for(inti=1;i<=N;i++){
        WA[i]=0; //配列WAに0をぶちこむ
        AC[i]=false;　//配列ACにfalseをぶちこむ
    }
    while(M--){　//M-1から1まで
        int p;
        string S;
        cin>>p>>S;
        if(AC[p]) continue; //ACがtrueなら処理しない
        if(S=="AC"){
            AC[p]=true;
            ACnum++;
            WAnum+=WA[p];
        }else if(S=="WA"){
            WA[p]++;
        }
    }
    cout<<ACnum<<" "<<WAnum<<endl;
    return;
}

int main(){
    solve();
    return 0;
}

Compiler output:
a.cc:14:21: error: extended character 　 is not valid in an identifier
   14 |         AC[i]=false;　//配列ACにfalseをぶちこむ
      |                     ^
a.cc:16:16: error: extended character 　 is not valid in an identifier
   16 |     while(M--){　//M-1から1まで
      |                ^
a.cc: In function 'void solve()':
a.cc:12:9: error: 'inti' was not declared in this scope; did you mean 'int'?
   12 |     for(inti=1;i<=N;i++){
      |         ^~~~
      |         int
a.cc:12:16: error: 'i' was not declared in this scope
   12 |     for(inti=1;i<=N;i++){
      |                ^
a.cc:14:21: error: '\U00003000' was not declared in this scope
   14 |         AC[i]=false;　//配列ACにfalseをぶちこむ
      |                     ^~
a.cc:16:16: error: '\U00003000' was not declared in this scope
   16 |     while(M--){　//M-1から1まで
      |                ^~
a.cc:19:14: error: 'p' was not declared in this scope
   19 |         cin>>p>>S;
      |              ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
long long int p[100009];
long long int s[100009] = {0};
long long int f[100009] = {0};
string z;
long long int n, m, i;
int main()
{
    //freopen("test.inp","r",stdin);
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);

    cin >> n >> m;
    long long int dem1 = 0, dem2 = 0;
    for (i = 1; i <= m; i++)
    {
        cin >> p[i] >> z;
        if (z == "WA")
        {
            if (s[p[i]] == 0) f[p[i]]++;
        }
        else s[p[i]]++;
    }
    for (i = 1; i <= n; i++)
    {
        if (s[i] == 1) dem1++;
        if (s[i]]==1) dem2 += f[i];
    }
    cout << dem1 << " " << dem2;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:29:17: error: expected ')' before ']' token
   29 |         if (s[i]]==1) dem2 += f[i];
      |            ~    ^
      |                 )
a.cc:29:17: error: expected primary-expression before ']' token
Language: C++

#include <bits/stdc++.h>

using namespace std;

#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()

typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;

int main(){
	ios::sync_with_stdio(false); cin.tie(0);

	int n, m; cin >> n >> m;
	int v[100010][2] = {0};

	for(int i = 0; i < n; i++){
		v[i][0] = v[i][1] = 0;
	}

	int a; string b;
	for(int i = 0; i < m; i++){
		cin >> a >> b;
		if(b == "AC" && v[a-1][0] == 0) v[a-1][0]++;
		else if(b == "WA" && v[a-1][0] == 0) v[a-1][1]++;
	}

	int ans1 = 0, ans2 = 0;
	for(int i = 0; i < n; i++){
		ans1 += v[i][0];
		if(v[i] == 1)
			ans2 += v[i][1];
	}

	cout << ans1 << ' ' << ans2 << '\n';

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:32:25: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   32 |                 if(v[i] == 1)
      |                    ~~~~~^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main (){
  int n,m;
  cin >>n>>m;
  int a[m+1];
  string b[m+1];
    int sum=0;
  for(int i=1; i<=m; i++){
    cin>>a[i]>>b[i];
  }
  bool c[n+1]={0};
 int  countwa=0,countac=0;
  for(int i=1;i<=m;i++){
    if(c[a[i]]==1) continue;
    else{ if(b[i]=="WA") countwa++;
        else{ c[a[i]]=1; countac++;}
        }
cout <<countac<<" "<<countwa<<endl;
  }


Compiler output:
a.cc: In function 'int main()':
a.cc:21:4: error: expected '}' at end of input
   21 |   }
      |    ^
a.cc:4:12: note: to match this '{'
    4 | int main (){
      |            ^
Language: Java

import java.util.*;
 
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
 
        int N = sc.nextInt();
        int M = sc.nextInt();
 
        int p[] = new int[M];
        String S[] = new String[M];
 
        for (int i = 0; i < M; i++) {
            p[i] = sc.nextInt();
            S[i] = sc.next();
        }
 
        int ansAC = 0;
        int ansWA = 0;
 
        Set<Integer> list1 = new HashSet<Integer>();
 
        for (int i = 0; i < M; i++) {
            if (S[i].equals("AC")) {
                if (!(list1.contains(p[i]))) {
                    list1.add(p[i]);
                }
            }
        }
 
        for (int i = 0; i < M; i++) {
            if (list1.contains(p[i])) {
                if (S[i].equals("AC")) {
                    ansAC += 1;
                    list1.remove(list1.indexOf(p[i]));
                } else {
                    ansWA += 1;
                }
            }
 
        }
 
        System.out.println(ansAC + " " + ansWA);
 
    }
 
}

Compiler output:
Main.java:35: error: cannot find symbol
                    list1.remove(list1.indexOf(p[i]));
                                      ^
  symbol:   method indexOf(int)
  location: variable list1 of type Set<Integer>
1 error
Language: C++

#include <bits/stdc++.h>
#define ALL(a) (a).begin(),(a).end()
#define N_MAX 1000
using namespace std;

int main() {
	int N, M; 
	cin >> N >> M;
	vector<int> p(M);
	vector<string> S(M);
	for (int i = 1; i <= M; i++) cin >> p[i] >> S[i];
	bool b[N+1] = {};

	int ac = 0, wa = 0;
	for (int i = 1; i <= M; i++) {
		if (b[p[i]] == 1) continue;
		
		if (S[i] == "WA") wacnt++;
		if (S[i] == "AC") {
			b[p[i]] = 1;
			ac++;
			wa += wacnt;
			wacnt = 0;
		}
	}

	cout << ac << ' ' << wa << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:35: error: 'wacnt' was not declared in this scope
   18 |                 if (S[i] == "WA") wacnt++;
      |                                   ^~~~~
a.cc:22:31: error: 'wacnt' was not declared in this scope
   22 |                         wa += wacnt;
      |                               ^~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define lli long long int
#define uli unsigned long long int
#define INF 999999999999999999
#define rep(i,m,n) for(lli i = m;i < n;i++)
#define rrep(i,m,n) for(lli i=m-1;i>=n;i--)
#define pb(n) push_back(n)
#define UE(N) N.erase(unique(N.begin(),N.end()),N.end());
#define Sort(n) sort(n.begin(), n.end())
#define Rev(n) reverse(n.begin(),n.end())
#define Out(S) cout << S << endl
#define NeOut(S) cout << S
#define HpOut(S) cout << setprecision(30) << S << endl
#define Vec(K,L,N,S) vector<L> K(N,S)
#define DV(K,L,N,M,S) vector<vector<L>> K(N,vector<L>(M,S))
#define TV(K,L,N,M,R,S) vector<vector<vector<L>>> K(N,vector<vector<L>>(M,vector<L>(R,S)))
#define pint pair<lli,lli>
#define paf(L,R) pair<L,R>
#define mod 1000000007
#define MAX 5100000
#define ALL(a)  a.begin(),a.end()
#define chmax(a, b) a = (((a)<(b)) ? (b) : (a))
#define chmin(a, b) a = (((a)>(b)) ? (b) : (a))
int N;
void Qt(int l,int r){
  cout << "?" << " ";
  if(r>l)rep(i,l,r)cout << i << " ";
  else{
    rep(i,l,2*N+1)cout << i << " ";
    rep(i,1,r)cout << i << " ";
  }
}
int main(){
  lli C,D,E,F,/*N,*/M,K,L,R,X,Y,Z,H,W,sum=0,num=0,flag=0;string S,T;
  cin >> N >> M;
  Vec(W,bool,N,0);
  Vec(P,int,N,0);
  rep(i,0,M){
    cin >> C >> S;
    if(W[C-1]==false){
      if(S=="AC"){
        W[C-1]=true;
        sum++;
        }
      else P[C-1]++;
      }
    }
  rep(i,0,N)if(W[i]==true)num+=P[i];
  cout << sum << " " << num << endl;
  }
      
  

Compiler output:
a.cc: In function 'int main()':
a.cc:37:7: error: conflicting declaration 'std::vector<bool> W'
   37 |   Vec(W,bool,N,0);
      |       ^
a.cc:15:32: note: in definition of macro 'Vec'
   15 | #define Vec(K,L,N,S) vector<L> K(N,S)
      |                                ^
a.cc:35:37: note: previous declaration as 'long long int W'
   35 |   lli C,D,E,F,/*N,*/M,K,L,R,X,Y,Z,H,W,sum=0,num=0,flag=0;string S,T;
      |                                     ^
a.cc:41:9: error: invalid types 'long long int[long long int]' for array subscript
   41 |     if(W[C-1]==false){
      |         ^
a.cc:43:10: error: invalid types 'long long int[long long int]' for array subscript
   43 |         W[C-1]=true;
      |          ^
a.cc:49:17: error: invalid types 'long long int[long long int]' for array subscript
   49 |   rep(i,0,N)if(W[i]==true)num+=P[i];
      |                 ^
Language: C

#include <stdio.h>
#include <string.h>

int main()
{
    int i;
    int questions, answer, answer_times;
    int count_wa = 0, count_ac = 0;
    char result[2];

    scanf("%d %d", &questions, &answer_times);

    int cleared_q[questions+1];
    int wrongs[questions+1]
    for (i = 1; i <= questions; i++)
    {
        cleared_q[i] = 0;
        wrongs[i] = 0;
    }
    for (i = 0; i < answer_times; i++)
    {
        scanf("%d %s", &answer, result);
        if (cleared_q[answer] == 0)
        {
            // printf("%d\n", i);
            /* まだ正解していない場合、正誤を確認する */
            if (strcmp(result, "AC") == 0)
            {
                /* 正解だった場合、正解数を1増やし、誤答回数にその問題の誤答回数を追加する */
                cleared_q[answer] = 1;
                count_ac++;
                count_wa += wrongs[answer];
            }
            else
            {
                /* 不正解だった場合、その問題の誤答回数を追加 */
                wrongs[answer] += 1;
            }
        }
    }
    printf("%d %d\n", count_ac, count_wa);
}

Compiler output:
main.c: In function 'main':
main.c:15:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'for'
   15 |     for (i = 1; i <= questions; i++)
      |     ^~~
main.c:18:9: error: 'wrongs' undeclared (first use in this function)
   18 |         wrongs[i] = 0;
      |         ^~~~~~
main.c:18:9: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long 
// created by himo;
/*まず、問題文を確認すると、正答数＝ 一度でもACした問題。　ペナルティ数＝「その問題でACするまでにWAした数」の総和と読み取れる。
このことがわかれば　あとは実装する。
*/
int  main(){
int n,m;
cin >> n >> m;
vector<bool>ac_check(n,false);//その問題でACしたかを判断
vector<int>wa_n(n,0);//その問題を何回WAしたか
int ac=0,wa=0;//この変数が答えになる。
for(int i=0;i<m;i++){
	int z;
	string t;
	cin >> z >> t;
	z--;
	if(t=="WA"){//WAした問題を＋１する。
		wan.at(z)++;
	}
	if(!che.at(z)&&t=="AC"){//その問題に初めてACしたとき
		ac++;//ACした問題なので＋１する。
		che.at(z)=true;//ACした問題なのでtrueにする。
		wa+=wan.at(z);//ACしたため、これまでのWAした回数分足す。もし、同じ問題でACしたとしても、初めてACしたか判断しているためこのifは偽になる。
	}
}
cout << ac <<" "<<wa<<endl;//正答数　ペナルティー数の順に出力する。
}





Compiler output:
a.cc: In function 'int main()':
a.cc:20:17: error: 'wan' was not declared in this scope; did you mean 'wa'?
   20 |                 wan.at(z)++;
      |                 ^~~
      |                 wa
a.cc:22:13: error: 'che' was not declared in this scope
   22 |         if(!che.at(z)&&t=="AC"){//その問題に初めてACしたとき
      |             ^~~
a.cc:25:21: error: 'wan' was not declared in this scope; did you mean 'wa'?
   25 |                 wa+=wan.at(z);//ACしたため、これまでのWAした回数分足す。もし、同じ問題でACしたとしても、初めてACしたか判断しているためこのifは偽になる。
      |                     ^~~
      |                     wa
Language: C++

#include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include<cmath>
#include<stdio.h>
#include<utility>//swapでaとbの値を入れ替える
#define rep(i,n) for(int i=0;i<(n);i++)
#define ll long long
#define sort(s) sort(s.begin(),s.end())
#define r(s) reverse(s.begin(),s.end())
using namespace std;
typedef long long int ll;

int main() {
	ll  a, b;
	ll  ans = 0, abc = 0;
	cin >> a >> b;
	vector<ll> t(b), m(a, 0),n(b,0);
	string s;
	rep(i, b) {
		cin >> t[i] >> s;
		if (s == "AC")n[i]=1;
	}
	rep(i, b) {
		if (n[i] ==1  && m[t[i]] == 0)m[t[i]] = 10000, ans++;
		if (n[i] == 0 && m[t[i]] == 0)abc++;
	}
	
    cout << ans << " " <<abc<< endl;
	return 0;
}


Compiler output:
a.cc:9:12: error: 'long long long' is too long for GCC
    9 | #define ll long long
      |            ^~~~
a.cc:13:23: note: in expansion of macro 'll'
   13 | typedef long long int ll;
      |                       ^~
a.cc:9:17: error: 'long long long' is too long for GCC
    9 | #define ll long long
      |                 ^~~~
a.cc:13:23: note: in expansion of macro 'll'
   13 | typedef long long int ll;
      |                       ^~
a.cc:9:17: error: declaration does not declare anything [-fpermissive]
    9 | #define ll long long
      |                 ^~~~
a.cc:13:23: note: in expansion of macro 'll'
   13 | typedef long long int ll;
      |                       ^~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  
  long long N;
  long long M;
  cin >> N >> M;
  
  if(M == 0LL){
    cout << '0' << " " << '0' << endl;
  }
  else{
    vector<long long> s(M);
    vector<string> t(M);
    
    for(long long i = 0LL;i < M;++i){
      cin >> s[i] >> t[i];
    }
    
    vector<long long> a(N);
    vector<long long> b(N);
    
    for(long long i = 0LL;i < N;++i){
      a[i] = 0LL;
      b[i] = 0LL;
    }
   
    
    
    for(long long i = 0LL;i < M;++i){
      long long num = s[i] - 1LL;
      
      if(t[i][0] == 'A'){
        if(a[num] == 0LL){
          a[num] = 1LL;
        }
      }
      else{
        if(a[num] == 0LL){
          b[num] = b[num] + 1LL;
        }
      }
    }
    
    long long num3 = 0LL;
    
    long long num4 = 0LL;
    
    for(long long i = 0LL;i < N;++i){
      num3 = a[i] + num3;
      num4 = b[i] + num4;
    }
    
    cout << num3 << " " << num4 << endl;
    
    cout << num6 << endl;
  }
   
}





Compiler output:
a.cc: In function 'int main()':
a.cc:56:13: error: 'num6' was not declared in this scope; did you mean 'num4'?
   56 |     cout << num6 << endl;
      |             ^~~~
      |             num4
Language: C++

#include <iostream>
#include <string>
 
int main(void){
    int N,M,k;
  	int *ac_array;
    int *wa_array;
  	int *wa_count;

  	int ac_num = 0;
  	int wa_num = 0;
  	std::string S;
  
	std::cin >> N >> M;
  
  	ac_array = new int[N-1];
    wa_array = new int[N-1];
  	wa_count = new int[N-1];
  
  	for(int i = 0; i < N; i++){
      ac_array[i] = 0;
      wa_array[i] = 0;
      wa_count[i] = 0;
    }
  
  	for(int i = 0; i < M; i++){
    	std::cin >> k >> S;
        //まだ正解してない問題に対して処理する
      	if( ac_array[k-1] == 0){
      		if(S == "AC"){
              //正解なら正解した数として１を代入
              ac_array[k-1] = 1;
              //正解したらWAを反映
              wa_array[k-1] = wa_count[k-1]
           } else if(S == "WA") {
              //ミスったらミス数をカウントする
              wa_count[k-1] = wa_count[k-1] + 1;
           } 
        } else {
        //正解した問題に対しては何もしない
        }
    }
  
    for(int i = 0; i < N; i++){
      ac_num = ac_num + ac_array[i];
      wa_num = wa_num + wa_array[i];
    }
  
  	std::cout << ac_num << " " << wa_num;
  
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:34:44: error: expected ';' before '}' token
   34 |               wa_array[k-1] = wa_count[k-1]
      |                                            ^
      |                                            ;
   35 |            } else if(S == "WA") {
      |            ~
Language: C++

#include<bits/stdc++.h>
using namespace std;
 
int main(){
    long int N,M;
    long int AC = 0;
    long int WA = 0;
    cin >> N >> M;
    vector<string> s(M);
    vector<long int> p(M);
    vector<long int> hantei(N+1);

    for(int i=0;i<M;i++){
        cin >> p[i] >> s[i];
       
    }

for(int i=0;i<N+1;i++){
       hantei[i] = 0;
    }
    
   
    for(int i=0;i<M;i++){
        
        if(hantei[p[i]] == 0){
            if(s[i] == "WA"){
                WA += 1;
            }
            if(s[i] == "AC"){
                AC += 1;
                hantei[p[i]] += 1;
                WAnum = WA;
            }
        }
    }
    
    cout << AC << " " << WAnum;



    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:17: error: 'WAnum' was not declared in this scope
   32 |                 WAnum = WA;
      |                 ^~~~~
a.cc:37:26: error: 'WAnum' was not declared in this scope
   37 |     cout << AC << " " << WAnum;
      |                          ^~~~~
Language: C++

#include<algorithm>
using namespace std;
 
struct test {
  int p;
  string s;
};
 
int main(){
  int n, m;
  cin >> n >> m;
  
  vector<test> tests(m);
  for(int i=0; i<m; i++){
    cin >> tests.at(i).p >> tests.at(i).s;
  }
  
  sort(tests.begin(), tests.end(), [](const test& x, const test& y) { return x.p < y.p;});  
  
  int penalty = 0;
  int penalty_ = 0;
  int correct = 0;
  int lastp = -1;
  int finished = 0;
  
  for(int i=0; i<m; i++){
    if(tests.at(i).p!=lastp){
//      cout << tests.at(i).p << " " << tests.at(i).s << endl;
      if(tests.at(i).s=="AC"){
        correct++;
        lastp = tests.at(i).p;
        penalty += penalty_;
        penalty_ = 0;
      }
      else{
        penalty_++;
      }
    }
  }
 
  cout << correct << " " << penalty << endl;
  
  return 0;
}

Compiler output:
a.cc:6:3: error: 'string' does not name a type
    6 |   string s;
      |   ^~~~~~
a.cc: In function 'int main()':
a.cc:11:3: error: 'cin' was not declared in this scope
   11 |   cin >> n >> m;
      |   ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include<algorithm>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:13:3: error: 'vector' was not declared in this scope
   13 |   vector<test> tests(m);
      |   ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include<algorithm>
  +++ |+#include <vector>
    2 | using namespace std;
a.cc:13:14: error: expected primary-expression before '>' token
   13 |   vector<test> tests(m);
      |              ^
a.cc:13:16: error: 'tests' was not declared in this scope; did you mean 'test'?
   13 |   vector<test> tests(m);
      |                ^~~~~
      |                test
a.cc:41:3: error: 'cout' was not declared in this scope
   41 |   cout << correct << " " << penalty << endl;
      |   ^~~~
a.cc:41:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:41:40: error: 'endl' was not declared in this scope
   41 |   cout << correct << " " << penalty << endl;
      |                                        ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    1 | #include<algorithm>
  +++ |+#include <ostream>
    2 | using namespace std;
Language: C++

#include <iostream>

using namespace std;
struct pro
{
    int x;
    string s;

};
int main()
{
    int n, m, res1=0, res2=0;
    cin>>>m;
    struct pro p[m+5];
    for(int i=1; i<=m; i++)
    {
        cin>>p[i].x>>p[i].s;

    }
    for(int i=1; i<=m; i++)
    {
        if(p[i].s=="AC"&&p[i-1].s!="AC")
        {
               res1++;
        }
        else
        {
            if(p[i].s=="WS")
            {
                res2++;
            }
        }
    }
    int z=m;
    while(p[z].s=="WA")
    {
        res2--;
    }
    cout<<res1<<" "<<res2<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:10: error: expected primary-expression before '>' token
   13 |     cin>>>m;
      |          ^