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

//#pragma GCC optimize("Ofast")
//#pragma GCC optimize("inline")
//#pragma GCC optimize("-ffast-math")
//#pragma GCC optimize("unroll-loops")
//#pragma GCC optimize("inline-small-functions")
//#pragma GCC optimize("-finline-small-functions")
//#pragma GCC optimize("-fexpensive-optimizations")
//#pragma GCC optimize("-funsafe-loop-optimizations")
//#pragma GCC optimize("inline-functions-called-once")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,tune=native")
#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
#define pb push_back
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
using namespace std;
using ll = long long;
using vi = vector<ll>;
using pi = pair<ll, ll>;
using vpi = vector<pi>;
using oset = tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update>;
const int maxn = 2e5 + 33, mod = 1e9 + 7;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

int main() {
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    char c;
    cin >> c;
    cout << char(c+1);//#pragma GCC optimize("Ofast")
//#pragma GCC optimize("inline")
//#pragma GCC optimize("-ffast-math")
//#pragma GCC optimize("unroll-loops")
//#pragma GCC optimize("inline-small-functions")
//#pragma GCC optimize("-finline-small-functions")
//#pragma GCC optimize("-fexpensive-optimizations")
//#pragma GCC optimize("-funsafe-loop-optimizations")
//#pragma GCC optimize("inline-functions-called-once")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,tune=native")
#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
#define pb push_back
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
using namespace std;
using ll = long long;
using vi = vector<ll>;
using pi = pair<ll, ll>;
using vpi = vector<pi>;
using oset = tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update>;
const int maxn = 2e5 + 33, mod = 1e9 + 7;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

int main() {
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    char c;
    cin >> c;
    cout << char(c+1);
}

}


