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

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

int main(){
  ll N,M;
  ll temp=0;
  cin>>N>>M;
  vector<int>question(M);
  vector<string>result(M);
  ll seikai=0;
  ll penelty=0;
  vector<bool>mondai(N);
  for(ll i=0;i<N;i++){
    mondai.at(i)=false;
  }
  for(ll i=0;i<M;i++){
    cin>>question.at(i);
    cin>>result.at(i);
  }
  for(ll i=0;i<M;i++){
    if(result.at(i).at(0)=='W'&&mondai.at(question.at(i)-1)==false){
      temp++;
    }
     else if(result.at(i).at(0)=='A'&&mondai.at(question.at(i)-1)==false){
        seikai++;
        mondai.at(question.at(i)-1)=true;
        penelty+=temp;
        temp=0;
     }
  }
  cout<<seikai<<" "<<penelty<<endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'll' was not declared in this scope
    6 |   ll N,M;
      |   ^~
a.cc:7:5: error: expected ';' before 'temp'
    7 |   ll temp=0;
      |     ^~~~~
      |     ;
a.cc:8:8: error: 'N' was not declared in this scope
    8 |   cin>>N>>M;
      |        ^
a.cc:8:11: error: 'M' was not declared in this scope
    8 |   cin>>N>>M;
      |           ^
a.cc:11:5: error: expected ';' before 'seikai'
   11 |   ll seikai=0;
      |     ^~~~~~~
      |     ;
a.cc:12:5: error: expected ';' before 'penelty'
   12 |   ll penelty=0;
      |     ^~~~~~~~
      |     ;
a.cc:14:9: error: expected ';' before 'i'
   14 |   for(ll i=0;i<N;i++){
      |         ^~
      |         ;
a.cc:14:14: error: 'i' was not declared in this scope
   14 |   for(ll i=0;i<N;i++){
      |              ^
a.cc:17:9: error: expected ';' before 'i'
   17 |   for(ll i=0;i<M;i++){
      |         ^~
      |         ;
a.cc:17:14: error: 'i' was not declared in this scope
   17 |   for(ll i=0;i<M;i++){
      |              ^
a.cc:21:9: error: expected ';' before 'i'
   21 |   for(ll i=0;i<M;i++){
      |         ^~
      |         ;
a.cc:21:14: error: 'i' was not declared in this scope
   21 |   for(ll i=0;i<M;i++){
      |              ^
a.cc:23:7: error: 'temp' was not declared in this scope; did you mean 'tm'?
   23 |       temp++;
      |       ^~~~
      |       tm
a.cc:26:9: error: 'seikai' was not declared in this scope
   26 |         seikai++;
      |         ^~~~~~
a.cc:28:9: error: 'penelty' was not declared in this scope
   28 |         penelty+=temp;
      |         ^~~~~~~
a.cc:28:18: error: 'temp' was not declared in this scope; did you mean 'tm'?
   28 |         penelty+=temp;
      |                  ^~~~
      |                  tm
a.cc:32:9: error: 'seikai' was not declared in this scope
   32 |   cout<<seikai<<" "<<penelty<<endl;
      |         ^~~~~~
a.cc:32:22: error: 'penelty' was not declared in this scope
   32 |   cout<<seikai<<" "<<penelty<<endl;
      |                      ^~~~~~~
Language: C++

int main(){
    int N, M;
    cin >> N >> M;
    bool ac[100001] = {};
    int  wa[100001] = {};
    int wa_cnt = 0;
    int ac_cnt = 0;
    for(int i = 0; i < M; i++ ){
        int num;
        string result;
        cin >> num >> result;
        if(ac[num] == false && result == "WA"){
            wa[num]++;
        }
        else if (ac[num] == false && result == "AC"){
            ac[num] = true;
            wa_cnt += wa[num];
            ac_cnt++;
        }
    }
    cout << ac_cnt << " " << wa_cnt << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:5: error: 'cin' was not declared in this scope
    3 |     cin >> N >> M;
      |     ^~~
a.cc:10:9: error: 'string' was not declared in this scope
   10 |         string result;
      |         ^~~~~~
a.cc:11:23: error: 'result' was not declared in this scope
   11 |         cin >> num >> result;
      |                       ^~~~~~
a.cc:21:5: error: 'cout' was not declared in this scope
   21 |     cout << ac_cnt << " " << wa_cnt << endl;
      |     ^~~~
a.cc:21:40: error: 'endl' was not declared in this scope
   21 |     cout << ac_cnt << " " << wa_cnt << endl;
      |                                        ^~~~
Language: C++

#include <cstdio>

#define maxn 100010
bool ac[maxn];
int pen[maxn];
int main()
{
  int n, m, sol = 0, sp = 0; scanf("%d%d", &n, &m);
  for (int i = 1; i <= m; ++i)
  {
    int pid; char state[20]; scanf("%d%s", &pid, state);
    if (state[0] == 'A')
    {
      if (!ac[pid]) ++sol;
      ac[pid] = 1;
    }
    else
    {
      if (!ac[pid]) ++pen[pid];
    }
  }
  for (int i = 1; i <= n; ++i)
    if (ac[pid]) sp += pen[i];
  printf("%d %d\n", sol, sp);
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:12: error: 'pid' was not declared in this scope
   23 |     if (ac[pid]) sp += pen[i];
      |            ^~~
Language: C++

#include <cstdio>

#define maxn 100010
bool ac[maxn];
int pen[maxn];
int main()
{
  int n, m, sol = 0, sp = 0; scanf("%d%d", &n, &m);
  for (int i = 1; i <= m; ++i)
  {
    int pid; char state; scanf("%d%s", &pid, state);
    if (state[0] == 'A')
    {
      if (!ac[pid]) ++sol;
      ac[pid] = 1;
    }
    else
    {
      if (!ac[pid]) ++pen[pid];
    }
  }
  for (int i = 1; i <= n; ++i)
    if (ac[pid]) sp += pen[i];
  printf("%d %d\n", sol, sp);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:14: error: invalid types 'char[int]' for array subscript
   12 |     if (state[0] == 'A')
      |              ^
a.cc:23:12: error: 'pid' was not declared in this scope
   23 |     if (ac[pid]) sp += pen[i];
      |            ^~~
Language: C++

#include <cstdio>

#define maxn 100010
bool ac[maxn];
int main()
{
  int n, m, sol = 0, pen = 0; scanf("%d%d", &n, &m);
  for (int i = 1; i <= m; ++i)
  {
    int pid; char state; scanf("%d%s", &pid, state);
    if (state[0] == 'A')
    {
      if (!ac[pid]) ++sol;
      ac[pid] = 1;
    }
    else
    {
      if (!ac[pid]) ++pen;
    }
  }
  printf("%d %d\n", sol, pen);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:14: error: invalid types 'char[int]' for array subscript
   11 |     if (state[0] == 'A')
      |              ^
Language: C++

n, m = map(int, input().split())
results = []
for i in range(m):
    results.append(input().split())
passed = 0
failed = 0
dicto = {}
for item in results:
    if item[0] not in dicto.keys():
        dicto[item[0]] = []
        dicto[item[0]].append(item[1])
        if item[1] == 'WA':
            failed += 1
        else:
            passed += 1
    else:
        if item[1] not in dicto[item[0]]:
            dicto[item[0]].append(item[1])
            if item[1] == 'AC':
                passed += 1
        else:
            if item[1] == 'WA' and 'AC' not in dicto[item[0]]:
                failed += 1
print(passed, failed)

Compiler output:
a.cc:12:23: warning: multi-character character constant [-Wmultichar]
   12 |         if item[1] == 'WA':
      |                       ^~~~
a.cc:19:27: warning: multi-character character constant [-Wmultichar]
   19 |             if item[1] == 'AC':
      |                           ^~~~
a.cc:22:27: warning: multi-character character constant [-Wmultichar]
   22 |             if item[1] == 'WA' and 'AC' not in dicto[item[0]]:
      |                           ^~~~
a.cc:22:36: warning: multi-character character constant [-Wmultichar]
   22 |             if item[1] == 'WA' and 'AC' not in dicto[item[0]]:
      |                                    ^~~~
a.cc:1:1: error: 'n' does not name a type
    1 | n, m = map(int, input().split())
      | ^
a.cc:8:1: error: expected unqualified-id before 'for'
    8 | for item in results:
      | ^~~
Language: Java

import java.util.Scanner;
class Main
{
  public static void main(String[] agh)
  {
    Scanner sc=new Scanner(System.in);
    int n,m;
    int cor=0,inc=0;
    int[] x=new int[n+1];
    for(int i=0;i<n;i++)
      System.out.println(x[i]);
    for(int i=0;i<m;i++)
    {
      int que=sc.nextInt();
      String sta=sc.nextLine();
      if(x[que]==0 && sta.equals(" AC"))
      {
        x[que]=1;
        cor++;
      }
      else 
      {
        if(x[que]==0 && sta.equals( "WA"))
        {
          inc++;
        }
      }
    }
      System.out.println(cor+" "+inc);
    
  }
}

Compiler output:
Main.java:9: error: variable n might not have been initialized
    int[] x=new int[n+1];
                    ^
Main.java:12: error: variable m might not have been initialized
    for(int i=0;i<m;i++)
                  ^
2 errors
Language: Java

import java.util.Scanner;
class Main
{
  public static void main(String[] asgda)
  {
    int cor=0;
    int inc=0;
   Scanner sc=new Scanner(System.in);
    int n,m;
    n=sc.nextInt();
    m=sc.nextInt();
    int que;
    String sta;
     int[] x=new int[n+1];
    for(int i=0;i<m;i++)
    {
     que=sc.nextInt();
      String s1=scan.nextLine();
      sta=sc.nextLine();
      if(x[que]==0 && sta.equals("AC"))
      {
        x[que]=1;
        cor++;
      }
      else if(x[que]==0 && sta.equals("WA"))
      {
        inc++;
      }
    }
   
    System.out.println(cor+" "+inc);
   
    
  }
}

Compiler output:
Main.java:18: error: cannot find symbol
      String s1=scan.nextLine();
                ^
  symbol:   variable scan
  location: class Main
1 error
Language: Java

import java.util.Scanner;
class Main
{
  public static void main(String[] asgda)
  {
    int cor=0;
    int inc=0;
   Scanner sc=new Scanner(System.in);
    int n,m;
    n=sc.nextInt();
    m=sc.nextInt();
    int que;
    int sta;
     int[] x=new int[n+1];
    for(int i=0;i<m;i++)
    {
     que=sc.nextInt();
      String s1=scan.nextLine();
      sta=sc.nextLine();
      if(x[que]==0 && sta.equals("AC"))
      {
        x[que]=1;
        cor++;
      }
      else if(x[que]==0 && sta.equals("WA"))
      {
        inc++;
      }
    }
   
    System.out.println(cor+" "+inc);
   
    
  }
}

Compiler output:
Main.java:18: error: cannot find symbol
      String s1=scan.nextLine();
                ^
  symbol:   variable scan
  location: class Main
Main.java:19: error: incompatible types: String cannot be converted to int
      sta=sc.nextLine();
                     ^
Main.java:20: error: int cannot be dereferenced
      if(x[que]==0 && sta.equals("AC"))
                         ^
Main.java:25: error: int cannot be dereferenced
      else if(x[que]==0 && sta.equals("WA"))
                              ^
4 errors
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef struct crr{
  int pro;
  int index;
  string han;
}pp;
int comp(const void* a, const void* b){
    if(((pp*)a)->pro != ((pp*)b)->pro){
        return ((pp*)a)->pro - ((pp*)b)->pro;
    }else{
        return ((pp*)a)->index - ((pp*)b)->index;
    }
}
int n, m;
pp score[100000];
int cc[100000];
int main(){
    cin>>n>>m;
  for(int i = 0; i<m; i++){
      cin>>score[i].pro>>score[i].han;
      score[i].index=i;
  }

  qsort(score, m, sizeof(pp), comp);
  int x = score[0].pro;
  int tt=1;
  int p=1;
  cc[0]=0;
  cc[1]=1;
int flag=0;
  int a1=0,a2=0;
  for(int i =1; i<m;i++){
      if(x!=score[i].pro){
          tt++;
          x=score[i].pro;
          p++;
          cc[p]+=cc[p-1];
          cc[p]++;
      }else{
        cc[p]++;
      }
  }
  if(m==0) tt=0;
  for(int i=0; i<tt; i++){
      for(int j =cc[i]; j<cc[i+1]; j++){
          
          if((score[j].han=="WA")&&(flag==0){
              a1++;
          }else if((score[j].han=="AC")&&(flag==0)){
              a2++;
              flag++;
              break;
          }

      }
  }

   std::cout<<a1<<" "<<a2;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:48:45: error: expected ')' before '{' token
   48 |           if((score[j].han=="WA")&&(flag==0){
      |             ~                               ^
      |                                             )
a.cc:56:7: error: expected primary-expression before '}' token
   56 |       }
      |       ^
Language: C++

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair<int  ,int > pii;
typedef pair<ll  ,ll > pll;

const ll maxn =2e6;
const ll mod = 1e9+7;
const ld PI = 4 * atan((ld) 1);

#define pb(x) push_back(x);
//#define endl '\n'
#define dokme(x) cout << x ;  return(0);
#define migmig ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define file_init freopen("input.txt", "r+", stdin); freopen("output.txt", "w+", stdout);
#define ms(x , y) memset(x , y , sizeof x);
ll pw(ll a, ll b) {
    return (!b ? 1 : (b & 1 ? a * pw(a * a % mod, b / 2) % mod : pw(a * a % mod, b / 2) % mod));
}

int n , m;
int mark[maxn];
int wtf[maxn];
int ac = 0 , wa = 0;

int main(){
    migmig
    cin >> n >> m;
    for (int i = 0 ; i < m ; i ++){
        int inp ;
        string s;
        cin >> inp >> s;
        if(!mark[inp]){
            if(s == "AC"){
                wa+=wtf[inp]
                ac++;
                mark[inp] = 1;
            }
            else{
                wtf[inp]++;
            }
        }
        else{
            continue;
        }
    }
    cout << ac << ' ' << wa;

    return(0);
}


//When we hit our lowest point, we are open to the greatest change.
//If I try, I fail. If I don't try, I'm NEVER GOING TO GET IT.
//Sometimes, life is like this dark tunnel. You can't always see the light at the end of the tunnel. But if you just keep moving... you will come to a better place.
//It is important to draw wisdom from diffrent places. If you take it from only one place it becomes rigid and stale.


Compiler output:
a.cc: In function 'int main()':
a.cc:38:29: error: expected ';' before 'ac'
   38 |                 wa+=wtf[inp]
      |                             ^
      |                             ;
   39 |                 ac++;
      |                 ~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  int n,m;
  cin>>n>>m;
  pair<int,int>a[n+1];
  memset(a,0,sizeof(a));
  int x;
  string s;
  for(int i=0;i<m;i++)
  {
    cin>>x>>s;
    if(s=="WA")
    {
      if(a[x].second==0)
        a[x].first]++;
    }else
      a[x].second=1;
  }
  int p=0,q=0;
  for(int i=1;i<=n;i++)
  {
    if(a[i].second==1)
    {
      p++;
      q+=a[i].first;
    }
  }
  cout<<p<<" "<<q<<"\n";
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:19: error: expected ';' before ']' token
   17 |         a[x].first]++;
      |                   ^
      |                   ;
Language: C++

N,M=map(int,input().split())
ps=[list(input().split()) for _ in range(M)]

a=[]
b=[]
count=0

for j in range(M):
    if ps[j][1]=="WA":
        if ps[j][0] not in b:
            a.append(ps[j][0])
    elif ps[j][1]=="AC":
        if ps[j][0] not in b:
            b.append(ps[j][0])

for i in range(len(b)):
    count+=a.count(b[i])

print(len(b),count)

Compiler output:
a.cc:1:1: error: 'N' does not name a type
    1 | N,M=map(int,input().split())
      | ^
Language: C

#include <stdio.h>

int main(void){
	int i,m,n,a,ok=0,pena=0,cnt[100010]={};
	char s[3];
	scanf("%d %d",&n,&m);
	for(i=0;i<m;i++){
		scanf("%d %s"&a,s);
		if(ac[a]<0) continue;
		if(s[0]=='W') cnt[a]++;
		else{
			pena = pena + cnt[a];
			cnt[a] = -1;
			ok++;
		}
	}
	printf("%d %d",ok,pena);
	return 0;
	
}

Compiler output:
main.c: In function 'main':
main.c:8:30: error: invalid operands to binary & (have 'char *' and 'int')
    8 |                 scanf("%d %s"&a,s);
      |                       ~~~~~~~^
      |                       |
      |                       char *
main.c:9:20: error: 'ac' undeclared (first use in this function); did you mean 'a'?
    9 |                 if(ac[a]<0) continue;
      |                    ^~
      |                    a
main.c:9:20: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int main(void){
	int i,m,m,a,ok=0,pena=0,cnt[100010]={};
	char s[3];
	scanf("%d %d",&n,&m);
	for(i=0;i<m;i++){
		scanf("%d %s"&a,s);
		if(ac[a]<0){
          continue;
        }
		if(s[0]=='W'){
          cnt[a]++;
        }else{
			pena = pena + cnt[a];
			cnt[a] = -1;
			ok++;
		}
	}
	printf("%d %d",ok,pena);
	return 0;
	
}


Compiler output:
main.c: In function 'main':
main.c:4:17: error: redeclaration of 'm' with no linkage
    4 |         int i,m,m,a,ok=0,pena=0,cnt[100010]={};
      |                 ^
main.c:4:15: note: previous declaration of 'm' with type 'int'
    4 |         int i,m,m,a,ok=0,pena=0,cnt[100010]={};
      |               ^
main.c:6:24: error: 'n' undeclared (first use in this function)
    6 |         scanf("%d %d",&n,&m);
      |                        ^
main.c:6:24: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:30: error: invalid operands to binary & (have 'char *' and 'int')
    8 |                 scanf("%d %s"&a,s);
      |                       ~~~~~~~^
      |                       |
      |                       char *
main.c:9:20: error: 'ac' undeclared (first use in this function); did you mean 'a'?
    9 |                 if(ac[a]<0){
      |                    ^~
      |                    a
Language: C++

#include <array>
#include <cassert>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <string>
#include <sstream>
#include <vector>
#include <queue>
#include <stack>
#include <list>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <algorithm>
#include <complex>
#include <cmath>
#include <numeric>
#include <bitset>
#include <functional>
#include <random>
#include <ctime>
#include <iomanip>
 
using namespace std;
int main(){
  int n, m;
cin >> n >> m;
int pen = 0, score = 0;
vector<int> ac(n+1, 0);
//vector<int> wa(n + 1, 0);
for (int i = 0; i < m; i++) {
	string res = ""; int problem = 0;
	cin >> problem >> res;
	if (res == "AC") {
		if (ac[problem]) {
			continue;
		}
		else {
			score++;
			ac[problem] = 1;
		}
	}else if (res == "WA") {
		if (ac[problem]) {
			continue;
		}
		else {
			pen++;
		}
	}
}
cout << score << " " << pen << endl;
	return 0;
}
#include <array>
#include <cassert>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <string>
#include <sstream>
#include <vector>
#include <queue>
#include <stack>
#include <list>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <algorithm>
#include <complex>
#include <cmath>
#include <numeric>
#include <bitset>
#include <functional>
#include <random>
#include <ctime>
#include <iomanip>
 
using namespace std;
int main(){
  int n, m;
cin >> n >> m;
int pen = 0, score = 0;
vector<int> ac(n+1, 0);
vector<int> wa(n + 1, 0);
for (int i = 0; i < m; i++) {
	string res = ""; int problem = 0;
	cin >> problem >> res;
	if (res == "AC") {
		if (ac[problem]) {
			continue;
		}
		else {
			score++;
			ac[problem] = 1;
		}
	}else if (res == "WA") {
		if (ac[problem]) {
			continue;
		}
		else {
			wa[problem]++;
		}
	}
}

for (int i = 1; i <= n; i++) {
	if (ac[i]) {
		pen += wa[i];
	}
}
cout << score << " " << pen << endl;
	return 0;
}


Compiler output:
a.cc:82:5: error: redefinition of 'int main()'
   82 | int main(){
      |     ^~~~
a.cc:27:5: note: 'int main()' previously defined here
   27 | int main(){
      |     ^~~~
Language: C++

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

int main()
{
	ll n,m,ans;
  	cin>>n>>m;
	string str;
  	unordered_map<int,pair<int,int>> mp;
  	for(int i=0;i<m;i++)
    {
      cin>>ans;
      cin>>str;
      if(str=="AC")
        mp[ans].first = 1;
      else
        if(!mp[ans].first)
    	    mp[ans].second++;  
    }
  	ll a,b;
  	a=b=0;
  	for(auto it: mp)
    {
      a+=it.first;
      b+=it.second;
    }
  	cout<<a<<" "<<b;
  	return 0;
}
  		

Compiler output:
a.cc: In function 'int main()':
a.cc:26:8: error: no match for 'operator+=' (operand types are 'long long int' and 'std::pair<int, int>')
   26 |       b+=it.second;
      |       ~^~~~~~~~~~~
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(int i = 0; i < N; i++) {
	 	WA[i] = 0;
	 	AC[i] = false;
	}

	while(M--) {
	 	int p;
	 	string s1;
	 	cin >> p >> s1;
	 	if(AC[p]) continue;
	 	if(s1 == "AC") {
	 	 	ACnum++;
	 	 	AC[p] = true;
	 	 	WAnum += WA[p];	
	 	}
	 	else if(s1 == "WA")
	 	 	WA[p]++;
	 	}
	}
	cout << ACnum << " " << WAnum;

}

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

	solve();	

	return 0;
}

Compiler output:
a.cc:31:9: error: 'cout' does not name a type
   31 |         cout << ACnum << " " << WAnum;
      |         ^~~~
a.cc:33:1: error: expected declaration before '}' token
   33 | }
      | ^
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(int i = 0; i < N; i++) {
	 	WA[i] = 0;
	 	AC[i] = false;
	}

	while(M--) {
	 	int p;
	 	string s1;
	 	cin >> p >> s1;
	 	if(AC[p]) continue;
	 	if(s1 == "AC") {
	 	 	ACnum++;
	 	 	AC[p] = true;
	 	 	WA[p] += WAnum	
	 	}
	 	else {
	 	 	WAnum++;
	 	}
	}
	cout << ACnum << " " << WAnum;

}

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

	solve();	

	return 0;
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:25:40: error: expected ';' before '}' token
   25 |                         WA[p] += WAnum
      |                                       ^ 
      |                                        ;
   26 |                 }
      |                 ~
Language: C++

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

int main(){
    int n,m;
    cin>>n>>m;
    array<int,100000> is_ac = {}, wa = {};
    int p; string s;
    for (int i=0;i<m;i++){
        cin>>p>>s;
        p--;
        if (s == "AC"){
            is_ac[p]=1;
        }else{
            if (is_ac[p]==0){
                wa[p]++;
            }
        }
    }
    int ans1=0,ans2=0;
    for (int i=0;i<n;i++){
        if (is_ac[i]==1){
            ans1++;
            ans2+=wa[i];
        }
    }
    printf("%d %d",ans1,ans2)
    cout <<ans1<<ans2<<endl;}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:30: error: expected ';' before 'cout'
   27 |     printf("%d %d",ans1,ans2)
      |                              ^
      |                              ;
   28 |     cout <<ans1<<ans2<<endl;}
      |     ~~~~
Language: C++

import java.util.Scanner;

public class Main{
    public static void main(String[] args) {
        Scanner sc= new Scanner(System.in);
        int N = sc.nextInt();
        int M = sc.nextInt();
        int ques[] = new int[N];
        int correct = 0;
        int penalties = 0;
        for(int i=0; i<M; i++){
            int prob= sc.nextInt();
            String verdict= sc.next();
            if(ques[prob-1]==-1){
                continue;
            }
            if(verdict.equals("AC")){
                ques[prob-1] = -1;
                correct++;
            }
            else{
                ques[prob-1] += 1;
                penalties += ques[prob-1];
            }
        }
        System.out.println(correct);
        System.out.println(penalties);
    }
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
    3 | public class Main{
      | ^~~~~~
Language: Java

import java.util.*;

public class Atcoder {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();
		int correct=0;
		int penality=0;
		int[] a = new int[N]; 
		while(M-->0)
		{
			int i = sc.nextInt();
			String j = sc.next();
			if(j.contentEquals("AC")&&a[i]!=-1)
			{
				correct++;
				penality+=a[i];
				a[i]=-1;
			}
			else if(a[i]!=-1) {
				a[i]++;
			}
		}
		for(int k=0;k<a.length;k++)
		{
			System.out.println(a[k]);
		}
		System.out.println(correct+" "+penality);
	}
}


Compiler output:
Main.java:3: error: class Atcoder is public, should be declared in a file named Atcoder.java
public class Atcoder {
       ^
1 error
Language: C++

/*
  Submitter: Nick Hudson
  Anumber: A01634984


  */

#include <iostream>

int main(){
  int N,M,a;
  std::string score;

  std::cin>>N>>M;

  int penalty = 0;
  int correct = 0;

  //int * problem = new int[M+1];
  std::unique_ptr<short[]> problem (new short[M+1]);

  for(int i=0;i<=M;++i){
    problem[i]=0;
  }

  while(M--){
    std::cin>>a>>score;
    if(problem[a]!=-1){
      if(score == "WA"){
        ++problem[a];
      }else if(score == "AC"){
        ++correct;

        penalty += problem[a];
        problem[a] = -1;
      }
    }
  }


  std::cout<<correct<<" "<<penalty<<std::endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:8: error: 'unique_ptr' is not a member of 'std'
   20 |   std::unique_ptr<short[]> problem (new short[M+1]);
      |        ^~~~~~~~~~
a.cc:9:1: note: 'std::unique_ptr' is defined in header '<memory>'; this is probably fixable by adding '#include <memory>'
    8 | #include <iostream>
  +++ |+#include <memory>
    9 | 
a.cc:20:19: error: expected primary-expression before 'short'
   20 |   std::unique_ptr<short[]> problem (new short[M+1]);
      |                   ^~~~~
a.cc:23:5: error: 'problem' was not declared in this scope
   23 |     problem[i]=0;
      |     ^~~~~~~
a.cc:28:8: error: 'problem' was not declared in this scope
   28 |     if(problem[a]!=-1){
      |        ^~~~~~~
Language: C++

/*
  Submitter: Nick Hudson
  Anumber: A01634984


  */

#include <iostream>

int main(){
  int N,M,a;
  std::string score;

  std::cin>>N>>M;

  int penalty = 0;
  int correct = 0;

  int * problem = new int[N+1];

  for(int i=0;i<=M;++i){
    problem[i]=0;
  }

  while(M--){
    std::cin>>a>>score
    if(problem[a]!=-1){
      if(score == "WA"){
        ++problem[a];
      }else if(score == "AC"){
        ++correct;

        penalty += problem[a];
        problem[a] = -1;
      }
    }
  }


  std::cout<<correct<<" "<<penalty<<std::endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:26:23: error: expected ';' before 'if'
   26 |     std::cin>>a>>score
      |                       ^
      |                       ;
   27 |     if(problem[a]!=-1){
      |     ~~
Language: C++

#include <iostream>
using namespace std;
 
int main() {
  int x[2];
  for (int i = 0; i < 2; ++i)
    cin >> x[i];
  int curr = 1;
  bool ac = false;
  int n = 0, m = 0;
  for (int i = 0; i < x[1]; ++i)
  {
    string temp;
    cin >> temp;
    if ((int)temp > curr)
    {
      curr = (int)temp;
      ac = false;
    }
    cin >> temp;
    if (temp == "AC" && !ac)
    {
      ac = true;
      y[1]++;
    }
    if (temp == "WA" && !ac)
      y[1]++;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:9: error: invalid cast from type 'std::string' {aka 'std::__cxx11::basic_string<char>'} to type 'int'
   15 |     if ((int)temp > curr)
      |         ^~~~~~~~~
a.cc:17:14: error: invalid cast from type 'std::string' {aka 'std::__cxx11::basic_string<char>'} to type 'int'
   17 |       curr = (int)temp;
      |              ^~~~~~~~~
a.cc:24:7: error: 'y' was not declared in this scope
   24 |       y[1]++;
      |       ^
a.cc:27:7: error: 'y' was not declared in this scope
   27 |       y[1]++;
      |       ^
Language: C++

/*
  Submitter: Nick Hudson
  Anumber: A01634984


  */

#include <iostream>

int main(){
  int N,M,a;
  std::string score;

  std::cin>>N>>M;

  int problem = 1;
  int penalty = 0;
  int correct = 0;

  while(std::cin>>a>>score){
    int temp_penalty = 0;
    if(a==problem){
      if(score == "WA"){
        temp_penalty += 1;
      }else if(score == "AC"){
        correct += 1;
        problem += 1;
        penalty += temp_penalty;
      }else if(a==problem+1){
        if(score == "WA"){
          temp_penalty += 1;
        if(score == "AC"){
          correct += 1;
          problem += 2;
        }
      }
    }
  }

  std::cout<<correct<<" "<<penalty<<std::endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:42:2: error: expected '}' at end of input
   42 | }
      |  ^
a.cc:10:11: note: to match this '{'
   10 | int main(){
      |           ^
Language: C++

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

int main() {
    int num, sub; cin >> num >> sub;
    int wrong = 0, accepted = 0;
    int wrong_answers[105000];
    map<int,bool>mp;
    for(int i = 1; i <= N; i++){
        mp[i] = false;
        wrong_answers[i] = 0;
    }
    
    while(sub--){
        int curr;
        string v;
        cin >> curr >> v;
        if(mp[curr]) continue;
        //has NOT been solved.
        if(v == "WA"){
            wrong_answers[curr]++;
        }
        //has NOT been evaluated.
        if(v == "AC"){
            mp[curr] = true;
            accepted++;
            wrong+=wrong_answers[i];
        }
    }
    cout << accepted << " " << wrong << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:25: error: 'N' was not declared in this scope
   11 |     for(int i = 1; i <= N; i++){
      |                         ^
a.cc:29:34: error: 'i' was not declared in this scope
   29 |             wrong+=wrong_answers[i];
      |                                  ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
{
   int n,m,a;
    string b;
  cin>>n>>m;
  int hash[n]={-1},ac=0,wc=0;
  for(int i=0;i<m;i++)
  {
      cin>>a>>b;
      if(hash[a]!=1&& b="AC")
      {
           hash[a]=1;
           ac++;
      }
       if(hash[a]!=1&& b="WC")
      {
           wc++;
      }
      
  }
   cout<<ac<<" "<<wc<<endl;
  return 0;
}

Compiler output:
a.cc:3:1: error: expected unqualified-id before '{' token
    3 | {
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
{
   int n,m;
  cin>>n>>m;
  int hash[n]={-1},ac=0,wc=0;
  for(int i=0;i<m;i++)
  {
      cin>>a>>b;
      if(hash[a]!=1&& b="AC")
      {
           hash[a]=1;
           ac++;
      }
       if(hash[a]!=1&&&& b="WC")
      {
           wc++;
      }
      
  }
   cout<<ac<<" "<<wc<<endl;
  return 0;
}

Compiler output:
a.cc:3:1: error: expected unqualified-id before '{' token
    3 | {
      | ^
Language: Java

import java.util.*;
public class Main{
 public static void main(String[] args) {
   Scanner s = new Scanner(System.in);
   int probs = s.nextInt();
   int verdicts = s.nextInt();
   HashSet<Integer> ac = new HashSet<>();
   HashMap<Integer, Integer> wa = new HashMap<>();
   int correct = 0;
   int penalty = 0;
   for (int i = 0; i < verdicts; i++) {
   	 int n = s.nextInt();
     String str = s.next();
     if(str.equals("AC")) {
       if (!ac.contains(n)) {
       	 correct++;
         ac.add(n);
         penalty += map.getOrDefault(n, 0);
       }
     } else {
     	if (!ac.contains(n)) {
          map.put(n, map.getOrDefault(n, 0) + 1);
        }
     }
   }
   
   System.out.println(correct + " " + penalty);
 } 
}

Compiler output:
Main.java:18: error: cannot find symbol
         penalty += map.getOrDefault(n, 0);
                    ^
  symbol:   variable map
  location: class Main
Main.java:22: error: cannot find symbol
          map.put(n, map.getOrDefault(n, 0) + 1);
                     ^
  symbol:   variable map
  location: class Main
Main.java:22: error: cannot find symbol
          map.put(n, map.getOrDefault(n, 0) + 1);
          ^
  symbol:   variable map
  location: class Main
3 errors
Language: Java

import java.util.*;
public class Main{
 public static void main(String[] args) {
   Scannner s = new Scanner(System.in);
   int probs = s.nextInt();
   int verdicts = s.nextInt();
   HashSet<Integer> ac = new HashSet<>();
   //HashSet<Integer> wa = new HashSet<>();
   int correct = 0;
   int penalty = 0;
   for (int i = 0; i < verdicts; i++) {
   	 int n = s.nextInt();
     String str = s.next();
     if(str.equals("AC")) {
       if (!ac.contains(n)) {
       	 correct++;
         ac.add(n);
       }
     } else {
     	if (!ac.contains(n)) {
          penalty++;
        }
     }
   }
   
   System.out.println(correct + " " + penalty);
 } 
}

Compiler output:
Main.java:4: error: cannot find symbol
   Scannner s = new Scanner(System.in);
   ^
  symbol:   class Scannner
  location: class Main
1 error
Language: Java

import java.uitl.*;
public class Main{
 public static void main(String[] args) {
   Scannner s = new Scanner(System.in);
   int probs = s.nextInt();
   int verdicts = s.nextInt();
   HashSet<Integer> ac = new HashSet<>();
   //HashSet<Integer> wa = new HashSet<>();
   int correct = 0;
   int penalty = 0;
   for (int i = 0; i < verdicts; i++) {
   	 int n = s.nextInt();
     String str = s.next();
     if(str.equals("AC")) {
       if (!ac.contains(n)) {
       	 correct++;
         ac.add(n);
       }
     } else {
     	if (!ac.contains(n)) {
          penalty++;
        }
     }
   }
   
   System.out.println(correct + " " + penalty);
 } 
}

Compiler output:
Main.java:1: error: package java.uitl does not exist
import java.uitl.*;
^
Main.java:4: error: cannot find symbol
   Scannner s = new Scanner(System.in);
   ^
  symbol:   class Scannner
  location: class Main
Main.java:4: error: cannot find symbol
   Scannner s = new Scanner(System.in);
                    ^
  symbol:   class Scanner
  location: class Main
Main.java:7: error: cannot find symbol
   HashSet<Integer> ac = new HashSet<>();
   ^
  symbol:   class HashSet
  location: class Main
Main.java:7: error: cannot find symbol
   HashSet<Integer> ac = new HashSet<>();
                             ^
  symbol:   class HashSet
  location: class Main
5 errors
Language: C++

#include<iostream>
#include<string>
#include<vector>
using namespace std;
int main()
{
	int a=0;
	int b=0;
	int c=0;
	int ac=0;
	int pena=0;
	string s;
	cin>>a>>b;
	vector<int> v(a);
	vector<int> w(a);
	for(int i=0;i<b;i++)
	{
		cin>>c>>s;
		if(s=="AC")
		{
			if(int v[c]!=1)
			{
				v[c]+=1;
			}
		}
		else
		{
			if(v[c]==0)
			{
				w[c]+=1;
			}
		}
	}
	for(int i=0;i<b;i++)
	{
		if(v[i]==1)
		{
			ac+=v[i];
			pena+=w[i];
		}
	}
	cout<<ac<<pena<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:32: error: condition declares an array
   21 |                         if(int v[c]!=1)
      |                                ^
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main()
{
	int a=0;
	int b=0;
	int c=0;
	int ac=0;
	int pena=0;
	string s;
	cin>>a>>b;
	vector<int> v(a);
	vector<int> w(a);
	for(int i=0;i<b;i++)
	{
		cin>>c>>s;
		if(s=="AC")
		{
			if(v[c]!=1)
			{
				v[c]+=1;
			}
		}
		else
		{
			if(v[c]==0)
			{
				w[c]+=1;
			}
		}
	}
	for(int i=0;i<b;i++)
	{
		if(v[i]==1)
		{
			ac+=v[i];
			pena+=w[i];
		}
	}
	cout<<ac<<pena<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:9: error: 'vector' was not declared in this scope
   13 |         vector<int> v(a);
      |         ^~~~~~
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 | #include<string>
a.cc:13:16: error: expected primary-expression before 'int'
   13 |         vector<int> v(a);
      |                ^~~
a.cc:14:16: error: expected primary-expression before 'int'
   14 |         vector<int> w(a);
      |                ^~~
a.cc:20:28: error: 'v' was not declared in this scope
   20 |                         if(v[c]!=1)
      |                            ^
a.cc:27:28: error: 'v' was not declared in this scope
   27 |                         if(v[c]==0)
      |                            ^
a.cc:29:33: error: 'w' was not declared in this scope
   29 |                                 w[c]+=1;
      |                                 ^
a.cc:35:20: error: 'v' was not declared in this scope
   35 |                 if(v[i]==1)
      |                    ^
a.cc:38:31: error: 'w' was not declared in this scope
   38 |                         pena+=w[i];
      |                               ^
Language: C++

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

int main() {
  
  int qnum, subnum;
  int ans = 0, pen = 0;
  
  cin >> qnum >> subnum;
  
  vector<int> ansnum(subnum);
  vector<string> result(subnum);
    
  for(int i = 0; i < subnum - 1; i++) {
	cin >> ansnum.at(i) >> result.at(i);
  }
  
  int lastans = 0;
  
  for (int i = 0; i < subnum - 1; i++) {
    if (lastans == ansnum.at(i)) {
      if ()
  
  cout << ans << pen << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:11: error: expected primary-expression before ')' token
   22 |       if ()
      |           ^
a.cc:25:2: error: expected '}' at end of input
   25 | }
      |  ^
a.cc:20:40: note: to match this '{'
   20 |   for (int i = 0; i < subnum - 1; i++) {
      |                                        ^
a.cc:25:2: error: expected '}' at end of input
   25 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

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

int main(){
  int n, m;
  cin >> n >> m;
  vector<int> ac(n), pena(n);
  rep(i,m) {
    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;
  rep(i,n) {
    AC += ac[i];
    if(ac[i]) PENA += pena[i];
  }
  printf("%d %d\n", AC, PENA);
  return 0;
}


Compiler output:
a.cc:4:9: error: 'Long' does not name a type; did you mean 'long'?
    4 | typedef Long Long li;
      |         ^~~~
      |         long
a.cc: In function 'int main()':
a.cc:22:15: error: 'PENA' was not declared in this scope
   22 |   int AC = 0; PENA = 0;
      |               ^~~~
Language: C++

#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<bool> vb;
typedef vector<string> vs;
typedef vector<ll> vl;
typedef vector<vector<int> > vvi;
#define pb push_back
#define mp make_pair
#define f first
#define s second
#define in insert
#define FOR(i,a,b) for (int i = a; i < b; i++)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define speed ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
const int INF = 1e9 + 7;
int main(){
    int n, m;
    cin >> n >> m;
    map<int, string> ac;
    for(int i = 1; i <= n; i++){
        m[i] = "WA";
    }
    int cnt = 0;
    for(int i = 0; i < m; i++){
        int x;
        string s;
        cin >> x >> s;
        if(ac[x] != "AC"){
            ac[x] = s;
            if(s!="AC") cnt++;
        }
    }
    map<int, string>::iterator it;
    int cnt2 = 0;
    for(it = ac.begin(); it != ac.end(); it++){
        if(it->second == "AC") cnt2++;
    }
    cout << cnt2 << " " << cnt;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:10: error: invalid types 'int[int]' for array subscript
   26 |         m[i] = "WA";
      |          ^
Language: C++

#include <iostream>
using namespace std;
int main() {
 int n, m; cin >> n >> m;
 bool ac[n + 1];
 int ac = 0;
 int wa = 0;
 for (int i = 0; i < m; i++) {
  int q; cin >> q;
  string s; cin >> s;
  if (s == "AC") {
   if (!ac[q]) ac++;
    ac[q] = 1;
  }
  else {
   if (!ac[q]) wa++; 
  }
 }
  cout << ac << " " << wa << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:6: error: conflicting declaration 'int ac'
    6 |  int ac = 0;
      |      ^~
a.cc:5:7: note: previous declaration as 'bool ac [(n + 1)]'
    5 |  bool ac[n + 1];
      |       ^~
a.cc:12:16: error: lvalue required as increment operand
   12 |    if (!ac[q]) ac++;
      |                ^~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long
bool a[100001];
int main() {
	ll n,m;
  cin>>n>>m;
  ll cw=0,cc=0;
  while(m--) {
    string p,s; cin>>p>>s;
    if(s[0]=='W') ++cw;
    if(s[0]=='A') {
      if(!a[p]) { ++cc; a[p]=1; }
    }
  }
    cout<<cc<<" "<<cw;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:12: error: no match for 'operator[]' (operand types are 'bool [100001]' and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
   13 |       if(!a[p]) { ++cc; a[p]=1; }
      |            ^
a.cc:13:26: error: no match for 'operator[]' (operand types are 'bool [100001]' and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
   13 |       if(!a[p]) { ++cc; a[p]=1; }
      |                          ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long
bool a[100001];
int main() {
	ll n,m;
  cin>>n>>m;
  ll cw=0,cc=0;
  while(m--) {
    ll p,s; cin>>p>>s;
    if(s=='WA') ++cw;
    if(s=='AC') {
      if(!a[p]) { ++cc; a[p]=1; }
  }
    cout<<cc<<" "<<cw;
}

Compiler output:
a.cc:11:11: warning: multi-character character constant [-Wmultichar]
   11 |     if(s=='WA') ++cw;
      |           ^~~~
a.cc:12:11: warning: multi-character character constant [-Wmultichar]
   12 |     if(s=='AC') {
      |           ^~~~
a.cc: In function 'int main()':
a.cc:16:2: error: expected '}' at end of input
   16 | }
      |  ^
a.cc:5:12: note: to match this '{'
    5 | int main() {
      |            ^
Language: C++

#include <iostream>
#include <vector>
#include <string>

using namespace std;

bool ac_checker(int id, vector<int> v){
  	bool ret = false;
	for(int i = 0; i < v.size(); i++){
    	if(id == v[i]) ret = true;
    }
  	return ret;
}

int main(){
  
  // read data
  int n, m;
  cin >> n >> m;
  char str[m][2];
  int id[m];
  vector<int> pena(n, 0);
  vector<int> v;
 
  for(int i = 0; i< m; i++){
  	cin >> id[i] >> tmp[i];
  }   
  
  for(int i = 0; i < m; i++){
    if(!ac_checker(id[i], v)){
	    if(str[i] == "AC"){
          	v.push_back(id[i]);
    	}else{#include <iostream>
#include <vector>
#include <string>

using namespace std;

bool ac_checker(int id, vector<int> v){
  	bool ret = false;
	for(int i = 0; i < v.size(); i++){
    	if(id == v[i]) ret = true;
    }
  	return ret;
}

int main(){
  
  // read data
  int n, m;
  cin >> n >> m;
  int id[m];
  vector<string> ac(m);
  vector<int> pena(n, 0);
  vector<int> v;
 
  for(int i = 0; i< m; i++){
  	cin >> id[i] >> ac[i];
  }   
  
  for(int i = 0; i < m; i++){
    if(!ac_checker(id[i], v)){
	    if(ac[i] == "AC"){
          	v.push_back(id[i]);
    	}else{
        	pena[id[i]-1] += 1;
        }
    }
  }
  
  int real_pena = 0;
  for(int i = 0; i < v.size(); i++){
    	real_pena += pena[v[i]-1];
  }
  cout << v.size() << " " << real_pena << endl;
}
        	pena[id[i]-1] += 1;
        }
    }
  }
  
  int real_pena = 0;
  for(int i = 0; i < v.size(); i++){
    	real_pena += pena[v[i]-1];
  }
  cout << v.size() << " " << real_pena << endl;
}

Compiler output:
a.cc:33:15: error: stray '#' in program
   33 |         }else{#include <iostream>
      |               ^
a.cc: In function 'int main()':
a.cc:26:25: error: 'tmp' was not declared in this scope; did you mean 'tm'?
   26 |         cin >> id[i] >> tmp[i];
      |                         ^~~
      |                         tm
a.cc:33:16: error: 'include' was not declared in this scope
   33 |         }else{#include <iostream>
      |                ^~~~~~~
a.cc:33:33: error: expected primary-expression before '>' token
   33 |         }else{#include <iostream>
      |                                 ^
a.cc:37:1: error: expected primary-expression before 'using'
   37 | using namespace std;
      | ^~~~~
a.cc:39:39: error: a function-definition is not allowed here before '{' token
   39 | bool ac_checker(int id, vector<int> v){
      |                                       ^
a.cc:47:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   47 | int main(){
      |         ^~
a.cc:47:9: note: remove parentheses to default-initialize a variable
   47 | int main(){
      |         ^~
      |         --
a.cc:47:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:47:11: error: a function-definition is not allowed here before '{' token
   47 | int main(){
      |           ^
Language: C++

#include<iostream>
#include<vector>
#include<algorithm>
#include<iomanip>
#include<cmath>
#include<string>
#include<cstdlib>

using namespace std;

vector<bool> aclist(100010, false);

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

  int p;
  string s;
  vector<int> penalty(100010. 0);
  int psum = 0;
  int acpointa=0;
  
  for(int i=0; i<M; i++)
    {
      cin >> p >> s;

      if(aclist[p] == false)
	{
	  if(s=="AC")
	    {
	      aclist.push_back(p);
	      acpointa++;
	      aclist[p]=true;
	      psum += penalty[p]; 
	    }
	  else
	    {
	      penalty[p]+=1;
	    }
	}
    }
  
  cout << acpointa << " " << psum << endl;

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:30: error: expected ')' before numeric constant
   20 |   vector<int> penalty(100010. 0);
      |                      ~       ^~
      |                              )
Language: C++

#include<iostream>
using namespace std;

int main(){
  int N,M;
  cin>>N>>M;
  int C=0,P=0,w[M],p;
  string S;
  bool a[M];
  
  for(int i=0;i<M;i++){
    a[i]=false; w[i]=0;
  }
  
  for(int i=0;i<N;i++){
    cin>>p>>S;
    if(S=="WA"&&a[p-1]==false){
      w[p-1]++
    }
    if(S=="AC"&&a[p-1]==false){
      C++; P+=w[p-1]; a[p-1]=true;
    }
  }
  cout<<C<<" "<<P;
}
  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:18:15: error: expected ';' before '}' token
   18 |       w[p-1]++
      |               ^
      |               ;
   19 |     }
      |     ~
Language: C

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

typedef long long ll;

int main(void){
    ll n, m;

    scanf("%lld %lld", &n, &m);

    ll p[m+1];
    char s[10];
    ll a[n+1], w[n+1];
    ll adda=0, addw=0;
    char *ac = "AC";

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

    for(int i=0;i<m;i++){
        scanf("%lld %s",&p[i], s);
        if(strcmp(s,ac)==0){
            a[p[i]-1] = 1;
        }else(a[p[i]-1]==0){
            w[p[i]-1]+=1;
        }
    }

    for(int i=0;i<n+1;i++){
        adda += a[i];
        addw += w[i];
    }

    printf("%lld %lld", adda, addw);

    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:26:28: error: expected ';' before '{' token
   26 |         }else(a[p[i]-1]==0){
      |                            ^
      |                            ;
Language: C

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

int cmp(const void* a, const void* b){
    if(p[*(int*)a]-p[*(int*)b] != 0){
        return p[*(int*)a]-p[*(int*)b];
    }else if(p[*(int*)a]-p[*(int*)b] == 0){
        if(*(int*)a-*(int*)b>0){
            return 1;
        }else{
            return -1;
        }
    }
}

int main(void){
    int N, M, p[100000];
    char S[100000][2];

    scanf("%d %d", &N, &M);
    int i;
    int a[100000];
    for(i=0;i<M;i++){
        scanf("%d %s", &p[i], S[i]);
        a[i] = i;
    }

    qsort(a, M, sizeof(int), cmp);

    int wa=0, ac=0;
    int notAC=0;

    int flg=0;

    for(i=0; i<M; i++){
        if(i != 0 && p[a[i]]!=p[a[i-1]]){
            if(flg==0){
                wa-=notAC;
            }
            flg=0;
            notAC=0;
        }
        if(flg==0 && S[a[i]][0]=='W'){
            notAC++;
            wa++;
        }else if(flg==0 && S[a[i]][0]=='A'){
            ac++;
            flg=1;
        }
    }
    
    printf("%d %d", ac, wa);
    return 0;
}

Compiler output:
main.c: In function 'cmp':
main.c:6:8: error: 'p' undeclared (first use in this function)
    6 |     if(p[*(int*)a]-p[*(int*)b] != 0){
      |        ^
main.c:6:8: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include <iostream>
#include <vector>
using namespace std;
int main(){
  int n,m;
  cin >> n >> m;
  vector<bool> a(n);
  vector<int> v(n);
  for (int i=0; i<m;i++){
   string s;
   int t;
    cin >> t >> s;
    if (s=="AC") a[t-1]=true;
    if (s=="WA" && a[t-1]==false) v[t-1]++;
  }
  int ac=0;
  int pena=0;
  for (int j=0;j < n;j++){
    if (a[j]){
      ac++;
      pena+=v[j];
    }
  }
  cout << ac << " " << pena << endl
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:36: error: expected ';' before 'return'
   24 |   cout << ac << " " << pena << endl
      |                                    ^
      |                                    ;
   25 |     return 0;
      |     ~~~~~~