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

//的場梨沙★担当
//結城晴★副担当
//日野茜★副担当
#include <vector>
#include <list>
#include <map>
#include <climits>
#include <set>
#include <unordered_set>
#include <unordered_map>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string.h>
#include <string>
#include <cstring>
#include <ctime>
#include <queue>
#include <random>
#include <cctype>
#include <complex>
#include <regex>
#include <unordered_map>
#include <string>
#include <algorithm>
#include <cctype>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <iomanip>
#include <iostream>

using namespace std;

int main() {
    int N,M;
    cin>>N>>M;

    int A,B;

    for(int i=0;i<N;i++){
        double p;
        string s;
        cin>>p>>s;

        if(s=="AC"&&B<=N)&&p==first{
            B++;
        }
        else if(s=="WA"&&B<=N){
            A++;
        }
    }


    cout<<B<<" "<<A<<endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:55:31: error: 'first' was not declared in this scope
   55 |         if(s=="AC"&&B<=N)&&p==first{
      |                               ^~~~~
a.cc:55:28: error: label 'p' used but not defined
   55 |         if(s=="AC"&&B<=N)&&p==first{
      |                            ^
Language: C++

#include <iostream>

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

};
int main()
{
    int n, m, res1=0, res2=0;
    cin>>n>>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:30:23: error: expected ';' before ':' token
   30 |                 res2++:
      |                       ^
      |                       ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(void){
    int n,m;
    cin >> n >> m;
    int p;
    string s;
    int wacount = 0;
    int account = 0;
    pair<int, string> pa;
    for(int i = 0; i < m; i++){
       cin >> p;
       cin >> s;
       pa.first = p;
       pa.second = s;
    }
    for(int i = 0; i < m; i++){
        if(pa[i].first)
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:14: error: no match for 'operator[]' (operand types are 'std::pair<int, std::__cxx11::basic_string<char> >' and 'int')
   18 |         if(pa[i].first)
      |              ^
a.cc:19:5: error: expected primary-expression before '}' token
   19 |     }
      |     ^
Language: C++

#include<stdio.h>

int main(){
    int n, m;
    scanf("%d%d", &n, &m);
    int p[m];
    char s[m][3];
    for(int i = 0; i < m; i++){
        scanf("%d", &p[i]);
        scanf("%s", s[i]);
    }
    int w[n];
    int a = 0;
    int w = 0;
    int flag[n];
    for(int i = 0; i < n; i++){
        flag[i] = 0;
        w[i] = 0;
    }
    for(int i = 0; i<  m; i++){
        if(flag[p[i]-1] == 0){
            if((s[i][0] == 'A') && (s[i][1] == 'C')){
                flag[p[i]-1] = 1;
                a++;
            }
            else if((s[i][0] == 'W')&& (s[i][1] == 'A')){
                w[p[i]-1]++;
            }
        }
    }
    for(int i = 0; i < n; i++){
        if(flag[i] == 1)
        w += w[i];
    }
    
    printf("%d %d", a, w);
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:9: error: conflicting declaration 'int w'
   14 |     int w = 0;
      |         ^
a.cc:12:9: note: previous declaration as 'int w [n]'
   12 |     int w[n];
      |         ^
a.cc:33:11: error: incompatible types in assignment of 'int' to 'int [n]'
   33 |         w += w[i];
      |         ~~^~~~~~~
Language: C

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





int main(void)
{
  int n;//問題数
  int m;//提出回数
  scanf("%d%d",&n,&m);
   int p[m];
  char s[m][3];
 int i;
  int acno=0,wano=0;
  int aorw[n];
  for(i=0;i<n;i++){
    aorw[i]=5;//wa
  }
  for(i=0;i<m;i++){
    scanf("%d %s",&p[i],s[i]);
    p[i]--;
  }
  for(i=0;i<m;i++){
  //printf("%s\n",s[i]);
  //printf("%d %d\n",aorw[0],aorw[1]);
    if(s[i][0]=='A'&&aorw[p[i]]==5){
      acno++;
      aorw[p[i]]=1;
    //  printf("cami=%d\n",i);
    }
    else if(s[i][0]=='W')&&aorw[p[i]]==5){
      wano++;
      //printf("cam2i=%d\n",i);
    }
  }
  if(n==0){
  acno=0;
  wano=0;
  }
  printf("%d\n%d",acno,wano);



  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:35:32: error: expected ';' before '[' token
   35 |     else if(s[i][0]=='W')&&aorw[p[i]]==5){
      |                                ^
      |                                ;
main.c:35:41: error: expected statement before ')' token
   35 |     else if(s[i][0]=='W')&&aorw[p[i]]==5){
      |                                         ^
main.c:35:5: error: label 'aorw' used but not defined
   35 |     else if(s[i][0]=='W')&&aorw[p[i]]==5){
      |     ^~~~
Language: C++

#include<stdio.h>

int main(){
    int n, m;
    scanf("%d%d", &n, &m);
    int p[m];
    char s[m][3];
    for(int i = 0; i < m; i++){
        scanf("%d", &p[i]);
        scanf("%s", s[i]);
    }
    int w[n];
    int a = 0;
    int w = 0;
    int flag[n];
    for(int i = 0; i < n; i++){
        flag[i] = 0;
        w[i] = 0;
    }
    for(int i = 0; i<  m; i++){
        if(flag[p[i]-1] == 0){
            if((s[i][0] == 'A') && (s[i][1] == 'C')){
                flag[p[i]-1] = 1;
                a++;
            }
            else if((s[i][0] == 'W')&& (s[i][1] == 'A')){
                w[p[i]-1]++;
            }
        }
    }
    for(int i = 0; i < n; i++){
        if(flag[i] == 1)
        w += w[i]
    }
    
    printf("%d %d", a, w);
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:9: error: conflicting declaration 'int w'
   14 |     int w = 0;
      |         ^
a.cc:12:9: note: previous declaration as 'int w [n]'
   12 |     int w[n];
      |         ^
a.cc:33:11: error: incompatible types in assignment of 'int' to 'int [n]'
   33 |         w += w[i]
      |         ~~^~~~~~~
Language: C

#include <iostream>
#include <vector>
using namespace std;
#define MAX_N 100100
#define MAX_M 100100

// ACしたかどうか
bool seen[MAX_N];

int main() {
  int N, M;
  cin >> N >> M;
  vector<int> p(MAX_N);
  string s[MAX_M];
  int ac = 0, wa = 0;
  for (int i = 0; i < M; i++) cin >> p[i] >> s[i];
  for (int i = 0; i < M; i++) {
    int P = p.at(i);
    // AC済みなら何もしない
    if (seen[P]) continue;
    if (s[i] == "AC") {
    // AC済みにする
      seen[P] = true;
      ac++;
    }
    if (s[i] == "WA") wa++;
  }

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

Compiler output:
main.c:1:10: fatal error: iostream: No such file or directory
    1 | #include <iostream>
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

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

int main() {

int N,M;
 cin >> N >>M;

 int sama=0, samb=0;
 if(M==0){
   cout<<sama<<endl;
   cout<<samb<<endl;}


 else{ 
 int pi[M];
 string si[M];
  int k[M],l[M];
 for(int i=0;i<M;i++){
  cin >>pi[i]>>si[i];
  k[i]=0;
  l[i]=0;
  }
  int i=1;
  for(int j=0;j<M;j++){
  if(k[pi[j]]==0){
  if(si[j]=="AC"){
  sama++;
  k[pi[j]]++;
  samb+=l[pi[j]];}
  else l[pi[j]]++;}}
 

  cout<<sama<<endl;
   cout<<samb<<endl;}
   }
  else if(M*N-sam<=K)  cout << M*N-sam;
  else cout <<"-1";}


Compiler output:
a.cc:37:3: error: expected unqualified-id before 'else'
   37 |   else if(M*N-sam<=K)  cout << M*N-sam;
      |   ^~~~
a.cc:38:3: error: expected unqualified-id before 'else'
   38 |   else cout <<"-1";}
      |   ^~~~
a.cc:38:20: error: expected declaration before '}' token
   38 |   else cout <<"-1";}
      |                    ^
Language: C

#include <stdio.h>

int main(void)
{
    int n, m, q;
    char c;
    enum acwa{WA, AC};
    int i;
    int sum_ac = 0, sum_wa = 0;
   
    
    scanf("%d%d%c", &n, &m, &c);
    
    enum acwa s[m];
    enum acwa t[n + 1] = {WA};
   
    for(i = 0; i < m; i++){
        scanf("%d%d%c", &q, &s[i], &c);
        if(t[q] == WA)
            if(s[i] == WA) sum_wa++;
            else{sum_ac++; t[q] = AC;}
    
    printf("%d %d", sum_ac, sum_wa);

    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:15:26: error: variable-sized object may not be initialized except with an empty initializer
   15 |     enum acwa t[n + 1] = {WA};
      |                          ^
main.c:26:1: error: expected declaration or statement at end of input
   26 | }
      | ^
Language: C++

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

int main() {
  int n,m;
  cin >> n>>m;
int a,b,c,d;
  a=0;
    
    
  vector<int> math(m); // N個の数学の点数データ
vector<string>eng(m);
 vector<int>sci(n)

  // 数学の点数データを受け取る
  for (int i = 0; i < m; i++) {
    cin >> math.at(i)>>eng.at(i);
  }

 
  // 合計点を出力
  for(int j=0; j<n;){
  for (int i = 0; i < m; i++) {
    if(math.at(i)!=sci.at(j)){
    if (eng.at(i)=="WA")
      d++;
     else if(eng.at(i)=="AC"){
        c++;
        sci.at(j)=n;
       j++;
       
          }
      }
  }
   }

 
    
    
  
    cout <<c<<" "<<d<<endl ;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:3: error: expected ',' or ';' before 'for'
   16 |   for (int i = 0; i < m; i++) {
      |   ^~~
a.cc:16:19: error: 'i' was not declared in this scope
   16 |   for (int i = 0; i < m; i++) {
      |                   ^
Language: C

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

int main(void){
  int n, m;
  int p;
  char s[2];
  int ac = 0, wa = 0, prev = 0;
  int ac_flag=0, wa_flag=0;
  int z[m];
  count = 0;
  for(int i = 0; i < m; i++){
    z[i] = 0;
  }
  int flag = 1;
  
  scanf("%d %d", &n, &m);
  if(m == 0){
    printf("%d %d", 0, 0);
    return 0;
  }
  for(int i=0; i<m; i++){
    scanf("%d %s", &p, s);
    for(int j = 0; j < m; j++){
      if(z[j] == p && z[j] != prev){
        flag = 0;
      }
    }
    z[i] = p;
    if(p == prev && flag == 1){
      if(strcmp(s, "WA")==0 && wa_flag == 0){
        wa ++;
        wa_flag = 1;
      }else if(strcmp(s, "AC")==0 && ac_flag == 0){
        ac ++;
        ac_flag = 1;
        wa_flag = 1;
      }
    }else{
      ac_flag = wa_flag = 0;
      if(strcmp(s, "WA")==0 && wa_flag == 0){
        wa ++;
        wa_flag = 1;
      }else if(strcmp(s, "AC")==0 && ac_flag == 0){
        ac ++;
        ac_flag = 1;
        wa_flag = 1;
      }
    }
    flag = 1;
    prev = p;
  }
  printf("%d %d", ac, wa);
  return 0;
 }

Compiler output:
main.c: In function 'main':
main.c:11:3: error: 'count' undeclared (first use in this function)
   11 |   count = 0;
      |   ^~~~~
main.c:11:3: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include<cmath>
#include<bits/stdc++.h>
#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
#include<string>
#include<map>
#include<string.h> 
using namespace std;
#define ll long long
#define MOD 10000000
ll read(){
	ll x=0,w=1;
	char ch=0;
	while(ch<'0'||ch>'9'){
		if(ch=='-')
			w=-1;
		ch=getchar();
	}
	while(ch>='0'&&ch<='9'){
		x=x*10+ch-'0';
		ch=getchar();
	}
	return w*x;
}//快读算法
const long N = 200000;//这相当与存了200000个素数
long prime[N] = {0},num_prime = 0;//假设都是素数
int isNotPrime[N] = {1, 1};//先将0，1排除   不是素数
void SE(){
	for(long i = 2 ; i < N ; i ++){
        if(! isNotPrime[i])//isNotPrime==0
            prime[num_prime ++]=i;//自己在前面打好了标记。 //关键处1           /*i为合数时也要参与循环*/
		for(long j = 0 ; j < num_prime/*小于已经求出的质数个数*/ && i * prime[j]/*乘以其它质数，且质数比自己小或者是自己（已经求出来了），所以不可能重复*/ <  N ; j ++){
                isNotPrime[i * prime[j]] = 1;//乘以其它素数得到的一定是合数，之所以不重复是因为质数间不等
            if( !(i % prime[j] ) )  //关键处2 i%prime==0  根据“关键处2”的定义，当p1==prime[j] 的时候，
            //筛除就终止了(从最小质数开始所以本句话成立），
                break;
        }
    }
}//这是欧拉筛的算法，其中 prime[N]中储存的是前  N  个素数

int QuickPow(int x,int N){
    int res = x;
    int ans = 1;
    while(N){
        if(N&1){
            ans = ans * res;
        }
        res = res*res;
        N = N>>1;
    }
    return ans;
}//快速求解  x^n  的值---快速幂
const int M=2;
struct Ma{
    int a[M][M];
    Ma(){
        memset(a,0,sizeof(a));
    }
    void unit(){
        a[0][0]=a[1][1]=1;
        a[0][1]=a[1][0]=1;
    }
    Ma operator *(const Ma &B)const{
        Ma ans;
        for(int i=0;i<M;i++){
            for(int j=0;j<M;j++){
                for(int k=0;k<M;k++){
                    ans.a[i][j]+=a[i][k]*B.a[k][j];
                }
            }
        }
        return ans;
    }
    Ma operator^(int n) const{
        Ma ans;ans.unit();
        Ma A=*this;
        while(n){
            if(n&1){
                ans=ans*A;
                A=A*A;
                n>>1;
            }
        }
        return ans;
    }
    void show(){
        cout<<"矩阵"<<endl;
        for(int i=0;i<M;i++){
            for(int j=0;j<M;j++){
                cout<<a[i][j]<<" ";
            }
            cout<<endl;
        }
    }
};
int main(){
    long long N,M;
    cin>>N>>M;//总共N个题目,M次提交
   	string ptr[100005]="WA";
   	long long  p;
   	string s;
	long long co=0,wo=0; 
	for(long long  i=0;i<M;i++){
		cin>>p>>s;
		if(ptr[p]=="WA"){
			if(s=="WA"){
				wo++;
				ptr[p]="WA";
			}else if(s=="AC"){
				co++;
				ptr[p]="AC";
			}
		}else if(ptr[p]=="AC"){
			continue;
		}
	}
	cout<<co<<" "<<wo; 
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:101:28: error: array must be initialized with a brace-enclosed initializer
  101 |         string ptr[100005]="WA";
      |                            ^~~~
Language: C++

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

int main() {
  int n,m;
  cin >> n>>m;
int a,b,c,d;
  a=0;
    
    
  vector<int> math(m); // N個の数学の点数データ
vector<string>eng(m);
 vector<int>sci(n)

  // 数学の点数データを受け取る
  for (int i = 0; i < m; i++) {
    cin >> math.at(i)>>eng.at(i);
  }

 
  // 合計点を出力
  for(int j=0; j<n;)
  for (int i = 0; i < m; i++) {
    if(math.at(i)!=sci.at(j))
    if (eng.at(i)=="WA")
      d++;
     else if(eng.at(i)=="AC"){
        c++;
        sci.at(j)=n;
       j++;
       
          
      }
  }
   }

 
    
    
  
    cout <<c<<" "<<d<<endl ;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:3: error: expected ',' or ';' before 'for'
   16 |   for (int i = 0; i < m; i++) {
      |   ^~~
a.cc:16:19: error: 'i' was not declared in this scope
   16 |   for (int i = 0; i < m; i++) {
      |                   ^
a.cc: At global scope:
a.cc:41:5: error: 'cout' does not name a type
   41 |     cout <<c<<" "<<d<<endl ;
      |     ^~~~
a.cc:43:1: error: expected declaration before '}' token
   43 | }
      | ^
Language: C

#include <iostream>
#include<string.h>
using namespace std;
int main(){
    int que=0,go=0,countac=0,count=0,countwa=0;
    cin>>que;
    cin>>go;
    int arraysu[go];
    string arrayju[go];
    for(int f=0;f<go;f++){
        cin>>arraysu[f];
        cin>>arrayju[f];
       
        if(arrayju[f]=="WA"){
            count+=1;
        }
        if(arrayju[f]=="AC"){
            countac+=1;
            if(arraysu[f]==arraysu[f-1]&&arrayju[f]==arrayju[f-1]){
                
            countac-=1;
            }
            countwa+=count;
            count=0;
        }
    }
    cout<<countac;
    cout<<countwa;
    return 0;
}


Compiler output:
main.c:1:10: fatal error: iostream: No such file or directory
    1 | #include <iostream>
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n,m;
    cin>>n>>m;
    vector<pair<int,string> >vp;
    int arr[100010]={0};
    for(int i=0; i<m; i++)
    {
        int a;
        string s;
        cin>>a>>s;
        vp.push_back({a,s});
    }
    sort(v.begin(),v.end());
    int cnt=0,cnt1=0;
    if(m==1)
    {
        if(vp[0].second == "AC")
            cout<<1<<" "<<0<<endl;
        else
            cout<<0<<" "<<1<<endl;
    }
    else
    {
        for(int i=0; i<m; i++)
        {
            int u =vp[i].first;
            string v = vp[i].second;
            if(v == "AC" && arr[u] <=0)
            {
                arr[u]++;
                cnt++;

            }
            if( v == "WA" && arr[u] <=0)
            {
                cnt1++;
            }
        }
        cout<<cnt<<" "<<cnt1<<endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:10: error: 'v' was not declared in this scope; did you mean 'vp'?
   16 |     sort(v.begin(),v.end());
      |          ^
      |          vp
Language: C++

#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
using namespace std;

int main() {
    int N, M;
    cin >> N >> M;
    int p[M];
    vector<int> vec1;
    string S[M];
    int a=0;
    vec1.push_back(0);
    for (int i=0; i<M; i++) {
        cin >> p[i];
        cin >> S[i];
        if (p[i] != p[i-1]) {
            vec1.push_back(i);
        }
    }
    vec1.push_back(M-1);
    int pe =0;
    int cor=0;
    for (int i=0; i<vec1.size()-1; i++) {
        for ( int j=vec1[i]; j < vec1[i+1]; j++) {
            if(S[j] =="AC") {
                cor ++;
                break;
            }
            else {
                pe ++;
            }
            }
        }
        cout << cor << endl;
        cout << pe << endl;
    }
2 5
1 WA
1 AC
2 WA
2 AC
2 WA

Compiler output:
a.cc:39:1: error: expected unqualified-id before numeric constant
   39 | 2 5
      | ^
Language: C++

#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;

int main(){
long long int n=0,
long long int m=0;
long long sum=0;
long long sum2=0;
long long int a;
string b;
cin>>n>>m;
vector<int> c(9999999);
for(long long int i=0;i<n;i++){
	c[i]=0;
}
for(long long int i=0;i<m;i++){
    cin>>a>>b;
    if(c[a-1]==0&&b=="AC"){
       c[a-1]=1;
       sum2++;
    }
    else if(c[a-1]==0&&b=="WA"){
        sum++;
    }
    else{}

}


cout<<sum2<<" "<<sum<<endl;
	 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:1: error: expected unqualified-id before 'long'
    8 | long long int m=0;
      | ^~~~
a.cc:13:9: error: 'm' was not declared in this scope
   13 | cin>>n>>m;
      |         ^
Language: C++

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

int main(){
  int N,M,Asum = 0,Wsum1 = 0,Wsum2 = 0;
  cin >> N >> M;
  vector<int> p(M);
  vector<string> S(M);
  for (int i = 0; i < M; i++){
    cin >> p.at(i) >> S.at(i);
    //もしACだとしたら
    if (S.at(i) == "AC"){
      Asum++;
      Wsum2 = 0;
      for (int j = 0; j < i; j++){
        if (p.at(i) == p.at(j)){
          if (S.at(j) == "WA") {
            Wsum1++;
            Wsum2++;
          }
          else {
            Asum--;
            Wsum -= Wsum2;
            break;
          }
        }
      }
    }
  }
  cout << Asum << ' ' << Wsum1 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:13: error: 'Wsum' was not declared in this scope; did you mean 'Wsum2'?
   23 |             Wsum -= Wsum2;
      |             ^~~~
      |             Wsum2
Language: C++

#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;

int main(){
long long int n=0,
long long intm=0;
long long sum=0;
long long sum2=0;
long long int a;
string b;
cin>>n>>m;
vector<int> c(9999999);
for(long long int i=0;i<n;i++){
	c[i]=0;
}
for(long long int i=0;i<m;i++){
    cin>>a>>b;
    if(c[a-1]==0&&b=="AC"){
       c[a-1]=1;
       sum2++;
    }
    else if(c[a-1]==0&&b=="WA"){
        sum++;
    }
    else{}

}


cout<<sum2<<" "<<sum<<endl;
	 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:1: error: expected unqualified-id before 'long'
    8 | long long intm=0;
      | ^~~~
a.cc:13:9: error: 'm' was not declared in this scope
   13 | cin>>n>>m;
      |         ^
Language: Java

import java.util.*;

public class Main {

    public static void main(String[] args) {

        Scanner s = new Scanner(System.in);
        int N = s.nextInt();
        int M = s.nextInt();
        int[] P = new int[M];
        String[] S = new String[M];
        int right = 0;
        int num = 0;
        int wrong = 0;

        for (int i = 0; i < M; i++) {
            int tem = s.nextInt();
            P[i] = tem;
            String tem2 = s.next();
            S[i] = tem2;
            if ()
                if (tem2.equals("AC")) {
                    right = right + 1;

                } else if (tem2.equals("WA")){
                    wrong = wrong + 1;
                }


        }
        System.out.println(right + " " + wrong);

    }
}



Compiler output:
Main.java:21: error: illegal start of expression
            if ()
                ^
1 error
Language: C

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


int main(){
  int n,m;
  int i;
  int pena=0;
  int check=0;
  char ac[]="AC";
  char wa[]="WA";
  scanf("%d %d",&n,&m);
  abc tmp[m];
  int q[n];
  for(i=0;i<m;i++){
    int list_num;
    char list_j[];
    scanf("%d %s",&list_num,list_j);
    if(strcmp(list_j,wa)==0 &&q[list_num-1]!=1){
      pena++;
    }
    if(strcmp(list_j,ac)==0 &&q[list_num-1]!=1){
      q[list_num-1]=1;
      check++;
    }
  }

  printf("%d %d",check,pena);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:14:3: error: unknown type name 'abc'
   14 |   abc tmp[m];
      |   ^~~
main.c:18:10: error: array size missing in 'list_j'
   18 |     char list_j[];
      |          ^~~~~~
Language: C++

#include<bits/stdc++.h>
#define llt long long  int
#define ullt unsigned long long int
using namespace std;
void fast(){
        ios_base::sync_with_stdio(false);
        cin.tie(0);
        cout.tie(0);
    }
int main()
{
    fast();
    int n,m,c1=0,c2=0;
    cin>>n>>m;
    int arr1[n]={0},arr2={0};
    for(int i=0;i<m;i++)
    {
        int p;
        string s;
        cin>>p>>s;
        if(arr1[p-1]==0&&s=="AC"){
        c1++;
        arr1[p-1]=1;}
        else if(s=="WA"&&arr1[p-1]==0)
        {
            c2++;
        }
        else if(arr1[p-1]==1&&s=="AC"&&arr2[p-1]==0){
        c2++;
        arr2[p-1]=1;}
    }
    cout<<c1<<" "<<c2;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:44: error: invalid types 'int[int]' for array subscript
   28 |         else if(arr1[p-1]==1&&s=="AC"&&arr2[p-1]==0){
      |                                            ^
a.cc:30:13: error: invalid types 'int[int]' for array subscript
   30 |         arr2[p-1]=1;}
      |             ^
Language: C++

#include <vector>
#include <math.h>
#include <iostream>
#include <string>
#include <algorithm>
#include <queue>
#include <iomanip>
#include <deque>
#include <map>

typedef long long ll;
#define rep(i, a, n) for(ll i = a; i<n; i++)
#define ALL(a) begin(a), end(a)
#define mii map<int, int>
#define msi map<string, int>
#define vi vector<int>
#define vl vector<ll>
#define MOD 1000000007
#define INF 1e9
#define showVector(v) rep(i,0,v.size()){p(v[i]);p(" ")} pl("")
#define p(s) std::cout << s ;
#define pl(s)  std::cout << s << endl;
using namespace std;

int main() {
    ll N, M;
    cin >> N >> M;

    vector<pair<ll, string> > a(M);
    string s;
    vector<pair<bool, int> > dp(N);
    dp[0].first = false;
    dp[0].second = 0;

    rep(i, 1, N+1) {
        dp[i].first = false;
    }

    rep(i, 0, M) {
        cin >> a[i].first
        // >> a[i].second;
        cin >> s;
    }

 
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:40:26: error: expected ';' before 'cin'
   40 |         cin >> a[i].first
      |                          ^
      |                          ;
   41 |         // >> a[i].second;
   42 |         cin >> s;
      |         ~~~
Language: C++

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

int main() {

int N,M;
 cin >> N >>M;
 int pi[N];
 string si[N];
  int k[N];
 int sama=0, samb=0;
 for(int i=0;i<N;i++){
  cin >>pi[i]>>si[i];
  k[i]=0;
  }
  if(M==0){
   cout<<sama<<endl;
   cout<<samb<<endl;}
   else{
  int i=1;
  for(int j=0;j<M;j++){
  if(k[pi[j]]==0){
  if(si[j]=="AC"){
  sama++;
  k[pi[j]]++;}
  else samb++;}}
 

Compiler output:
a.cc: In function 'int main()':
a.cc:26:17: error: expected '}' at end of input
   26 |   else samb++;}}
      |                 ^
a.cc:19:8: note: to match this '{'
   19 |    else{
      |        ^
a.cc:26:17: error: expected '}' at end of input
   26 |   else samb++;}}
      |                 ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

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

int main() {

int N,M;
 cin >> N >>M;
 int pi[N];
 string si[N];
  int k[N];
 int sama=0, samb=0;
 for(int i=0;i<N;i++){
  cin >>pi[i]>>si[i];
  k[i]=0;
  }
  if(M==0){
   cout<<sama<<endl;
   cout<<samb<<endl;}
   else{}
  int i=1;
  for(int j=0;j<M;j++){
  if(k[pi[j]]==0){
  if(si[j]=="AC"){
  sama++;
  k[pi[j]]++;}
  else samb++;}}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:17: error: expected '}' at end of input
   26 |   else samb++;}}
      |                 ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

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

int main(){
  
  int n,m,ac=0,wa=0;
  cin >> n >> m;
  
  vector<int>p(m);
  vector<string>s(m);
  vector<vector<string>>Q(n+1,vector<string>(m));
  
  rep(i,m){
    cin >> p.at(i) >> s.at(i);
    Q.at(p.at(i)).at(i)=s.at(i) ;
  }
  
  rep(i, n+1){
    rep(j,m){
      if(Q.at(i).at(j)=="WA")
        wa++;
      else if(Q.at(i).at(j)=="AC"){
        ac++;
        break;
      else break;
      }
    }
  }
  
  cout << ac << " " << wa;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:7: error: expected '}' before 'else'
   26 |       else break;
      |       ^~~~
a.cc:23:35: note: to match this '{'
   23 |       else if(Q.at(i).at(j)=="AC"){
      |                                   ^
a.cc: At global scope:
a.cc:31:3: error: 'cout' does not name a type
   31 |   cout << ac << " " << wa;
      |   ^~~~
a.cc:32:1: error: expected declaration before '}' token
   32 | }
      | ^
Language: C++

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

int main()
{
  long p_number,s_number,i,k,a,e,j,t;
  k=0;
  a=0;
  e=0;
  t=0
  cin >> p_number >> s_number;
  int p_hantei[s_number];
  int wa=0;
  int ac=0;
  int ok[p_number]={};
  string s_hantei[s_number];
  
  for(i=0;i<s_number;i++)
  {
    cin >>p_hantei[i] >>s_hantei[i];
  }
  for(i=0;i<s_number;i++)
  {
    if(equal(s_hantei[i].begin(),s_hantei[i].end(),"AC"))
    {
      for(j=0;j<a;j++)
      {
        if(ok[j]==p_hantei[i])
        {
          e=1;
          break;
        }
        
      }
      if(e==0)
      {
       ok[a]=p_hantei[i];
	   ac++;
       a++;
       wa=wa+t;
      }else
      {
        
        e=0;
      }
    }else if(equal(s_hantei[i].begin(),s_hantei[i].end(),"WA"))
    {
     t++; 
    }
  }
  
   cout <<ac<<" "<<wa; 
  
}



Compiler output:
a.cc: In function 'int main()':
a.cc:10:6: error: expected ';' before 'cin'
   10 |   t=0
      |      ^
      |      ;
   11 |   cin >> p_number >> s_number;
      |   ~~~
Language: C++

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

int main() {
  int n,m;
  cin >> n>>m;
int a,b,c,d;
  a=0;
    
    
  vector<int> math(m); // N個の数学の点数データ
vector<string>eng(m);
  

  // 数学の点数データを受け取る
  for (int i = 0; i < m; i++) {
    cin >> math.at(i)>>eng.at(i);
  }

 for(int j=0;j<n;j++){
  // 合計点を出力
  for (int i = 0; i < m; i++) {
    if (eng.at(i)==WA)
      d++;
      if(eng.at(i)==AC){
        c++;
        break ;
      }
  }
   }
 
    
    
  
    cout <<c<<d<<endl ;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:20: error: 'WA' was not declared in this scope
   23 |     if (eng.at(i)==WA)
      |                    ^~
a.cc:25:21: error: 'AC' was not declared in this scope
   25 |       if(eng.at(i)==AC){
      |                     ^~
Language: C++

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

int main(void) {
    int inputN = 0;
    int inputM = 0;
    scanf("%d", &inputN);
    scanf("%d", &inputM);
    // printf("%d\n", inputN);
    // printf("%d\n", inputM);
    int inputPi = 0;
    char inputS[3] = {};
    int param[100000][2] = {};
    int resultAC = 0;
    int resultWA = 0;
    for(int i=0; i<inputM; ++i) {
        scanf("%d", &inputPi);
        scanf("%s", inputS);
        if(strcmp("AC", inputS) == 0) {
            if(param[inputPi][1] == 0) {
                param[inputPi][1] = 1;
                resultAC++;
            }
        } else if(strcmp("WA", inputS) == 0) {
            if(param[inputPi][1] == 0) {
                param[inputPi][0]++;
                resultWA++;
            }
        }
    }
    printf("%d %d\n", resultAC, resultWA);
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:12: error: 'strcmp' was not declared in this scope
   19 |         if(strcmp("AC", inputS) == 0) {
      |            ^~~~~~
a.cc:3:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include <string>
  +++ |+#include <cstring>
    3 |
Language: C++

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

int main() {
  int n, m;

  cin >> n >> m;

  int ac = 0; 
  int wa = 0;
  int p_old = -1;
  vector <int> p_array(n, -1);
  int count = 0;
  for(int i = 0; i < m; ++i) {
    int p;
    string s;
    cin >> p >> s;

    auto it = find(p_array.begin(), p_array.begin() + count, p);
    if (it == p_array.begin() + count) {
      // 見つからなかった
      if (s == "AC") {
        ac++;
        p_array[count] = p;
        count++;
      } else {
        if (s == "WA") {
          wa++;
        }
      }
    }

  }
    cout << ac;
    cout  << " ";
    cout << wa << endl;

  return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:39:12: error: expected '}' at end of input
   39 |   return 0;
      |            ^
a.cc:5:12: note: to match this '{'
    5 | int main() {
      |            ^
Language: C++

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

int main() {
  int n,m;
  cin >> n>>m;
int a,b,c,d;
  a=0;
    
    
  vector<int> math(m); // N個の数学の点数データ
vector<string>eng(m);
  vector

  // 数学の点数データを受け取る
  for (int i = 0; i < m; i++) {
    cin >> math.at(i)>>eng.at(i);
  }

 for(int i=0;i<m;i++){
  // 合計点を出力
  for (int i = 0; i < m; i++) {
    if (eng.at(i)==WA)
      d++;
      if(eng.at(i)==AC){
        c++;
        break ;
      }
  }
   }
 
    
    
  
    cout <<c<<d<<endl ;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:3: error: expected unqualified-id before 'for'
   16 |   for (int i = 0; i < m; i++) {
      |   ^~~
a.cc:16:19: error: 'i' was not declared in this scope
   16 |   for (int i = 0; i < m; i++) {
      |                   ^
a.cc:23:20: error: 'WA' was not declared in this scope
   23 |     if (eng.at(i)==WA)
      |                    ^~
a.cc:25:21: error: 'AC' was not declared in this scope
   25 |       if(eng.at(i)==AC){
      |                     ^~
Language: C++

#include<iostream>
#include<map>
#include<vector>
#include<algorithm>
#include<string>
using namespace std;
typedef long long ll;

main(void){
  int n,m;
  cin >> n >>m;
  int pi[m];
  string si[m];
  int zero[100000] = 0;
  for(int i=0;i<m;i++){
     cin >> pi[i] >> si[i];
     zero[pi[i]]++;
  }
  int count =0; 
  int ACcount =0;
  for(int i=1;i<=n;i++){
     if(zero[i]==0)continue;
     int tcount=0;
     bool bol= false;
     for(int j=0;j<m;j++){
        if(pi[j] == i && si[j]=="WA"){
           tcount++;
           count++;
        }else if(pi[j] == i && si[j]=="AC"){ 
           ACcount++;
           bol = true;
           break;
        }
     }
     if(bol == false)count -= tcount;
  }
  cout << ACcount <<" " <<count;
return 0;
}


Compiler output:
a.cc:9:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    9 | main(void){
      | ^~~~
a.cc: In function 'int main()':
a.cc:14:22: error: array must be initialized with a brace-enclosed initializer
   14 |   int zero[100000] = 0;
      |                      ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
 
int main() {
int N,M;
 
int AC=0;
int WA=0;
vector<string> Si(100000);
vector<int> pi(100000);
 
cin >> N >> M;

 
for(int i=1; i-1 < M; i++){
    cin >> pi.at(i) >> Si.at(i);
    if(Si.at(i)=="AC"){
        if(pi.at(i)!=AC){
            if(pi.at(i)!=pi.at(i-1)){
        AC++;
            }
        }
    }
    else if(Si.at(i)=="WA"){
        if(pi.at(i)!=AC){
                if(pi.at(i)!=pi.at(i-1)){
        WA++;
                }
        }
    }
    
}
cout << AC <<' '<< WA <<endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:34:30: error: expected '}' at end of input
   34 | cout << AC <<' '<< WA <<endl;
      |                              ^
a.cc:5:12: note: to match this '{'
    5 | int main() {
      |            ^
Language: Java

    import java.util.*;


    public class Main {
        public static void main(String[] args) {
            Scanner sc = new Scanner(System.in);
            long n = sc.nextLong();
            long m = sc.nextLong();
            long a[][] = new long[(int)m][2];
            if(m == 0){
                System.out.println("0 0");
            }else{
                for(long i=0;i<m;i++){
                    a[(int)i][0] = sc.nextLong();
                    String wk = sc.next();
                    if(wk.equals("AC")){
                        a[(int)i][1] = (long) 0;
                    }else{
                        a[(int)i][1] = (long) 1;
                    }
                }
                System.out.println(ret(m,a));
            }
        }
        static String ret(long m, long[][] a){
            Map<Long, Long> b = new HashMap<>();
            long ac = 0;
            long wc = 0;
          	int cnt[] = new int[(int)m]; 
            for(long i=0;i<m;i++) {
              int wknum = (int)a[(int)i][0];
                if(b.containsKey(a[(int)i][0])){
                    if(b.get(a[(int)i][0]) == 1){
                        if(a[(int)i][1] == 0){
                            ac ++;
                            b.put(a[(int)i][0],a[(int)i][1]);
                            wc = wc + cnt[wknum];
                        }elseå{
                            cnt[wknum] ++;
                        }
                    }
                }else{
                    if(a[(int)i][1] == 0){
                        ac ++;
                    }else{
                        cnt[wknum] ++;
                    }
                    b.put(a[(int)i][0],a[(int)i][1]);
                }
            }
            String ret = Long.toString(ac) + " " + Long.toString(wc);
            return ret;
        }
    }

Compiler output:
Main.java:38: error: not a statement
                        }else?{
                         ^
Main.java:38: error: ';' expected
                        }else?{
                              ^
2 errors
Language: Java

import java.util.ArrayList;
import java.util.Scanner;
 
class Result {
	public int probNum;
	public String result;
 
	public Result(int probNum, String result) {
		this.probNum = probNum;
		this.result = result;
	}
}
 
public class Main {
 
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int m = scan.nextInt();
		ArrayList<Result> results = new ArrayList<Result>();
		for(int i=0; i<m; ++i)  {
			Result result = new Result(scan.nextInt(), scan.next());
			results.add(result);
		}
		scan.close();
 
		// ペナルティ数
		int collectNum = 0;
		int penaNum = 0;
		ArrayList<Integer> alreadyChecked = new ArrayList<Integer>();
		for(Result result: results) {
			boolean isSet = alreadyChecked.contains(result.probNum);
			if(result.result.equals("WA") && !isSet) {
				penaNum++;
			}
 
			if(result.result.contentEquals("AC") && !isSet) {
				alreadyChecked.add(result.probNum);
				collectNum ++;
			}
		}
 
		System.out.println(collectNum + " " + penaNum);
 
	}
 
}
import java.util.ArrayList;
import java.util.Scanner;

class Result {
	public int probNum;
	public String result;

	public Result(int probNum, String result) {
		this.probNum = probNum;
		this.result = result;
	}
}

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int m = scan.nextInt();
		ArrayList<Result> results = new ArrayList<Result>();
		for(int i=0; i<m; ++i)  {
			Result result = new Result(scan.nextInt(), scan.next());
			results.add(result);
		}
		scan.close();

		// ペナルティ数
		int collectNum = 0;
		int penaNum = 0;
		ArrayList<Integer> alreadyChecked = new ArrayList<Integer>();
		for(Result result: results) {
			boolean isSet = alreadyChecked.contains(result.probNum);
			if(result.result.equals("WA") && !isSet) {
				penaNum++;
			}

			if(result.result.contentEquals("AC") && !isSet) {
				alreadyChecked.add(result.probNum);
				collectNum ++;
			}
		}

		System.out.println(collectNum + " " + penaNum);

	}

}

Compiler output:
Main.java:48: error: class, interface, enum, or record expected
import java.util.ArrayList;
^
Main.java:49: error: class, interface, enum, or record expected
import java.util.Scanner;
^
2 errors
Language: Java

import java.util.ArrayList;
import java.util.Scanner;

class Result {
	public int probNum;
	public String result;

	public Result(int probNum, String result) {
		this.probNum = probNum;
		this.result = result;
	}
}

public class C {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int m = scan.nextInt();
		ArrayList<Result> results = new ArrayList<Result>();
		for(int i=0; i<m; ++i)  {
			Result result = new Result(scan.nextInt(), scan.next());
			results.add(result);
		}
		scan.close();

		// ペナルティ数
		int collectNum = 0;
		int penaNum = 0;
		ArrayList<Integer> alreadyChecked = new ArrayList<Integer>();
		for(Result result: results) {
			boolean isSet = alreadyChecked.contains(result.probNum);
			if(result.result.equals("WA") && !isSet) {
				penaNum++;
			}

			if(result.result.contentEquals("AC") && !isSet) {
				alreadyChecked.add(result.probNum);
				collectNum ++;
			}
		}

		System.out.println(collectNum + " " + penaNum);

	}

}

Compiler output:
Main.java:14: error: class C is public, should be declared in a file named C.java
public class C {
       ^
1 error
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;
    map<int,string> mp;
    int key;
    string han;
    int wa = 0,ac = 0;
    int acc[];
    int tome = 1;
    rep(i,m){
        cin >> key >> han;
        mp[key] = han;
        if(mp[key] == "WA"){
            if(tome) wa++;
        }
        else if(acc[key] != 1){
            ac++;
            acc[key] = 1;
            if(key == n) tome = 0;
        }
    }
    cout << ac << ' ' << wa;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:9: error: storage size of 'acc' isn't known
   13 |     int acc[];
      |         ^~~
Language: C++

#include<iostream>
using namespace std;
#include<string.h>
int main()
{int n,m,int a[10],i,cnt=0,cnt1=0;
 string s[10];
 cin>>n>>m;
 for(i=0;i<m;i++)
   cin>>a[i]>>s[i];
 for(i=0;i<m;i++)
 {if(s[i]=='AC')
 {++cnt;continue;}
  else if(s[i]=='WA')
  ++cnt1;}
 cout<<cnt<<cnt1;
 return 0;}
 
 

Compiler output:
a.cc:11:12: warning: multi-character character constant [-Wmultichar]
   11 |  {if(s[i]=='AC')
      |            ^~~~
a.cc:13:17: warning: multi-character character constant [-Wmultichar]
   13 |   else if(s[i]=='WA')
      |                 ^~~~
a.cc: In function 'int main()':
a.cc:5:10: error: expected unqualified-id before 'int'
    5 | {int n,m,int a[10],i,cnt=0,cnt1=0;
      |          ^~~
a.cc:8:6: error: 'i' was not declared in this scope
    8 |  for(i=0;i<m;i++)
      |      ^
a.cc:9:9: error: 'a' was not declared in this scope
    9 |    cin>>a[i]>>s[i];
      |         ^
a.cc:10:6: error: 'i' was not declared in this scope
   10 |  for(i=0;i<m;i++)
      |      ^
a.cc:12:5: error: 'cnt' was not declared in this scope; did you mean 'int'?
   12 |  {++cnt;continue;}
      |     ^~~
      |     int
a.cc:14:5: error: 'cnt1' was not declared in this scope
   14 |   ++cnt1;}
      |     ^~~~
a.cc:15:8: error: 'cnt' was not declared in this scope; did you mean 'int'?
   15 |  cout<<cnt<<cnt1;
      |        ^~~
      |        int
a.cc:15:13: error: 'cnt1' was not declared in this scope
   15 |  cout<<cnt<<cnt1;
      |             ^~~~
Language: Java

import java.util.ArrayList;
import java.io.IOException;
import java.util.NoSuchElementException;

public class Main {

	public static void main(String[] args) {
		FastScanner fScanner = new FastScanner();
		int N = fScanner.nextInt();
		int M = fScanner.nextInt();
		ArrayList<ArrayList<String>> list = new ArrayList<ArrayList<String>>() {
			{
				for (int i = 0; i < N; i++) {
					add(new ArrayList<String>());
				}
			}
		};
		for (int i = 0; i < M; i++) {
			int index = Integer.parseInt(fScanner.next()) - 1;
			list.get(index).add(fScanner.next());
		}
		int ans = 0;
		int penalty = 0;
		for (int i = 0; i < N; i++) {
			int tmpPenalty = 0;
			int correct = 0;
			for (int j = 0; j < list.get(i).size(); j++) {
				if (list.get(i).get(j).equals("WA")) {
					tmpPenalty++;
				}
				if (list.get(i).get(j).equals("AC")) {
					correct++;
					break;
				}
			}
			if (correct == 1) {
				ans++;
				penalty += tmpPenalty;
			}
		}
		System.out.println(ans + " " + penalty);
	}
}

class FastScanner {
	private final InputStream in = System.in;
	private final byte[] buffer = new byte[1024];
	private int ptr = 0;
	private int buflen = 0;

	private boolean hasNextByte() {
		if (ptr < buflen) {
			return true;
		} else {
			ptr = 0;
			try {
				buflen = in.read(buffer);
			} catch (IOException e) {
				e.printStackTrace();
			}
			if (buflen <= 0) {
				return false;
			}
		}
		return true;
	}

	private int readByte() {
		if (hasNextByte())
			return buffer[ptr++];
		else
			return -1;
	}

	private static boolean isPrintableChar(int c) {
		return 33 <= c && c <= 126;
	}

	public boolean hasNext() {
		while (hasNextByte() && !isPrintableChar(buffer[ptr]))
			ptr++;
		return hasNextByte();
	}

	public String next() {
		if (!hasNext())
			throw new NoSuchElementException();
		StringBuilder sb = new StringBuilder();
		int b = readByte();
		while (isPrintableChar(b)) {
			sb.appendCodePoint(b);
			b = readByte();
		}
		return sb.toString();
	}

	public long nextLong() {
		if (!hasNext())
			throw new NoSuchElementException();
		long n = 0;
		boolean minus = false;
		int b = readByte();
		if (b == '-') {
			minus = true;
			b = readByte();
		}
		if (b < '0' || '9' < b) {
			throw new NumberFormatException();
		}
		while (true) {
			if ('0' <= b && b <= '9') {
				n *= 10;
				n += b - '0';
			} else if (b == -1 || !isPrintableChar(b)) {
				return minus ? -n : n;
			} else {
				throw new NumberFormatException();
			}
			b = readByte();
		}
	}

	public int nextInt() {
		long nl = nextLong();
		if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE)
			throw new NumberFormatException();
		return (int) nl;
	}

	public double nextDouble() {
		return Double.parseDouble(next());
	}
}

Compiler output:
Main.java:46: error: cannot find symbol
	private final InputStream in = System.in;
	              ^
  symbol:   class InputStream
  location: class FastScanner
1 error
Language: Java

import java.util.ArrayList;

public class Main {

	public static void main(String[] args) {
		FastScanner fScanner = new FastScanner();
		int N = fScanner.nextInt();
		int M = fScanner.nextInt();
		ArrayList<ArrayList<String>> list = new ArrayList<ArrayList<String>>() {
			{
				for (int i = 0; i < N; i++) {
					add(new ArrayList<String>());
				}
			}
		};
		for (int i = 0; i < M; i++) {
			int index = Integer.parseInt(fScanner.next()) - 1;
			list.get(index).add(fScanner.next());
		}
		int ans = 0;
		int penalty = 0;
		for (int i = 0; i < N; i++) {
			int tmpPenalty = 0;
			int correct = 0;
			for (int j = 0; j < list.get(i).size(); j++) {
				if (list.get(i).get(j).equals("WA")) {
					tmpPenalty++;
				}
				if (list.get(i).get(j).equals("AC")) {
					correct++;
					break;
				}
			}
			if (correct == 1) {
				ans++;
				penalty += tmpPenalty;
			}
		}
		System.out.println(ans + " " + penalty);
	}
}

Compiler output:
Main.java:6: error: cannot find symbol
		FastScanner fScanner = new FastScanner();
		^
  symbol:   class FastScanner
  location: class Main
Main.java:6: error: cannot find symbol
		FastScanner fScanner = new FastScanner();
		                           ^
  symbol:   class FastScanner
  location: class Main
2 errors
Language: C++

#include<stdio.h>
#include<string.h>
int main()
{
	long long int x,y,d=0,N,M,c=0,a=0,s=0,P[100005],i,j=0,Q[100005];char S[2],A[2]="WA",B[2]="AC";
	scanf("%lld %lld",&N,&M);

	for (i=0;i<M;i++)
	{
		c = c+1;
		scanf("%lld %s",&P[i],S);
		x = strcmp(S,A);
		y = strcmp(S,B);
		if (i!=0)
		{
			if (P[i]!=P[i-1])
			{	c=1;
				j=0;
			}
		}

		if (!y && j==0)
		{
			Q[d] = c-1;
			a = a+1;
			j++;
			d++;
			c=0;
		}

	}
	for (i=0;i<101;i++)
	{
		if (i<=d)
		{
			//	printf("\n%lld\n",Q[i]);
			s = s + Q[i];
		}
		else
			break;
	}
	printf("%lld %lld\n",a,s);
	return 0;
}





Compiler output:
a.cc: In function 'int main()':
a.cc:5:88: error: initializer-string for 'char [2]' is too long [-fpermissive]
    5 |         long long int x,y,d=0,N,M,c=0,a=0,s=0,P[100005],i,j=0,Q[100005];char S[2],A[2]="WA",B[2]="AC";
      |                                                                                        ^~~~
a.cc:5:98: error: initializer-string for 'char [2]' is too long [-fpermissive]
    5 |         long long int x,y,d=0,N,M,c=0,a=0,s=0,P[100005],i,j=0,Q[100005];char S[2],A[2]="WA",B[2]="AC";
      |                                                                                                  ^~~~
Language: C++

// Author: πα

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

int main()
{
    ios::sync_with_stdio(false), cin.tie(nullptr);
    int n, m;
    cin >> n >> m;
    vector<int> f(n);
    vector<bool> g(n);
    while(m--)
    {
        int p;
        string s;
        cin >> p >> s;
        --p;
        if(s.front() == 'W')
        {
            if(not g[p])
                f[p]++;
        }
        else
            g[p] = 1;
    }
    vector<int> ans(2);
    for(int i = 0; i < n; ++i)
        ans[0] += g[i], ans[1] += g[i]*f[i]
    cout << ans[0] << ' ' << ans[1];
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:30:44: error: expected ';' before 'cout'
   30 |         ans[0] += g[i], ans[1] += g[i]*f[i]
      |                                            ^
      |                                            ;
   31 |     cout << ans[0] << ' ' << ans[1];
      |     ~~~~
Language: C++

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

const int N = 1e5 + 11;
char s[33];
int n, m, AC, WA;
bool mark[N];
int main(){
    cin>>n>>m;
    int pi;
    for(int i = 1;i <= m; i++){
        scanf("%d%s", &pi, s + 1);
        if(s[1] == 'A'){
            if(!mark[pi]){
                mark[pi] = 1;
                AC++;
            }
        }
        else{
            if(!mark[pi]){
                WA++;6 0

            }
        }
    }
    printf("%d %d\n", AC, WA);
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:23: error: expected ';' before numeric constant
   21 |                 WA++;6 0
      |                       ^~
      |                       ;