Compiler output:
a.cc: In function 'int main()':
a.cc:57:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   57 | int main() {
      |         ^~
a.cc:57:9: note: remove parentheses to default-initialize a variable
   57 | int main() {
      |         ^~
      |         --
a.cc:57:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:57:12: error: a function-definition is not allowed here before '{' token
   57 | int main() {
      |            ^
Language: C

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

int main(){
    char c;
    cin >> c;
    cout << (char)(c + 1) << endl;
}

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

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

int main()
{
   　char n;
    cin>>n;
    
    cout<< ans+1;
}







Compiler output:
a.cc:6:4: error: extended character 　 is not valid in an identifier
    6 |    　char n;
      |    ^
a.cc: In function 'int main()':
a.cc:6:4: error: '\U00003000char' was not declared in this scope
    6 |    　char n;
      |    ^~~~~~
a.cc:7:10: error: 'n' was not declared in this scope; did you mean 'yn'?
    7 |     cin>>n;
      |          ^
      |          yn
a.cc:9:12: error: 'ans' was not declared in this scope; did you mean 'abs'?
    9 |     cout<< ans+1;
      |            ^~~
      |            abs
Language: C++

# coding: utf-8


def main():
    N, M = map(int, input().split())
    ans = [0, 0]
    A = [[0, 0] for _ in range(N)]

    for i in range(M):
        p, s = input().split()
        p = int(p)
        if s == 'AC':
            A[p - 1][1] = 1
        elif A[p - 1][1] == 0:
            A[p - 1][0] += 1
    
    for i, j in A:
        if i == 1:
            ans[0] += 1
            ans[1] += j

    print(ans[0], ans[1])

if __name__ == "__main__":
    main()


Compiler output:
a.cc:1:3: error: invalid preprocessing directive #coding
    1 | # coding: utf-8
      |   ^~~~~~
a.cc:12:17: warning: multi-character character constant [-Wmultichar]
   12 |         if s == 'AC':
      |                 ^~~~
a.cc:4:1: error: 'def' does not name a type
    4 | def main():
      | ^~~
Language: C++

    int n, m, tmp, acs = 0, pns = 0;
    string stmp;
    cin >> n >> m;
    vector<int> ac(n), pn(n);

    for(int i = 0; i < m; ++i)
    {
        cin >> tmp >> stmp;
        tmp--;
        if(ac[tmp])
            continue;
        if(stmp == "AC")
            ac[tmp] = 1;
        else if(stmp == "WA")
            pn[tmp]++; 
    }

    for(int i = 0; i < n; ++i)
    {
        acs += ac[i];
        pns += pn[i];
    }

    cout << acs << " " << pns << "\n";
    return 0;

Compiler output:
a.cc:2:5: error: 'string' does not name a type
    2 |     string stmp;
      |     ^~~~~~
a.cc:3:5: error: 'cin' does not name a type
    3 |     cin >> n >> m;
      |     ^~~
a.cc:4:5: error: 'vector' does not name a type
    4 |     vector<int> ac(n), pn(n);
      |     ^~~~~~
a.cc:6:5: error: expected unqualified-id before 'for'
    6 |     for(int i = 0; i < m; ++i)
      |     ^~~
a.cc:6:20: error: 'i' does not name a type
    6 |     for(int i = 0; i < m; ++i)
      |                    ^
a.cc:6:27: error: expected unqualified-id before '++' token
    6 |     for(int i = 0; i < m; ++i)
      |                           ^~
a.cc:18:5: error: expected unqualified-id before 'for'
   18 |     for(int i = 0; i < n; ++i)
      |     ^~~
a.cc:18:20: error: 'i' does not name a type
   18 |     for(int i = 0; i < n; ++i)
      |                    ^
a.cc:18:27: error: expected unqualified-id before '++' token
   18 |     for(int i = 0; i < n; ++i)
      |                           ^~
a.cc:24:5: error: 'cout' does not name a type
   24 |     cout << acs << " " << pns << "\n";
      |     ^~~~
a.cc:25:5: error: expected unqualified-id before 'return'
   25 |     return 0;
      |     ^~~~~~
Language: C

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(){
  int N, M, ac, wa, *count, d;
  char str[8];
  scanf("%d %d", &N, &M);
  ac = 0;
  wa = 0;
  count = (int *)malloc(N * sizeof(int));
  for(int i = 0; i < M;i++){
    scanf("%d %s", &d, str);
    if(strcmp(str, "WA") == 0 && count[d-1] != 1){
      wa += 1;
    }else if(strcmp(str, "AC") == 0 && count[d-1] != 1){
      ac += 1;
        count[d-1] = 1;
    }
  }
  printf("%d %d", ac, wa);
  free(p);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:21:8: error: 'p' undeclared (first use in this function)
   21 |   free(p);
      |        ^
main.c:21:8: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<queue>
#include<set>
#include<iomanip>
#define pi 3.14159265358979323846
#define int long long
#define elif else if
#define rep(i, a, n) for(int i = a; i < n; i++)
using namespace std;
int main(){
  int n, m;
  cin >> n >> m;
  vector<int> v(n, 0), vv(n, 0);
  rep(i, 0, m){
    int a;
    string s;
    cin >> a >> s;
    a--;
    if(s == "AC"){
      if(vv[a] == 0){
        vv[a]++;
      }
    }
    elif(s == "WA"){
      if(vv[a] == 0){
        v[a]++;
      }
    }
  }
  
  int wa = 0, ac = 0;
  rep(i, 0, n){
    wa += v[i];
    ac += vv[i];
  }
  
  cout << ac << " " << wa << "\n";
}

Compiler output:
cc1plus: error: '::main' must return 'int'
Language: C++

#include<iostream>
#include<stdio.h>
using namespace std;
using ll=long long;
#include<algorithm>
#include<set>
#include<vector>
#define rep(i,n) for(int i=0;i<(n);i++)
using P=pair<int,int>;
const int mod=1000000007;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:26:5: error: 'i' was not declared in this scope
   26 | reo(i,m)AC+=ac[i];
      |     ^
a.cc:26:1: error: 'reo' was not declared in this scope; did you mean 'rep'?
   26 | reo(i,m)AC+=ac[i];
      | ^~~
      | rep
Language: C++

#include <bits/stdc++.h>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <deque>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
#define rep(i,s,e) for (int64_t i=s; i<e; i++)
#define pi 3.14159265358979323846264338327950L
using namespace std;

int main() {
  int N, M, A=0, W=0;
  cin >> N >> M;
  vector<int> p(M);
  vector<string> S(M);
  rep(i,0,M) {
    cin >> p[i] >> S[i];
  }
  vector<int> a(N);
  vector<int> w(N);
  rep(i,0,N) {
    a[i]=0;
    w[i]=0;
  }
  rep(i,0,M) {
    if (p[i]=="AC") {
      a[p[i]-1]++;
    }
    else {
      if (a[p[i]-1]==0) {
        w[p[i]-1]++
      }
    }
  }
  rep(i,0,N) {
    if (a[i]>0) {
      A++;
      W+=w[i];
    }
  }
  cout << A << " " << W << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:36:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   36 |     if (p[i]=="AC") {
a.cc:41:20: error: expected ';' before '}' token
   41 |         w[p[i]-1]++
      |                    ^
      |                    ;
   42 |       }
      |       ~
Language: C++

#include <iostream>
#include <bits/stdc++.h>
#include <vector>
#include <algorithm>
#include <cctype>
#include <string>
#include <map>
#include <set>
#include <math.h>
#include <cmath>
#define ll long long
#define lli long long int

using namespace std;
using P = pair<int,int>;

int main(){

  int N, M, ans, pena;
  int ans;
  int pena;
  cin >> N >> M;
  vector<int> AC(N+1);
  vector<int> WA(N+1);

  // vector<pair<int, string>> p(M);
  // for (int i = 0; i < M; i++) {
  //   cin >> p[i].first >> p[i].second;
  // }

  // for (int i = 0; i < M; i++) {
  //   int n = p[i].first;
  //   if(p[i].second == "WA"){
  //     if(AC.at(n) != 1) WA.at(n) += 1;
  //   }else if(p[i].second == "AC"){
  //     if(AC.at(n) != 1) AC.at(n) = 1;
  //   }
  // }

  // for (int i = 1; i <= N; i++) {
  //   if(AC.at(i) != 1) WA.at(i) = 0;
  // }

  // for (int i = 1; i <= N; i++) {
  //   ans += AC.at(i);
  //   pena += WA.at(i);
  // }

  cout << ans << " " << pena << endl;

  return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:20:7: error: redeclaration of 'int ans'
   20 |   int ans;
      |       ^~~
a.cc:19:13: note: 'int ans' previously declared here
   19 |   int N, M, ans, pena;
      |             ^~~
a.cc:21:7: error: redeclaration of 'int pena'
   21 |   int pena;
      |       ^~~~
a.cc:19:18: note: 'int pena' previously declared here
   19 |   int N, M, ans, pena;
      |                  ^~~~
Language: C++

#include <iostream>
#include <bits/stdc++.h>
#include <vector>
#include <algorithm>
#include <cctype>
#include <string>
#include <map>
#include <set>
#include <math.h>
#include <cmath>
#define ll long long
#define lli long long int

using namespace std;
using P = pair<int,int>;

int main(){

  int N, M, ans, pena;
  cin >> N >> M;
  vector<int> AC(N+1);
  vector<int> WA(N+1);

  vector<pair<int, string>> p(M);
  for (int i = 0; i < M; i++) {
    cin >> p[i].first >> p[i].second;
  }

  for (int i = 0; i < M; i++) {
    int n = p[i].first;
    // cout << "n " << n << endl;
    if(p[i].second == "WA"){
      if(AC.at(n) != 1) WA.at(n) += 1;
    }else if(p[i].second == "AC"){
      if(AC.at(n) != 1) AC.at(n) = 1;
    }
    // cout << "i " << i << " AC.at(i) " << AC.at(n) << " WA.at(i) " << WA.at(n) << endl;
  }

  for (int i = 1; i <= N; i++) {
    if(AC.at(i) != 1) WA.at(i) = 0;
  }

  for (int i = 1; i <= N; i++) {
    int an = AC.at(i);
    int pe = WA.at(i);
    ans å+= an;
    pena += pe;
    // cout << "ans " << ans << " pena " << pena << endl;
  }

  int an, pe;
  cout << an << endl;

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:47:8: error: expected ';' before '\U000000e5'
   47 |     ans å+= an;
      |        ^~
      |        ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(int)n;i++)
using Graph = vector<vector<int> >;
using GraphC = vector<vector<char> >;
typedef int64_t ll;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }

int N, M;
bool S[MAX_N];
int WA[MAX_N];

int main() {
	
	cin >> N >> M;
	
	int WAnum = 0;
	int ACnum = 0;
	rep(i, N)S[i] = true;
	rep(i, M) {
		int t;
		string j;
		cin >> t >> j;
		t--;
		if (S[t])
		{
			if (j == "WA") {
				WA[t]++;
			}else 
			{ 
				S[t] = false;
				WAnum += WA[t];
				ACnum++;
			}
		}
	}
	cout << ACnum << " " << WAnum << endl;
}

Compiler output:
a.cc:11:8: error: 'MAX_N' was not declared in this scope
   11 | bool S[MAX_N];
      |        ^~~~~
a.cc:12:8: error: 'MAX_N' was not declared in this scope
   12 | int WA[MAX_N];
      |        ^~~~~
a.cc: In function 'int main()':
a.cc:20:18: error: 'S' was not declared in this scope
   20 |         rep(i, N)S[i] = true;
      |                  ^
a.cc:26:21: error: 'S' was not declared in this scope
   26 |                 if (S[t])
      |                     ^
a.cc:29:33: error: 'WA' was not declared in this scope
   29 |                                 WA[t]++;
      |                                 ^~
a.cc:33:42: error: 'WA' was not declared in this scope
   33 |                                 WAnum += WA[t];
      |                                          ^~
Language: C++

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

using ll = long long;

const int INF = 1001001001;
const ll INF_LL = 1001001001001001001LL;

int main(void){
  int n,m; cin >> n >> m;
  vector<pair<int,string>> ps(m);
  rep(i,m){
    int p; cin >> p;
    string s; cin >> s;
    ps[i] = make_pair(p,s);
  }

  int ac=0,wa=0;
  vector<bool> acd(n+1,false);
  /*cout << "size: " << acd.size() << endl;
    cout << acd[3] << endl;*/
  vector<int> wan(n+1,0);
  rep(i,m){
    int p = ps[i].first;
    string s = ps[i].second;
    //cout << "p: " << p << " " << s << " acd: " << acd[p] << endl;
    if(!acd[p]){
      if(s=="AC"){
	ac++;
	acd[p]=true;
	wa += wan[p];
      }
      else wa[p]++;
    }
    //printf("ac: %d wa: %d\n",ac,wa);
  }

  printf("%d %d\n",ac,wa);
  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:34:14: error: invalid types 'int[int]' for array subscript
   34 |       else wa[p]++;
      |              ^
Language: C++

#include<bits/stdc++.h>
#define endl '\n'
#define int long long
#define eps 1e-9
#define oo 1e7+5

using namespace std;

typedef unsigned long long ull;
typedef vector<pair<int,pair<int,int>>> dirgraph;
typedef vector<vector<int>> graph;

int main()
{
	
	int n,m;
	cin>>n>>m;
	vector<int> v(n+1);
	vector<bool> ac(n+1);
	int c_ans=0;
	int p_ans=0;

	for(int i=0;i<m;i++){
		int x;string r;
		cin>>x>>r;
		if(r=="AC"){
			if(!ac[x]){
				p_ans+=v[x];
				c_ans++;
				ac[x]=1;
				v[x]=0;
			}
		}
		else{
			v[x]++;
		}
	}

	cout<<c_ans<<" "<<p_ans<<endl;

	return 0;
}


Compiler output:
cc1plus: error: '::main' must return 'int'
Language: C++

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

//順列生成
vector<long long> junretu(long long N){
	for(long long i=0; i<N; i++){
		junretu.pusu_back(i+1);
	}
}

int main() {
  int N,M,j=0,k=0;
  cin >> N >> M;
  vector<int> A(N);
  vector<bool> B(N);
  for(int i=0;i<M;i++){
    int p;
    string S;
    cin >> p >> S;
    if(S == "AC"){
      if(B[p-1] == true){
        j++;
        k+=A[p-1];
        B[p-1]=false;
      }
    }
    else{
      A[p-1]++;
    }
  }
  cout << j << " " << k << endl;
}


Compiler output:
a.cc: In function 'std::vector<long long int> junretu(long long int)':
a.cc:7:25: error: request for member 'pusu_back' in 'junretu', which is of non-class type 'std::vector<long long int>(long long int)'
    7 |                 junretu.pusu_back(i+1);
      |                         ^~~~~~~~~
a.cc:9:1: warning: no return statement in function returning non-void [-Wreturn-type]
    9 | }
      | ^
Language: C++

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

int main(){
  int N,M;cin>>N>>M;
  vector<int> p(M),S(M);
  for(int i=0;i<M;i++) cin>>p.at(i)>>S.at(i);
  vector<bool> A(N,false);
  int count=0;
  for(int i=0;i<M;i++){
    if(S.at(i)=="WA" && A.at(p.at(i))==false) count++;
    else if(S.at(i)=="AC") p.at(i)=true;
  }
  int ans=0;
  for(int i=0;i<N;i++) if(p.at(i)==true) ans++;
  cout<<ans<<" "<<count<<endl;
}
     


Compiler output:
a.cc: In function 'int main()':
a.cc:11:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |     if(S.at(i)=="WA" && A.at(p.at(i))==false) count++;
      |        ~~~~~~~^~~~~~
a.cc:12:20: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |     else if(S.at(i)=="AC") p.at(i)=true;
      |             ~~~~~~~^~~~~~
Language: C++

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

int main(){
  int N,M;cin>>N>>M;
  vector<int> p(M),S(M);
  for(int i=0;i<M;i++) cin>>p.at(i)>>S.at(i);
  vector<bool> A(N,false);
  int count=0;
  for(int i=0;i<M;i++){
    if(S.at(i)=="WA" && A.at(p.at(i))==false) count++;
    else if(S.at(i)=="AC") p.at(i)=true;
  }
  int ans=0;
  for(int i=0;i<N;i++) if(p.at(i)==true) ans++;
  cout<<ans<<" "<<count<<endl;
}
     


Compiler output:
a.cc:1:10: fatal error: bits.stdc++.h: No such file or directory
    1 | #include <bits.stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
#include <map>
#include <set>
using namespace std;
int main()
{
    map<long long, long long> pp, p;
    long long m, n, a, s = 0, ss = 0, i;
    string s;
    cin >> m >> n;
    while (n--)
    {
        cin >> a >> s;
        if (s[0] == 'W' && p[a] == 0)
            pp[a]++;
        else
            p[a]++;
    }
    for (i = 0; i <= m; i++)
    {
        if (p[a] > 0)
        {
            s++;
            ss += pp[i];
        }
    }
    cout << s << " " << ss;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:12: error: conflicting declaration 'std::string s'
    9 |     string s;
      |            ^
a.cc:8:24: note: previous declaration as 'long long int s'
    8 |     long long m, n, a, s = 0, ss = 0, i;
      |                        ^
a.cc:14:14: error: invalid types 'long long int[int]' for array subscript
   14 |         if (s[0] == 'W' && p[a] == 0)
      |              ^
Language: C++

#include<bits/stdc++.h>							
typedef long long ll;
#define pb push_back
#define mod 1000000007ll
const ll maxn = 9e18;
using namespace std;
const ll maxsize = 100000009;



void solve() {
	int n, k;f
	cin >> n >> k;
	map<int , int> m;
	for(int i = 0; i < k; ++i) {
		int x;fff
		string s;
		cin >> x >> s;
		if(s == "AC")	
		m[x]++;
		else {
			if(!m[x]
			}
		}
		for(auto x : m) cout << x.first <<" "; cout << endl;
}


int main() {
	ios_base :: sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
	cout.precision(35);
	solve();
	return 0;
}
 
 
 


Compiler output:
a.cc: In function 'void solve()':
a.cc:12:18: error: 'f' was not declared in this scope
   12 |         int n, k;f
      |                  ^
a.cc:16:23: error: 'fff' was not declared in this scope; did you mean 'ffs'?
   16 |                 int x;fff
      |                       ^~~
      |                       ffs
a.cc:18:29: error: 's' was not declared in this scope
   18 |                 cin >> x >> s;
      |                             ^
a.cc:22:33: error: expected ')' before '}' token
   22 |                         if(!m[x]
      |                           ~     ^
      |                                 )
   23 |                         }
      |                         ~        
a.cc:23:25: error: expected primary-expression before '}' token
   23 |                         }
      |                         ^
Language: C++

#include<bits/stdc++.h>							
typedef long long ll;
#define pb push_back
#define mod 1000000007ll
const ll maxn = 9e18;
using namespace std;
const ll maxsize = 100000009;



vector<bool> mark(100005, 0);
void solve() {
	int n, k;
	cin >> n >> k;
	map<string,ll> m;
	m["AC"] = 0;
	m["WA"] = 0;
	int s = 0;
	for(int i = 0; i < k; ++i) {
		int x;
		string s;
		cin >> x >> s;	
		if(mark[x]) continue;
		if(s == "AC") {
			mark[x] = 1;
			m[s]++;
			m["WA"] += s;
			s = 0;
			}
			else s++;
		}
		for(auto x : m) cout << x.second << " ";
		cout << endl;
}


int main() {
	ios_base :: sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
	cout.precision(35);
	solve();
	return 0;
}
 
 
 



Compiler output:
a.cc: In function 'void solve()':
a.cc:27:33: error: no match for 'operator+=' (operand types are 'std::map<std::__cxx11::basic_string<char>, long long int>::mapped_type' {aka 'long long int'} and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
   27 |                         m["WA"] += s;
a.cc:28:29: error: ambiguous overload for 'operator=' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int')
   28 |                         s = 0;
      |                             ^
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:817:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
  817 |       operator=(const basic_string& __str)
      |       ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:828:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(const _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
  828 |       operator=(const _CharT* __s)
      |       ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:840:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(_CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
  840 |       operator=(_CharT __c)
      |       ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:858:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
  858 |       operator=(basic_string&& __str)
      |       ^~~~~~~~
a.cc:30:31: error: no 'operator++(int)' declared for postfix '++' [-fpermissive]
   30 |                         else s++;
      |                              ~^~
Language: C

#include <stdio.h>

int main()
{
  int n,m,i;
  int ac[100005]={},wa[100005]={};
  int WA=0,AC=0;
  char s[3];

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

  for(i=0; i<m; i++){
    scanf("%d",&p);
    scanf("%s",s);
    if(ac[p]==1)
      continue;
    else if(s[0] == 'A')
      {
      WA += wa[p];
      ac[p]++;
      }
    else
      wa[p]++;
  }

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


Compiler output:
main.c: In function 'main':
main.c:13:17: error: 'p' undeclared (first use in this function)
   13 |     scanf("%d",&p);
      |                 ^
main.c:13:17: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include <bits/stdc++.h>
#include<math.h>
#define rep(i,n) for (int i = 0; i < (n) ; ++i)
using namespace std;
using ll = long long ;
using P = pair<int, int> ;
#define PI 3.14159265358979323846264338327950
#define INF 1e18 
int main(){
    int n, m ;
    cin >> n >> m ;
    int ans = 0 ;
    int pen = 0 ;
    vector<vector<string>> str(n) ;
    rep(i, m){
        int p ;
        string s ;
        cin >> p >> s ;
        p-- ;
        str[p].push_back(s) ;
    }
    rep(i, n){
        rep(j, str[i].size()){
            if(str[i][j] == "WA") {x
                pen++ ;
            }
            else if (str[i][j] == "AC"){
                ans++ ;
                break ;
            }
        }
    }
    cout << ans << " " << pen << endl ;
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:24:36: error: 'x' was not declared in this scope
   24 |             if(str[i][j] == "WA") {x
      |                                    ^
Language: Java

import java.util.*;

public class Main {
	public static void main(String[] args) throws Exception{
		Scanner scn = new Scanner(System.in);
		int n = scn.nextInt();
      	int m = scn.nextInt();
		int[] p = new int[m];
      	String s = new String[m];
		for(int i=0; i<p.length; i++){
			p[i] = scn.nextInt();
          	s[i] = scn.next();
		}
      	int[] a = new int[n];
      	for(int i=0; i<=n; i++){
          a[i]=0;
        }
      	int count = 0;
      	for(int i=1; i<=n; i++){
          for(int j=0; j<p.length; j++){
            if(i==p[j] && s[j].equals("WA")) a[i]++;
            if(i==p[j] && s[j].equals("AC")){
              count++;
              break;
            }
          }
        }
      	int sum = 0;
      	for(int i=1; i<=n; i++){
          sum += a[i];
        }
      	System.out.println(count);
      	System.out.println(sum);
	}
}


Compiler output:
Main.java:9: error: incompatible types: String[] cannot be converted to String
      	String s = new String[m];
      	           ^
Main.java:12: error: array required, but String found
          	s[i] = scn.next();
          	 ^
Main.java:21: error: array required, but String found
            if(i==p[j] && s[j].equals("WA")) a[i]++;
                           ^
Main.java:22: error: array required, but String found
            if(i==p[j] && s[j].equals("AC")){
                           ^
4 errors
Language: Java

import java.util.*;

public class Main {
	public static void main(String[] args) throws Exception{
		Scanner scn = new Scanner(System.in);
		int n = scn.nextInt();
      	int m = scn.nextInt();
		int[] p = new int[m];
      	String s = new String[m]
		for(int i=0; i<p.length; i++){
			p[i] = scn.nextInt();
          	s[i] = scn.next();
		}
      	int[] a = new int[n];
      	for(int i=0; i<=n; i++){
          a[i]=0;
        }
      	int count = 0;
      	for(int i=1; i<=n; i++){
          for(int j=0; j<p.length; j++){
            if(i==p[j] && s[j].equals("WA")) a[i]++;
            if(i==p[j] && s[j].equals("AC")){
              count++;
              break;
            }
          }
        }
      	int sum = 0;
      	for(int i=1; i<=n; i++){
          sum += a[i];
        }
      	System.out.println(count);
      	System.out.println(sum);
	}
}

Compiler output:
Main.java:9: error: ';' expected
      	String s = new String[m]
      	                        ^
1 error
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n,count=0,sum=0;
  cin >> n >> k;
  vector<string> s(k);
  int p[k];
  for(int i=0;i<k;i++){
    cin >> p[i] >> s[i];
    if(s[i]=="AC")count++;
    else sum++;
  }
   cout << count << sum << endl;  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:15: error: 'k' was not declared in this scope
    5 |   cin >> n >> k;
      |               ^
a.cc:9:12: error: 'p' was not declared in this scope
    9 |     cin >> p[i] >> s[i];
      |            ^
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <bitset>
#include <math.h>
#include <iomanip>
#include <map>
#include <queue>
#include <tuple>
#include <math.h>
#include <iomanip>

using namespace std;

typedef long long ll;
typedef pair<int,int> P;


int main(){
    int N,M;
    cin >> N >> M;
    vector<int> cnt(N,0);
    vector<int> flag(N,0);
    vector<int> ans(N,0);
    for(int i=0; i<M; i++){
        int p;string s;
        cin >> p >> s;
        p--;
        if(s=="WA"){
            cnt[p]++;
        }else{
            flag[p]=1;
            copy(ans[p],cnt[p]);
        }
    }

    int wa=0,ac=0;
    for(int i=0; i<N; i++){
        if(flag[i]==1){
            ac++;
            wa+=ans[i];
        }
    }

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




    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:33:17: error: no matching function for call to 'copy(__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type&, __gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type&)'
   33 |             copy(ans[p],cnt[p]);
      |             ~~~~^~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:642:5: note: candidate: 'template<class _II, class _OI> _OI std::copy(_II, _II, _OI)'
  642 |     copy(_II __first, _II __last, _OI __result)
      |     ^~~~
/usr/include/c++/14/bits/stl_algobase.h:642:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/bits/locale_facets.h:48,
                 from /usr/include/c++/14/bits/basic_ios.h:37,
                 from /usr/include/c++/14/ios:46:
/usr/include/c++/14/bits/streambuf_iterator.h:339:5: note: candidate: 'template<class _CharT> typename __gnu_cxx::__enable_if<std::__is_char<_Tp>::__value, std::ostreambuf_iterator<_CharT> >::__type std::copy(istreambuf_iterator<_CharT>, istreambuf_iterator<_CharT>, ostreambuf_iterator<_CharT>)'
  339 |     copy(istreambuf_iterator<_CharT> __first,
      |     ^~~~
/usr/include/c++/14/bits/streambuf_iterator.h:339:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:86,
                 from a.cc:3:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:134:1: note: candidate: 'template<class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> std::copy(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2)'
  134 | copy(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __result);
      | ^~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:134:1: note:   candidate expects 4 arguments, 2 provided
Language: C++

#define rep(i,n) for(int i=1;i<(n);i++)

using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:4: error: 'cin' was not declared in this scope
    8 |    cin>>n>>m;
      |    ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #define rep(i,n) for(int i=1;i<(n);i++)
a.cc:9:4: error: 'vector' was not declared in this scope
    9 |    vector<int> v(n),p(n);
      |    ^~~~~~
a.cc:1:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
  +++ |+#include <vector>
    1 | #define rep(i,n) for(int i=1;i<(n);i++)
a.cc:9:11: error: expected primary-expression before 'int'
    9 |    vector<int> v(n),p(n);
      |           ^~~
a.cc:10:4: error: 'string' was not declared in this scope
   10 |    string s;
      |    ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
  +++ |+#include <string>
    1 | #define rep(i,n) for(int i=1;i<(n);i++)
a.cc:16:12: error: 's' was not declared in this scope
   16 |       cin>>s;
      |            ^
a.cc:17:10: error: 'v' was not declared in this scope
   17 |       if(v[a]) continue;
      |          ^
a.cc:19:10: error: 'v' was not declared in this scope
   19 |          v[a]=1;
      |          ^
a.cc:22:12: error: 'p' was not declared in this scope
   22 |            p[a]++;
      |            ^
a.cc:26:12: error: 'v' was not declared in this scope
   26 |        k=k+v[i];
      |            ^
a.cc:27:27: error: 'p' was not declared in this scope
   27 |        if(v[i]) sum1=sum1+p[i];
      |                           ^
a.cc:29:4: error: 'cout' was not declared in this scope
   29 |    cout<<k<<" "<<sum1<<endl;
      |    ^~~~
a.cc:29:4: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:29:24: error: 'endl' was not declared in this scope
   29 |    cout<<k<<" "<<sum1<<endl;
      |                        ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #define rep(i,n) for(int i=1;i<(n);i++)
Language: C++

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

int main() {
  int N, M;
  cin >> N >> M;
  vector<int> B(N);
  vector<int> wa(N);
  for (int i = 0; i < M; i++) {
    int P, S;
    cin >> P >> S;
    P--;
    if (B.at(P)) continue;
    if (S == "AC") B.at(P) = 1;
    else wa.at(P)++;
  }
  cout << accumulate(B.begin(), B.end(), 0L) << "\n";
  int ans = 0;
  for (int i = 0; i < N; i++) {
    if (B.at(i)) ans += wa.at(i);
  }
  cout << ans << "\n";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:11: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 |     if (S == "AC") B.at(P) = 1;
      |         ~~^~~~~~~
Language: C++

// #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>

#define FOR(i, a, b) for (int i = (a); i < int(b); ++i)
#define RFOR(i, a, b) for (int i = (b)-1; i >= int(a); --i)
#define REP(i, n) FOR(i, 0, n)
#define REP1(i, n) FOR(i, 1, int(n) + 1)
#define RREP(i, n) RFOR(i, 0, n)
#define RREP1(i, n) RFOR(i, 1, int(n) + 1)
#define ALL(c) begin(c), end(c)

int _ = (
#ifndef LOCAL
    std::cin.tie(nullptr), std::ios::sync_with_stdio(false),
#endif
    std::cout.precision(10), std::cout.setf(std::ios::fixed));

using ll = long long;
using ull = unsigned long long;
using ld = long double;
template <typename T> using vec = std::vector<T>;
using namespace std;

int main() {
  ll N, M, p;
  cin >> N >> M;
  string S;
  vec<bool> stamp(N + 1, false);
  pair<ll, ll> count{0, 0};
  REP(i, M) {
    cin >> p >> S;
    if (stamp[p]) {
      continue;
    } else if (S == "AC") {
      stamp[p] = true;
      count.first++;
    } else {
      count.second++;
    }
  }
  cout << count.first << " " << count.second << endl;
  return 0;
}
// #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>

#define FOR(i, a, b) for (int i = (a); i < int(b); ++i)
#define RFOR(i, a, b) for (int i = (b)-1; i >= int(a); --i)
#define REP(i, n) FOR(i, 0, n)
#define REP1(i, n) FOR(i, 1, int(n) + 1)
#define RREP(i, n) RFOR(i, 0, n)
#define RREP1(i, n) RFOR(i, 1, int(n) + 1)
#define ALL(c) begin(c), end(c)

int _ = (
#ifndef LOCAL
    std::cin.tie(nullptr), std::ios::sync_with_stdio(false),
#endif
    std::cout.precision(10), std::cout.setf(std::ios::fixed));

using ll = long long;
using ull = unsigned long long;
using ld = long double;
template <typename T> using vec = std::vector<T>;
using namespace std;

int main() {
  ll N, M, p;
  cin >> N >> M;
  string S;
  vec<bool> stamp(N + 1, false);
  pair<ll, ll> count{0, 0};
  REP(i, M) {
    cin >> p >> S;
    if (stamp[p]) {
      continue;
    } else if (S == "AC") {
      stamp[p] = true;
      count.first++;
    } else {
      count.second++;
    }
  }
  cout << count.first << " " << count.second << endl;
  return 0;
}


Compiler output:
a.cc:55:5: error: redefinition of 'int _'
   55 | int _ = (
      |     ^
a.cc:12:5: note: 'int _' previously declared here
   12 | int _ = (
      |     ^
a.cc:67:5: error: redefinition of 'int main()'
   67 | int main() {
      |     ^~~~
a.cc:24:5: note: 'int main()' previously defined here
   24 | int main() {
      |     ^~~~
Language: C++

package main

import "fmt"

func main() {
	var n, m int
	fmt.Scan(&n, &m)
	ps := make([]int, n)
	wa := make([]int, n)
	pena := 0
	ac := 0
	for i := 1; i <= m; i++ {
		var p int
		var s string
		fmt.Scan(&p, &s)
		p--
		if ps[p] > 0 {
			continue
		}
		if s == "AC" {
			ps[p] = i
			ac++
			pena += wa[p]
		}
		if s == "WA" {
			wa[p]++
		}
	}
	fmt.Printf("%d %d", ac, pena)
}


Compiler output:
a.cc:1:1: error: 'package' does not name a type
    1 | package main
      | ^~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using ll = long long;
using P = pair<string,int>;
const double PI = acos(-1);

int main() {
 int n,m;
 cin >> n >> m;
 mp<int,int> a,w;
 rep(i,m){
   int p;
   stirng m;
   cin >> p >> m;
   if(a[p]) continue;
   if(m == "AC") a[p]++;
   else w[p]++;
 }
 int sums = 0,sump = 0;
 for(int i = 1; i <= n; i++){
   sums+=a[i];
   if(a[i])sump+=w[i];
 }
 cout << sums << " " << sump << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:2: error: 'mp' was not declared in this scope; did you mean 'm'?
   11 |  mp<int,int> a,w;
      |  ^~
      |  m
a.cc:11:5: error: expected primary-expression before 'int'
   11 |  mp<int,int> a,w;
      |     ^~~
a.cc:14:4: error: 'stirng' was not declared in this scope
   14 |    stirng m;
      |    ^~~~~~
a.cc:16:7: error: 'a' was not declared in this scope
   16 |    if(a[p]) continue;
      |       ^
a.cc:17:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   17 |    if(m == "AC") a[p]++;
      |       ~~^~~~~~~
a.cc:17:18: error: 'a' was not declared in this scope
   17 |    if(m == "AC") a[p]++;
      |                  ^
a.cc:18:9: error: 'w' was not declared in this scope
   18 |    else w[p]++;
      |         ^
a.cc:22:10: error: 'a' was not declared in this scope
   22 |    sums+=a[i];
      |          ^
a.cc:23:18: error: 'w' was not declared in this scope
   23 |    if(a[i])sump+=w[i];
      |                  ^
Language: C++

/*------------------------------------
........Bismillahir Rahmanir Rahim....
..........created by Abdul Aziz.......
------------------------------------*/
#include <iostream>
#include <algorithm>
#include <stdio.h>
#include <cmath>
#include <vector>
#include <set>
#include <map>
#include <cstring>
#include <unordered_map>
#include <queue>
#define   mod  998244353
#define   int  long long 
#define   ld   long double
#define   pb   push_back
#define   vi  vector<int> 
#define   dbg(x)  cerr << #x << " = " << x << '\n'
#define   sz(x)  (int)x.size()
#define   ff   first
#define   ss   second
#define   pii  pair<int,int>
using namespace std;

inline void solve(){ 
    map <int,string> cnt;
    int n,m,accepted=0,penalti=0; 
    cin>>n>>m; 
    for (int i=0;i<m;i++){
        string  s; int a;
        cin >> a >> s; 
        if (cnt[a] != "AC" and s=="WA") penalti++;
        if (cnt[a] != "AC" and s=="AC") accepted++;
        if (cnt[a]) if(cnt[a]=="WA") cnt[a]=s;
        else cnt[a]=s;
    }
    cout << accepted << " " << penalti << endl;
    
}

signed main()
{
    int n=1; // cin>>n;
    while (n--) solve();
    return 0;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:36:19: error: could not convert 'cnt.std::map<long long int, std::__cxx11::basic_string<char> >::operator[](a)' from 'std::map<long long int, std::__cxx11::basic_string<char> >::mapped_type' {aka 'std::__cxx11::basic_string<char>'} to 'bool'
   36 |         if (cnt[a]) if(cnt[a]=="WA") cnt[a]=s;
      |                   ^
      |                   |
      |                   std::map<long long int, std::__cxx11::basic_string<char> >::mapped_type {aka std::__cxx11::basic_string<char>}
Language: C++

#include <iostream>
using namespace std;

const int mxN = 1e5 + 5;
bool done[mxN];

int main() {
	int n, m;
	cin >> n >> m;
	int a = 0, w = 0;
	while(m--) {
		int u; string v;
		cin >> u >> v;
		if(done[u])
			continue;
		w += v == "WA";
		a += v == "AC";
		if(v == "AC")
			done[u] = true;
	}
	cout << a << ' ' << b;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:29: error: 'b' was not declared in this scope
   21 |         cout << a << ' ' << b;
      |                             ^
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,AnsAC=0,AnsWA=0;
  cin>>N>>M;
  vector<int> AC(N),WA(N);
  int p;
  string S;
  rep(i,M){cin>>p>>S;
           if(AC.at(p-1)==0){if(S=="AC"){AC.at(p-1)++;}else{WA.at(p-1)++;}}
          }
  rep(i,N){AnsAC+=AC.at(i);AnsWA=+=AC.at(i)*WA.at(i);}
  cout<<AnsAC<<" "<<AnsWA<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:34: error: expected primary-expression before '+=' token
   14 |   rep(i,N){AnsAC+=AC.at(i);AnsWA=+=AC.at(i)*WA.at(i);}
      |                                  ^~
Language: C++

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

int main() {
  int n,m; cin >> n >> m;
  int p;
  string s;
  vector<bool> flag(n,true);
  int ac = 0, pl = 0; //acの数とペナルティの数

  rep(i,m){
    cin >> p >> s;
    if(flag[p-1]){　
      if(s == "AC"){
        flag[p-1] = false;　//acした問題は今後一生見ない
        ac++;
      }
      else pl++;
    }
  }

  cout << ac << " " << pl << endl;
  return 0;
}


Compiler output:
a.cc:15:19: error: extended character 　 is not valid in an identifier
   15 |     if(flag[p-1]){　
      |                   ^
a.cc:17:27: error: extended character 　 is not valid in an identifier
   17 |         flag[p-1] = false;　//acした問題は今後一生見ない
      |                           ^
a.cc: In function 'int main()':
a.cc:15:19: error: '\U00003000' was not declared in this scope
   15 |     if(flag[p-1]){　
      |                   ^~
a.cc:20:7: error: expected '}' before 'else'
   20 |       else pl++;
      |       ^~~~
a.cc:15:18: note: to match this '{'
   15 |     if(flag[p-1]){　
      |                  ^
a.cc: At global scope:
a.cc:24:3: error: 'cout' does not name a type
   24 |   cout << ac << " " << pl << endl;
      |   ^~~~
a.cc:25:3: error: expected unqualified-id before 'return'
   25 |   return 0;
      |   ^~~~~~
a.cc:26:1: error: expected declaration before '}' token
   26 | }
      | ^
Language: C++

#include <stdio.h>

int n,m,c[200200];

int main()
{
  scanf ("%d %d",&n,&m);
  int s=0,p=0;
  while (m--){
int x; char S[10]; scnaf ("%d %s",&x,S);
    if (S[0] == 'A'){
if (c[x] >= 0){
s++; p += c[x];
  c[x] = -1;
}
    }
    else{
if (c[x] >= 0) c[x]++;
    }
  }
  printf ("%d %d\n",s,p);
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:20: error: 'scnaf' was not declared in this scope; did you mean 'scanf'?
   10 | int x; char S[10]; scnaf ("%d %s",&x,S);
      |                    ^~~~~
      |                    scanf
Language: Java

import java.util.*;
 
public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();
		ArrayList<Pair2> atcoder = new ArrayList<Pair2>();

		for(int i=0; i<N; i++){
			Pair2 pair = new Pair2(false, 0);
			atcoder.add(pair);
		}
		int count=0;
		int error=0;
		for(int i=0; i<M; i++){
			int p = sc.nextInt();
			String ans = sc.next();
			if(atcoder.get(p-1).ac==false){
				if(ans.equals("AC")){
					atcoder.get(p-1).ac=true;
					count++;
					error += atcoder.get(p-1).wa;
				}else{
					atcoder.get(p-1).wa++;
				}
			}
		}
		System.out.println(count+" "+error);
    }
}


Compiler output:
Main.java:8: error: cannot find symbol
		ArrayList<Pair2> atcoder = new ArrayList<Pair2>();
		          ^
  symbol:   class Pair2
  location: class Main
Main.java:8: error: cannot find symbol
		ArrayList<Pair2> atcoder = new ArrayList<Pair2>();
		                                         ^
  symbol:   class Pair2
  location: class Main
Main.java:11: error: cannot find symbol
			Pair2 pair = new Pair2(false, 0);
			^
  symbol:   class Pair2
  location: class Main
Main.java:11: error: cannot find symbol
			Pair2 pair = new Pair2(false, 0);
			                 ^
  symbol:   class Pair2
  location: class Main
4 errors
Language: C++

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


int main() {
    int n, m;
    cin >> n >> m;
    vi p(m), wa_sum(n);
    vector<string> s(m);
    rep(i, m) cin >> p[i] >> s[i];
    vector<bool> is_AC(n, false);
    
    ll ans = 0;
    ll ac = 0;

    rep(i, m){
        if(s[i] == "AC"){
            if(is_AC[p[i]-1] == false){
                ac++;
                is_AC[p[i]-1] = true;
            }
        }
        if(s[i] == "WA"){
            if(is_AC[p[i]-1] == false){
                ans++;
            }
        }
    }

    cout << ac << " " << ans << endl;
}

Compiler output:
cc1plus: error: '::main' must return 'int'
Language: Java

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int[][] data = new int[n][2];
        for (int i=0;i<m;i++){
            int p = sc.nextInt()-1;
            String s = sc.next();
            if (data[p][0]==0&&s.equals("WA")){
                data[p][1]++;
            }else if (data[p][0]==0&&s.equals("AC")){
                data[p][0]++;
            }
        }
        int ac=0;
        int wa=0;
        for (int i=0;i<n;i++){
            ac+=data[i][0];
            if (data[i][0]==1)wa+=data[i][1];
        }
        System.out.println(ac+" "+wa);

    }
}

Compiler output:
Main.java:3: error: cannot find symbol
        Scanner sc = new Scanner(System.in);
        ^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
        Scanner sc = new Scanner(System.in);
                         ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: C++

#include <iostream>
#include <string>
#include <set>

using namespace std;

bool f[100001];
bool b[100001];

int main() {

  int n, m, popp, ans = 0, bad = 0;
  string verdict;
  cin >> n >> m;
  for(int i = 1;i <= m;i++){
    cin >> popp >> verdict;
    if(verdict == "WA" && f[popp] == false){
      b[popp]++;
    }
    if(verdict == "AC" && f[popp] == false){
      f[popp] = true;
      ans++;
      bad += b[popp];

    }
  }
  cout << ans << ' ' << bad;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:13: error: use of an operand of type 'bool' in 'operator++' is forbidden in C++17
   18 |       b[popp]++;
      |       ~~~~~~^
Language: C++

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

int main() {
  int N, M;
  cin >> N >> M;
  vector<int> wa(N, false);
  vector<bool> ac(N, false);
  int ans = 0, pena = 0;
  for (int i = 0; i < M; i++) {
    int p;
    string S;
    cin >> p >> S;
    if (S == "AC") {
      if (!ac[p-1]) {
        ans++;
        pena += wa[p-1];
        ac[p-1] ~ true;
      }
      else wa[p-1]++;
    }
  }
  cout << ans << " " << pena << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:16: error: expected ';' before '~' token
   19 |         ac[p-1] ~ true;
      |                ^~
      |                ;
a.cc:19:15: warning: ignoring return value of 'std::vector<bool, _Alloc>::reference std::vector<bool, _Alloc>::operator[](size_type) [with _Alloc = std::allocator<bool>; reference = std::vector<bool>::reference; size_type = long unsigned int]', declared with attribute 'nodiscard' [-Wunused-result]
   19 |         ac[p-1] ~ true;
      |               ^
In file included from /usr/include/c++/14/vector:67,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_bvector.h:1086:7: note: declared here
 1086 |       operator[](size_type __n)
      |       ^~~~~~~~