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

#include<bits/stdc++.h>
using namespace std;
int main()
{
    string S; cin >> S;
    int cnt2 = 0;
    int Cpoint = -1;
    int judge = 0;
    for(int i = 2 ; i < S.size() - 1; i++)
    {
        if(S.at(i) == 'C')
        {
            if(Cpoint != -1) // Cが既に出ている場合は
            {
                cnt2 = -1
                Cpoint == -2; // Cpointに-2を代入しbreak
                break;
            }
            cnt2++;
            Cpoint = i;
        }
    }
    if(Cpoint != -2  && Cpoint != -1) //Cが一回出現した場合のみ実行
    {
        for(int i = 1; i < S.size(); i++)
        {
        
            if(isupper(S.at(i))) //Sのi番目が大文字なら実行
            {
                if(i == 1 || i == S.size() - 1 || S.at(i) !='C')  //Ｓが1番目か末尾で大文字ならWA、大文字がＣ以外でもWA
                {                                                 //ＳにＣが二つ以上ある場合や一回も出現していない場合は除外済み
                    judge = 1;           //judge = 1ならWAにする
                    break;
                }
            }
        }
    }
    if(S.at(0) == 'A' && cnt2 == 1 && judge == 0)
    {
        cout << "AC" << endl;
    }
    else
    {
        cout << "WA" << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:26: error: expected ';' before 'Cpoint'
   15 |                 cnt2 = -1
      |                          ^
      |                          ;
   16 |                 Cpoint == -2; // Cpointに-2を代入しbreak
      |                 ~~~~~~
Language: C++

#include<iostream>
#include<algorithm>
#include<set>
#include<math.h>
#include<vector>
#include<sstream>
#include<queue>
#include<functional>
#include<bitset>
#include<cstdio>
#include<iomanip>
#include<map>
#include<unordered_map>
#include<unordered_set>
#include <string.h>
using ll = long long;

#define rep(i, n) for(ll i = 0; i < (ll)(n); i++)
#define reps(i,x) for(ll i=1;i<=(ll)(x);i++)
#define rrep(i,x) for(ll i=((ll)(x)-1);i>=0;i--)
#define rreps(i,x) for(ll i=(ll)(x);i>0;i--)
#define all(x) (x).begin(),(x).end()
#define m0(x) memset(x,0,sizeof(x))
#define vll vector<ll>
#define vi vector<int>
#define vpll vector<pair<ll,ll>>
#define vpi vector<pair<int,int>>
#define mod 1000000007 
using namespace std;
int main() {
  string s;
  cin >> s;
  int cnt = 0;
  bool flg = false;
  cout << ('Z' < 'a') << endl;
  for(int i = 2; i < s.size() - 1; i++){
    if(s[i] == 'C') cnt++;
    else if(s[i] >= 'a') flg = true
  }
  if(flg || cnt != 1){
    cout << "WA" << endl;
  }
  else if(s[0] != 'A'){
    cout << "WA" << endl;
  } else{
    cout << "AC" << endl;
  }
  return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:38:36: error: expected ';' before '}' token
   38 |     else if(s[i] >= 'a') flg = true
      |                                    ^
      |                                    ;
   39 |   }
      |   ~
Language: C++

#include<bite/stdc++.h>
using namespace std;
using ll=long long;
#define rep(i,a,b) for(ll i=a;i<b;i++)
int main(){
    string s;
    cin>>s;
    int n=s.size();
    int cnt1=0;
    rep(i,2,n-1){
    if (s[i]=='C') cnt1++;
    }
    int cnt2=0;
    rep(j,0,n){
        if(s[j]>='A'&&s[j]<='Z') cnt2++;
    }
    if(s[0]!='A') cout<<"WA";
    else if (cnt1!=1) cout<<"WA";
    else if (cnt2!=2) cout<< "WA";
    else cout<<"AC";
}


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

using namespace std;
using ll=long long;
#define rep(i,a,b) for(ll i=a;i<b;i++)
int main(){
    string s;
    cin>>s;
    int n=s.size();
    int cnt1=0;
    rep(i,2,n-1){
    if (s[i]=='C') cnt1++;
    }
    int cnt2=0;
    rep(j,0,n){
        if(s[j]>='A'&&s[j]<='Z') cnt2++;
    }
    if(s[0]!='A') cout<<"WA";
    else if (cnt1!=1) cout<<"WA";
    else if (cnt2!=2) cout<< "WA";
    else cout<<"AC";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: 'string' was not declared in this scope
    5 |     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 | using namespace std;
a.cc:6:5: error: 'cin' was not declared in this scope
    6 |     cin>>s;
      |     ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:6:10: error: 's' was not declared in this scope
    6 |     cin>>s;
      |          ^
a.cc:16:19: error: 'cout' was not declared in this scope
   16 |     if(s[0]!='A') cout<<"WA";
      |                   ^~~~
a.cc:16:19: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:17:23: error: 'cout' was not declared in this scope
   17 |     else if (cnt1!=1) cout<<"WA";
      |                       ^~~~
a.cc:17:23: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:18:23: error: 'cout' was not declared in this scope
   18 |     else if (cnt2!=2) cout<< "WA";
      |                       ^~~~
a.cc:18:23: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:19:10: error: 'cout' was not declared in this scope
   19 |     else cout<<"AC";
      |          ^~~~
a.cc:19:10: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include<bits/stdc++.h>
using namespace std;
using ll=long long;
#define rep(i,a,b) for(ll i=a;i<b;i++)
int main(){
    string s;
    int n=s.size();
    int cnt1=0;
    rep(i,2,n-1){
    if (s[i]=="C") cnt1++;
    }
    int cnt2=0;
    rep(j,0,n){
        if(s[j]>="A"&&s[j]<="Z") cnt2++;
    }
    if(s[1]!="A") cout<<"WA";
    else if (cnt1!=1) cout<<"WA";
    else if (cnt2!=2) cout<< "WA";
    else cout<<"AC";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |     if (s[i]=="C") cnt1++;
a.cc:14:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 |         if(s[j]>="A"&&s[j]<="Z") cnt2++;
a.cc:14:27: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 |         if(s[j]>="A"&&s[j]<="Z") cnt2++;
a.cc:16:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   16 |     if(s[1]!="A") cout<<"WA";
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  	int i,flag=0;
	string s;
  	cin>>s;
  	int n=s.length();
  	
  	if(s[0]=='A' (s[1]-'0')<('A'-'0')){
		for(i=2;i<n-1;i++){
		if((s[i]-'0')>=('A'-'0')){
          	if(s[i]=='C'){
              flag++;
            }
        }
        }

    }


  	if(flag==1){
		cout<<"AC"<<endl;
    }else{
		cout<<"WA"<<endl;

    }
}



Compiler output:
a.cc: In function 'int main()':
a.cc:9:22: error: expression cannot be used as a function
    9 |         if(s[0]=='A' (s[1]-'0')<('A'-'0')){
      |                  ~~~~^~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  	int i,flag=0;
	string s;
  	cin>>s;
  	int n=size(s);
  	
  	if(s[0]!="A"){
		break;
    }else{
		for(i=1;i<n;i++){
		if((s[i]-'0')>=('A'-'0')){
          	flag++;
        }
        }

    }


  	if(flag==1){
		cout<<"AC"<<endl;
    }else{
		cout<<"WA"<<endl;

    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |         if(s[0]!="A"){
a.cc:10:17: error: break statement not within loop or switch
   10 |                 break;
      |                 ^~~~~
Language: C++

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

int main(){
  string S;
  cin >> S;
  int l=0,s=S.size();
  if(S[0]!='A'){
    cout << "WA" << endl;
    return 0;
  }
  if(s==4){
    if(s[2]!='C'){
      cout << "WA" << endl;
      return 0;
    }
  }
  else if(s!=4){
    for(int i=2;i<s-1;i++){
      if(S[i]=='C')l++;
    }
    if(l!=1){
      cout << "WA" << endl;
      return 0;
    }
  }
  if(S[1]<'a'||S[1]>'z'){
    cout << "WA" << endl;
    return 0;
  }
  for(int i=3;i<s-2;i++){
    if(S[i]<'a'||S[i]>'z'){
      cout << "WA" << endl;
      return 0;
    }
  }
  if(S[s]<'a'||S[s]>'z'){
    cout << "WA" << endl;
    return 0;
  }
  cout << "AC" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:9: error: invalid types 'int[int]' for array subscript
   14 |     if(s[2]!='C'){
      |         ^
Language: C

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

int main(void)
{
        char s[11];
        int i,x,a=0;

        scanf("%s",s);
        x=strlen(s);

        if (s[0]!='A'){
                printf("WA\n");
                return 0;
        }

        if (!((x>=4)&&(x<=10))){
                printf("WA|\n");
                return 0;
        }

        for (i=2;i<=x-2;i++){
                if (s[i]=='C')
                        a++;
        }

        for (i=0;i<=x;i++){
                if (!((s[i]>='a')&&(s[i]<='z')&&(s[i]>='A')&&(s[i]<='Z')){
                        printf("WA\n");
                        return 0;
                }
        }
        //printf("%d\n",a);

        if (a==1)
                printf("AC\n");
        else if (a!=1)
                printf("WA\n");

        return 0;
}

Compiler output:
main.c: In function 'main':
main.c:28:74: error: expected ')' before '{' token
   28 |                 if (!((s[i]>='a')&&(s[i]<='z')&&(s[i]>='A')&&(s[i]<='Z')){
      |                    ~                                                     ^
      |                                                                          )
main.c:32:9: error: expected expression before '}' token
   32 |         }
      |         ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int cnt=0;
int main()
{
	string s;
	cin>>s;
	if(s[0]=='A')
	{
		if(s[s.size()-1]<'a')
		{
			cout<<"WA"<<endl;
			return 0;
		}
		for(int i=1;i<s.size-1();i++)
		{
			if(s[i]<'a')
			cnt++;
			if(cnt==2)
			{
				cout<<"WA"<<endl;
				return 0;
			}
		}
		cout<<"AC"<<endl;
		return 0;
	}
	cout<<"WA"<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:39: error: expression cannot be used as a function
   15 |                 for(int i=1;i<s.size-1();i++)
      |                                      ~^~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int cnt=0;
int res=0;
int main()
{
	string s;
	cin>>s;
	if(s[0]=='A')
	{
		if(a[1]=='C')
		{
			for(int i=2;i<s.size();i++)
			{
				if(s[i]<'a')
				{
					cout<<"WA"<<endl;
					return 0;
				}
			}
			cout<<"AC"<<endl;
			return 0;
		}
		if(s[2]=='C')
		{
			for(int i=1;i<s.size();i++)
			{
				if(s[i]<'a')
				{
					cnt++;
				}
				if(cnt==2)
				{
					cout<<"WA"<<endl;
					return 0;
				}
			}
			cout<<"AC"<<endl;
			return 0;
		}
		if(s[s.size()-2]=='C')
		{
			for(int i=2;i<s.size();i++)
			{
				if(s[i]<'a')
				res++;
				if(res==2)
				{
					cout<<"WA"<<endl;
					return 0;
				}
			}
			cout<<"AC"<<endl;
			return 0;
		}
	}
	cout<<"WA"<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:20: error: 'a' was not declared in this scope
   11 |                 if(a[1]=='C')
      |                    ^
Language: C++

#!/bin/bash
clang++ -std=c++14 main.cc -Wall -O2

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #!
    1 | #!/bin/bash
      |  ^
a.cc:2:1: error: 'clang' does not name a type
    2 | clang++ -std=c++14 main.cc -Wall -O2
      | ^~~~~
Language: C++

from statistics import mean, median,variance,stdev
import sys
import math
import fractions

def j(q):
    if q==1: print("AC")
    else:print("WA")
    exit(0)


def ct(x,y):
    if (x>y):print("")
    elif (x<y): print("")
    else: print("")

def ip():
    return int(input())

#n = ip()                              #入力整数1つ
#n,k= (int(i) for i in input().split())      #入力整数横2つ
#x,y,z = (int(i) for i in input().split())    #入力整数横3つ
#n,m,x,y= (int(i) for i in input().split())  #入力整数横4つ
#a = [int(i) for i in input().split()]        #入力整数配列
a = input()                                  #入力文字列
#a = input().split()                          #入力文字配列

#jの変数はしようできないので注意
#xor は(a ^ b)でいける

if a[0] != 'A':j(0)
b = a[2:len(a)-1]
if b.count('C') != 1:j(0)
if a[len(a)-1] == 'C':j(0)
b = a[1:]
for i in range(1,len(a)):
    p = a[i].lower()
    if not (p == a[i] or a[i]=='C'):
        j(0)
j(1)

Compiler output:
a.cc:20:2: error: invalid preprocessing directive #n
   20 | #n = ip()                              #入力整数1つ
      |  ^
a.cc:21:2: error: invalid preprocessing directive #n
   21 | #n,k= (int(i) for i in input().split())      #入力整数横2つ
      |  ^
a.cc:22:2: error: invalid preprocessing directive #x
   22 | #x,y,z = (int(i) for i in input().split())    #入力整数横3つ
      |  ^
a.cc:23:2: error: invalid preprocessing directive #n
   23 | #n,m,x,y= (int(i) for i in input().split())  #入力整数横4つ
      |  ^
a.cc:24:2: error: invalid preprocessing directive #a
   24 | #a = [int(i) for i in input().split()]        #入力整数配列
      |  ^
a.cc:25:46: error: stray '#' in program
   25 | a = input()                                  #入力文字列
      |                                              ^
a.cc:26:2: error: invalid preprocessing directive #a
   26 | #a = input().split()                          #入力文字配列
      |  ^
a.cc:28:2: error: invalid preprocessing directive #j\U0000306e\U00005909\U00006570\U0000306f\U00003057\U00003088\U00003046\U00003067\U0000304d\U0000306a\U00003044\U0000306e\U00003067\U00006ce8\U0000610f
   28 | #jの変数はしようできないので注意
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:29:2: error: invalid preprocessing directive #xor
   29 | #xor は(a ^ b)でいける
      |  ^~~
a.cc:1:1: error: 'from' does not name a type
    1 | from statistics import mean, median,variance,stdev
      | ^~~~
Language: C++

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

int main(void){
 


    string S;
    cin>>S;
    int N,T,t;
    N=S.size();
    T=0;
    t=0;

    if(S[0]!='A'){
        cout<<"WA"<<endl;
                return 0;  
    }

    for(int i=2;i<=(N-2);i++){
        if(S[i]=='C'){
            T=T+1;
        }
    }
    if(T!=1){
        cout<<"WA"<<endl;
        return 0;  
    }
    
    for(int i=1;i<N;i++){    
        if('a' <=S[i] && S[i] <= 'z'){
            t=t+1;
        }
    }

    if(t==N-2){
        cout<<"AC"<<endl;
    }else{
      　cout<<"WA"<<endl;
    }
         

    return 0;
}

Compiler output:
a.cc:40:7: error: extended character 　 is not valid in an identifier
   40 |       　cout<<"WA"<<endl;
      |       ^
a.cc: In function 'int main()':
a.cc:40:7: error: '\U00003000cout' was not declared in this scope
   40 |       　cout<<"WA"<<endl;
      |       ^~~~~~
Language: C++

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

int main(void){
 


    string S;
    cin>>S;
    int N,T,t;
    N=S.size();
    T=0;
    t=0;

    if(S[0]!='A'){
        cout<<"WA"<<endl;
                return 0;  
    }

    for(int i=2;i<=(N-2);i++){
        if(S[i]=='C'){
            T=T+1;
        }
    }
    if(T!=1){
        cout<<"WA"<<endl;
        return 0;  
    }
    
    for(int i=1;i<N;i++){    
        if('a' <=S[i] && S[i] <= 'z'){
            t=t+1;
        }
    }

    if(t==N-2){
        cout<<"AC"<<endl;
                  
    }else{
      　cout<<"WA"<<endl;
               
    }
         

    return 0;
}

Compiler output:
a.cc:41:7: error: extended character 　 is not valid in an identifier
   41 |       　cout<<"WA"<<endl;
      |       ^
a.cc: In function 'int main()':
a.cc:41:7: error: '\U00003000cout' was not declared in this scope
   41 |       　cout<<"WA"<<endl;
      |       ^~~~~~
Language: C++

#include<iostream>
#include<string>
#include<cmath>
#include<queue>
#include<map>
#include<set>
#include<list>
#include<iomanip>
#include<vector>
#include<random>
#include<functional>
#include<algorithm>
#include<stack>
#include<cstdio>
#include<bitset>
#include<unordered_map>
#include <climits>
#include<fstream>
using namespace std;
//---------------------------------------------------
//library zone!!!!!
typedef long long ll;
typedef long double ld;
#define rep(i,j) for(ll i=0;i<(long long)(j);i++)
#define all(a) (a).begin(),(a).end()
const ll Mod = 1000000007;
struct P {
	ll pos, cost;
};
bool operator<(P a, P b) { return a.cost < b.cost; }
bool operator>(P a, P b) { return a.cost > b.cost; }
struct B {
	ll to, cost;
};
struct E {
	ll from, to, cost;
};
bool operator<(E a, E b) {
	return a.cost < b.cost;
}
struct H {
	ll x, y;
};
bool operator<(H a, H b) {
	if (a.x != b.x) return a.x < b.x;
	return a.y < b.y;
}
bool operator>(H a, H b) {
	if (a.x != b.x) return a.x > b.x;
	return a.y > b.y;
}
bool operator==(H a, H b) {
	return a.x == b.x&&a.y == b.y;
}
bool operator!=(H a, H b) {
	return a.x != b.x || a.y != b.y;
}
ll gcd(ll i, ll j) {
	if (i > j) swap(i, j);
	if (i == 0) return j;
	return gcd(j%i, i);
}
ld mod_pow(ld x, ll n, ll p) {
	ld res = 1;
	while (n > 0) {
		if (n & 1) res = res * x;
		x = x * x;
		n >>= 1;
	}
	return res;
}//x^n%p
const ll Inf = 3023372036854775807;
const int inf = 1500000000;
#define int long long
//----------------------------------------------------
signed main() {
	string s;
	cin>>s;AcycliC

	bool l=0;
	for(int i=2;i<s.size()-1;i++){
		if(s[i]=='C') l=1;
	}
	if(s[0]!='A') l=0;
	bool r=0;
	for(int i=1;i<s.size()-1;i++){
		if(!r&&s[i]=='C') r=1;
		else{
			if(!('a'<=s[i]&&s[i]<='z')){
				l=0;
			}
		}
	}
	if(l) cout<<"AC"<<endl;
	else cout<<"WA\n";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:78:16: error: 'AcycliC' was not declared in this scope
   78 |         cin>>s;AcycliC
      |                ^~~~~~~
a.cc:82:31: error: 'l' was not declared in this scope
   82 |                 if(s[i]=='C') l=1;
      |                               ^
a.cc:84:23: error: 'l' was not declared in this scope
   84 |         if(s[0]!='A') l=0;
      |                       ^
a.cc:90:33: error: 'l' was not declared in this scope
   90 |                                 l=0;
      |                                 ^
a.cc:94:12: error: 'l' was not declared in this scope
   94 |         if(l) cout<<"AC"<<endl;
      |            ^
Language: C++

#include <iostream>
using namespace std;

int main(){
  string s;
  cin >> s;
  int hantei=0;
  if (s.at(0)!='A'){
    hantei--;
  }
  if (s.at(1)=='C'){
    hantei--;
  }
  if (s.at(s.size()-1)=='C'){
    hantei--;
  }
  int count=0;
  for (int i=2;i<s.size()-1;i++){
    if (s.at(i)=='C'){
      count++;
    }
  }
  if (count!=1){
    hantei--;
  }
  int oomozi=0;
  for (int i=1;i<i.size();i++){
    if (s.at(i)>='A'&&s.at(i)<='Z'){
      oomozi++;
    }
  }
  if(oomozi!=1){
    hantei--;
  }
  if (hantei==0){
    cout << "AC" << endl;
  }
  else {
    cout << "WA" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:20: error: request for member 'size' in 'i', which is of non-class type 'int'
   27 |   for (int i=1;i<i.size();i++){
      |                    ^~~~
Language: C++

//c++

#include <iostream>
#include <string>

using namespace std;

#define REP(i,n) for(int i = 0;i < n;i++)

int main(){
	bool ans = true;
	int a = 0;
	string s;
	cin >> s;
	if(s[0] != "A") ans = false;
	for(int i = 1;i < n - 1;i++){
	if(s[i] == 'C') a++;
	else if(s[i] - 'a' < 0) ans = false;
	}
	if(s[n - 1] - 'a' < 0) ans = false;
	if(b != 1) ans = false;
	cout << ans ? "AC" : "WA"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   15 |         if(s[0] != "A") ans = false;
a.cc:16:27: error: 'n' was not declared in this scope
   16 |         for(int i = 1;i < n - 1;i++){
      |                           ^
a.cc:20:14: error: 'n' was not declared in this scope
   20 |         if(s[n - 1] - 'a' < 0) ans = false;
      |              ^
a.cc:21:12: error: 'b' was not declared in this scope
   21 |         if(b != 1) ans = false;
      |            ^
a.cc:22:34: error: invalid operands of types 'const char [3]' and '<unresolved overloaded function type>' to binary 'operator<<'
   22 |         cout << ans ? "AC" : "WA"<<endl;
      |                              ~~~~^~~~~~
Language: C++

#include <iostream>
#include <algorithm>
#include <string.h>
using namespace std;

int main(){
	string temp;
	int count=0;
	cin >> temp;
	if(temp[0]!='A'){
		cout << "WA" << endl;
		return 0;
	}
	for(int i=2;i<=temp.length()-2;i++){
		if(temp[i]=='C'){
			count++;
		}
		if(count>1){
			cout << "WA" << endl;
			return 0;
		}
	}
	count=0;
	for(int i=0;i<temp.length();i++){
		if(temp[i]>='A' && temp[i]<='Z'){
			count++;
		}
		if(count!=2){
			cout << "WA" << endl
			return 0;
		}
	}
	cout << "AC" << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:45: error: expected ';' before 'return'
   29 |                         cout << "WA" << endl
      |                                             ^
      |                                             ;
   30 |                         return 0;
      |                         ~~~~~~
Language: C++

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

int main(){
  string S;
  strinf a[2];
  cin>>S;
  int i=0;
  int cou=0;
  int b[2];
  int Flag=0;


  while(S[i]!=\0){
    if(isuppeer(S[i])){
      a[cou] = S[i];
      b[cou] = i;
      cou++;
      if(cou > 2){
        Flag=1;
        break;
      }
    }
  }

  if(Flag==1){
    cout<<"WA"<<endl;
  }
  else{
    if(a[0] == 'A' && b[0]==0){
      if(a[1]=='C' && 1<b[1] && b[1]<i){
        cout<<"AC"<<endl;
      }
      else{
        cout<<"WA"<<endl;
      }
    }
    else cout<<"WA"<<endl;
  }

}

Compiler output:
a.cc:15:15: error: stray '\' in program
   15 |   while(S[i]!=\0){
      |               ^
a.cc: In function 'int main()':
a.cc:7:3: error: 'strinf' was not declared in this scope; did you mean 'strtof'?
    7 |   strinf a[2];
      |   ^~~~~~
      |   strtof
a.cc:16:8: error: 'isuppeer' was not declared in this scope; did you mean 'isupper'?
   16 |     if(isuppeer(S[i])){
      |        ^~~~~~~~
      |        isupper
a.cc:17:7: error: 'a' was not declared in this scope
   17 |       a[cou] = S[i];
      |       ^
a.cc:31:8: error: 'a' was not declared in this scope
   31 |     if(a[0] == 'A' && b[0]==0){
      |        ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
struct Fast { Fast() { cin.tie(0); ios::sync_with_stdio(false); cout << fixed << setprecision(20);} } fast;


int main(){
    int c = 0, d = 0;
    string s;
    cin >> s;
    if (s[0] != 'A'){    
        cout << "WA" << endl;
        return 0;
    }
    for (int i = 1; i < s.size(); i++){
        if (A <= s[i] && s[i] != C && s[i] <= Z){
            cout << "WA" << endl;
            return 0;
        }
        if (s[i] == 'C'){
            c++;
            if (1 < i && i < s.size() - 1){
                d++;
            }
        }
    }
    if (c == 0 || c > 1){
        cout << "WA" << endl;
        return 0;        
    }else if (d == 1){
        cout << "AC" << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:13: error: 'A' was not declared in this scope
   15 |         if (A <= s[i] && s[i] != C && s[i] <= Z){
      |             ^
a.cc:15:34: error: 'C' was not declared in this scope
   15 |         if (A <= s[i] && s[i] != C && s[i] <= Z){
      |                                  ^
a.cc:15:47: error: 'Z' was not declared in this scope
   15 |         if (A <= s[i] && s[i] != C && s[i] <= Z){
      |                                               ^
Language: C++

#include<iostream>
using namespace std;
int main(){
  string s;cin>>s;
  int l=s.size();
  string ans="AC";
  if(s[0]!='A'){
    ans="WA";
  }
  int cnt=0;
  for(int i=1;i<l;i++){
    if(isupper(S[i])){
      i(i==1||i==l-1||S[i]!='C'){
        ans="WA"
      }
      ++cnt;
    }
  }
  if(cnt!=1){
    ans="WA";
  }
  cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:16: error: 'S' was not declared in this scope
   12 |     if(isupper(S[i])){
      |                ^
a.cc:13:32: error: 'i' cannot be used as a function
   13 |       i(i==1||i==l-1||S[i]!='C'){
      |                                ^
Language: C++

#include<iostream>
using namespace std;

int main(){
  string s;cin>>s;
  string ans="AC";
  ans=s[0]=='A'&&s[2]=='C'?ans:"WA";
  int cnt=0;
  for(int i=1;i<L;i++){
    if(isupper(s[i])){
      if(i==1||i==L-1||s[i]!='C'){
        ans="WA";
      }
      cnt++;
    }
  }
  if(cnt!=1){
    ans="WA";
  }
  cout<<ans<<endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:17: error: 'L' was not declared in this scope
    9 |   for(int i=1;i<L;i++){
      |                 ^
Language: C++

#incluce<iostream>
using namespace std;

int main(){
  string s;cin>>s;
  cout<<(s[0]=='A'&&s[2]=='C'?"AC":"WA")<<endl;
  return 0;
}


Compiler output:
a.cc:1:2: error: invalid preprocessing directive #incluce; did you mean #include?
    1 | #incluce<iostream>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:5:3: error: 'string' was not declared in this scope
    5 |   string s;cin>>s;
      |   ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
  +++ |+#include <string>
    1 | #incluce<iostream>
a.cc:5:12: error: 'cin' was not declared in this scope
    5 |   string s;cin>>s;
      |            ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #incluce<iostream>
a.cc:5:17: error: 's' was not declared in this scope
    5 |   string s;cin>>s;
      |                 ^
a.cc:6:3: error: 'cout' was not declared in this scope
    6 |   cout<<(s[0]=='A'&&s[2]=='C'?"AC":"WA")<<endl;
      |   ^~~~
a.cc:6:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:6:43: error: 'endl' was not declared in this scope
    6 |   cout<<(s[0]=='A'&&s[2]=='C'?"AC":"WA")<<endl;
      |                                           ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #incluce<iostream>
Language: C++

#incluce<iostream>
using namespace std;

int main(){
  string s;cin>>s;
  cout<<(s[0]=="A"&&s[2]=="C"?"AC":"WA")<<endl;
  return 0;
}


Compiler output:
a.cc:1:2: error: invalid preprocessing directive #incluce; did you mean #include?
    1 | #incluce<iostream>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:5:3: error: 'string' was not declared in this scope
    5 |   string s;cin>>s;
      |   ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
  +++ |+#include <string>
    1 | #incluce<iostream>
a.cc:5:12: error: 'cin' was not declared in this scope
    5 |   string s;cin>>s;
      |            ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #incluce<iostream>
a.cc:5:17: error: 's' was not declared in this scope
    5 |   string s;cin>>s;
      |                 ^
a.cc:6:3: error: 'cout' was not declared in this scope
    6 |   cout<<(s[0]=="A"&&s[2]=="C"?"AC":"WA")<<endl;
      |   ^~~~
a.cc:6:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:6:43: error: 'endl' was not declared in this scope
    6 |   cout<<(s[0]=="A"&&s[2]=="C"?"AC":"WA")<<endl;
      |                                           ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #incluce<iostream>
Language: C++

#include <iostream>
using namespace std;

int main(){
	string S;
	cin >> S;
	string ans = "AC";
	if(S[0] != 'A'){
		ans = "WA";
	}
	int cnt = 0;
	for(int i = 1; i < L; ++i){
		if(isupper(S[i])){
			if(i == 1 || i == S.size() - 1 || S[i] != 'C'){
				ans = "WA";
			}
			++cnt;
		}
	}
	if(cnt != 1){
		ans = "WA";
	}
	cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:28: error: 'L' was not declared in this scope
   12 |         for(int i = 1; i < L; ++i){
      |                            ^
Language: C++

#include <iostream>
using namespace std;

int main() {
  string s;
  cin >> s;
  int count = 0;
  int counter = 0;
  if (s.at(0) == 'A') {
    for (int j = 2; j < s.size(); j++) {
      if (isupper(s.at(j)))
          {counter++;}
    }
    if (islower(s.at(1)) && counter == 1 && islower(s.at(s.size())) {
    for (int i = 2; i < s.size(); i++) {
      if (s.at(i) == 'C')
        count++;
    }
    if (count == 1)
      cout << "AC" << endl;
    else
      cout << "WA" << endl;
    }
    else
          cout << "WA" << endl;
  }
  else
    cout << "WA" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:68: error: expected ';' before '{' token
   14 |     if (islower(s.at(1)) && counter == 1 && islower(s.at(s.size())) {
      |                                                                    ^~
      |                                                                    ;
a.cc:24:5: error: expected primary-expression before 'else'
   24 |     else
      |     ^~~~
a.cc:23:6: error: expected ')' before 'else'
   23 |     }
      |      ^
      |      )
   24 |     else
      |     ~~~~
a.cc:14:8: note: to match this '('
   14 |     if (islower(s.at(1)) && counter == 1 && islower(s.at(s.size())) {
      |        ^
Language: C++

#include <iostream>
using namespace std;

int main() {
  string s;
  cin >> s;
  int count = 0;
  int counter = 0;
  if (s.at(0) == 'A') {
    for (int j = 2; j < s.size(); j++) {
      if (isupper(s.at(j)))
          {counter++;}
    }
    if (islower(s.at(1)) && counter == 1 && islower(s.at(s.size)) {
    for (int i = 2; i < s.size(); i++) {
      if (s.at(i) == 'C')
        count++;
    }
    if (count == 1)
      cout << "AC" << endl;
    else
      cout << "WA" << endl;
    }
    else
          cout << "WA" << endl;
  }
  else
    cout << "WA" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:60: error: invalid use of non-static member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
   14 |     if (islower(s.at(1)) && counter == 1 && islower(s.at(s.size)) {
      |                                                          ~~^~~~
In file included from /usr/include/c++/14/string:54,
                 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/basic_string.h:1076:7: note: declared here
 1076 |       size() const _GLIBCXX_NOEXCEPT
      |       ^~~~
a.cc:24:5: error: expected primary-expression before 'else'
   24 |     else
      |     ^~~~
a.cc:23:6: error: expected ')' before 'else'
   23 |     }
      |      ^
      |      )
   24 |     else
      |     ~~~~
a.cc:14:8: note: to match this '('
   14 |     if (islower(s.at(1)) && counter == 1 && islower(s.at(s.size)) {
      |        ^
Language: C++

#include <iostream>
using namespace std;

int main() {
  string s;
  cin >> s;
  int count = 0;
  int counter = 0;
  if (s.at(0) == 'A') {
    for (int j = 2; j < s.size(); j++) {
      if (isupper(s.at(j))
          {counter++;}
    }
    if (islower(s.at(1))&& counter == 1) {
    for (int i = 2; i < s.size(); i++) {
      if (s.at(i) == 'C')
        count++;
    }
    if (count == 1)
      cout << "AC" << endl;
    else
      cout << "WA" << endl;
    }
    else
          cout << "WA" << endl;
  }
  else
    cout << "WA" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:27: error: expected ')' before '{' token
   11 |       if (isupper(s.at(j))
      |          ~                ^
      |                           )
   12 |           {counter++;}
      |           ~                
a.cc:13:5: error: expected primary-expression before '}' token
   13 |     }
      |     ^
Language: C++

#include <iostream>
using namespace std;

int main() {
  string s;
  cin >> s;
  int count = 0;
  int counter = 0;
  if (s.at(0) == 'A') {
    for (int j = 2; j < s.size(); j++) {
      if (isupper(s.at(j))
          counter++;
    }
    if (islower(s.at(1))&& counter == 1;) {
    for (int i = 2; i < s.size(); i++) {
      if (s.at(i) == 'C')
        count++;
    }
    if (count == 1)
      cout << "AC" << endl;
    else
      cout << "WA" << endl;
    }
    else
          cout << "WA" << endl;
  }
  else
    cout << "WA" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:27: error: expected ';' before 'counter'
   11 |       if (isupper(s.at(j))
      |                           ^
      |                           ;
   12 |           counter++;
      |           ~~~~~~~          
a.cc:13:5: error: expected primary-expression before '}' token
   13 |     }
      |     ^
a.cc:12:21: error: expected ')' before '}' token
   12 |           counter++;
      |                     ^
      |                     )
   13 |     }
      |     ~                
a.cc:11:10: note: to match this '('
   11 |       if (isupper(s.at(j))
      |          ^
a.cc:13:5: error: expected primary-expression before '}' token
   13 |     }
      |     ^
a.cc:14:41: error: expected primary-expression before ')' token
   14 |     if (islower(s.at(1))&& counter == 1;) {
      |                                         ^
Language: C++

#include <iostream>
using namespace std;

int main() {
  string s;
  cin >> s;
  int count = 0;
  if (s.at(0) == 'A') {
    for (int i = 2; i > s.size - 1; i++) {
      if (s.at(i) == 'C')
        count++;
    }
    if (count == 1)
      cout << "AC" << endl;
    else
      cout << "WA" << endl;
  }
  else
    cout << "WA" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:27: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
    9 |     for (int i = 2; i > s.size - 1; i++) {
      |                         ~~^~~~
      |                               ()
Language: C++

// live.cpp : コンソール アプリケーションのエントリ ポイントを定義します。
//

#include "stdafx.h"
#include <ctype.h>
#include <string>
#include <iostream>
using namespace std;
int main()
{
	string s;
	cin >> s;
	if (s[0] != 'A') {
		cout << "WA" << endl;
		return 0;
	}
	int tmp;
	bool b = 0;
	for (int i = 2; i < s.length(); i++)
	{
		if (s[i] == 'C') {
			b = 1;
			tmp = i;
		}
	}
	if (!b) {
		cout << "WA" << endl;
		return 0;
	}
	for (int i = 1; i < s.length(); i++) {
		if (i == tmp) continue;
		if (isupper(s[i])) {
			cout << "WA" << endl;
			return 0;
		}
	}
	if (s[s.length() - 1] == 'C') {
		cout << "WA" << endl;
		return 0;
	}
	cout << "AC" << endl;
    return 0;
}



Compiler output:
a.cc:4:10: fatal error: stdafx.h: No such file or directory
    4 | #include "stdafx.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

include <stdio.h>
#include <string.h>
int main(void){
  char s[10];
  scanf("%10s", s);
  int jud1=0, jud2=0, jud3=0, count=0;
  if(s[0]=='A')
    jud1=1;
  for(int i=2; i<strlen(s)-1; i++){
    if(s[i]=='C'){
      jud2=1;
      count++;
    }
  }
  for(int i=0; i<strlen(s); i++){
    if('A'<=s[i] && s[i]<='Z')
      jud3++;
  }
  if(s[strlen(s)]=='C')
    jud2=0;
  if(jud1==1 && jud2==1 && jud3==2 && count==1)
    printf("AC\n");
  else
    printf("WA\n");

  return 0;
}
    

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <stdio.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'scanf' was not declared in this scope
    5 |   scanf("%10s", s);
      |   ^~~~~
a.cc:9:18: error: 'strlen' was not declared in this scope
    9 |   for(int i=2; i<strlen(s)-1; i++){
      |                  ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include <string.h>
  +++ |+#include <cstring>
    3 | int main(void){
a.cc:15:18: error: 'strlen' was not declared in this scope
   15 |   for(int i=0; i<strlen(s); i++){
      |                  ^~~~~~
a.cc:15:18: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc:19:8: error: 'strlen' was not declared in this scope
   19 |   if(s[strlen(s)]=='C')
      |        ^~~~~~
a.cc:19:8: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc:22:5: error: 'printf' was not declared in this scope
   22 |     printf("AC\n");
      |     ^~~~~~
a.cc:3:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
    2 | #include <string.h>
  +++ |+#include <cstdio>
    3 | int main(void){
a.cc:24:5: error: 'printf' was not declared in this scope
   24 |     printf("WA\n");
      |     ^~~~~~
a.cc:24:5: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

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

int main() {
    string s;
    cin >> s;
    bool c,e;
    string ans = "AC";
    if (s[0] != 'A')ans = "WA";
    for (int i = 2; i < (s.size() - 2); i++) {
        if (s[i] = 'C')c = true;
        if (c ==true&&s[i]='C')c = false;
    }
    if (c = false)ans = "WA";
    for (int i = 0; i < s.size(); i++) {
        if (isupper(s[i]) != 0 || s[i] == 'A' || s[i] == 'C') {
        }
        else e = true;
    }
    if (e = true)ans = "WA";
    cout << ans << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:21: error: lvalue required as left operand of assignment
   14 |         if (c ==true&&s[i]='C')c = false;
Language: C++

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

int main() {
    string s;
    cin >> s;
    bool c,e;
    string ans = "AC";
    if (s[0] != 'A')ans = "WA";
    for (int i = 2; i < (s.size() - 2); i++) {
        if (s[i] = 'C')c = true;
        if (c = true&&s[i]='C')c = false;
    }
    if (c = false)ans = "WA";
    for (int i = 0; i < s.size(); i++) {
        if (isupper(s[i]) != 0 || s[i] == 'A' || s[i] == 'C') {
        }
        else e = true;
    }
    if (e = true)ans = "WA";
    cout << ans << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:21: error: lvalue required as left operand of assignment
   14 |         if (c = true&&s[i]='C')c = false;
Language: C++

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

int main(){
  string s; cin >> s;
  bool flag = true;
  
  int L = s.size();
  int cp;
  int ccount = 0;

  if(s[0] != 'A'){
    ans = "WA";
  }

  for(int i = 2; i < L-1; i++){
    if(s[i] == 'C') {
      int cp = i;
      ccount++;
    }
  }


  if(ccount != 1) flag = false;
  for(int i = 0; i < L && flag; i++){
    if(i == 0){
      if(s[i] != 'A') flag = false;
    }

    else if(i != cp){
      if(isupper(s[i])) flag = false;
    }
  }

  

  if(flag) cout << "AC" << endl;
  else cout << "WA" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
   15 |     ans = "WA";
      |     ^~~
      |     abs
Language: C++

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

int main(){
  stirng s; cin >> s;
  int ans = 0;

  if(s[0] != 'A'){
    ans++;
  }

  for(int i = 2; i < s.size()-1; i++){
    if(s[i] == 'C') break;
  }

  if(ans != 0) cout << "WA" << endl;
  else cout << "AC" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'stirng' was not declared in this scope
    7 |   stirng s; cin >> s;
      |   ^~~~~~
a.cc:7:20: error: 's' was not declared in this scope
    7 |   stirng s; cin >> s;
      |                    ^
Language: C++

#include <bits/stdc++.h>
#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)  
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define FORR(i, m, n) for(int i = m;i >= n;i--)
#define SORT(v, n) sort(v, v+n);
#define VSORT(v) sort(v.begin(), v.end());
#define llong long long
#define pb(a) push_back(a)
#define INF 999999999
using namespace std;
typedef pair<int, int> P;
typedef pair<llong, llong> LP;
typedef pair<int, P> PP;
typedef pair<llong, LP> LPP;

int dy[]={0, 0, 1, -1};
int dx[]={1, -1, 0, 0};

int main(){

  string s;
  cin>>s;

  int ssize = s.size();
  if(s[0] != 'A'){
    cout<<"WA"<<endl;
    return 0;
  }

  int cnt = 0;

  for(int i=1;i<ssize;i++){
    if(isupper(s[i])){
      if(s[i] != 'C'){
        cout<<"WA"<<endl;
        return 0;
      }else if(i==2||i==n-1){
        cout<<"WA"<<endl;
        return 0;
      }else{
        cnt++;
      }
    }
  }

  if(cnt==1){
    cout<<"AC"<<endl;
  }else{
    cout<<"WA"<<endl;
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:38:25: error: 'n' was not declared in this scope
   38 |       }else if(i==2||i==n-1){
      |                         ^
Language: C++


#include<stdio.h>
#include<string.h>
int main()
{
    int l,a,b,c,sum=0,temp=0,p=0,er=0,sp=0,o=0;
    char ch[100000];
    
    gets(ch);
    l=strlen(ch);
    int i,ty=0,se=0,re=0;
    if(ch[0]=='A')
    {
        sum=1;
    }
    
    for(i=2;i<l-1;i++)
    {
       if(ch[i]=='C')
        {
            temp++;
        }
    
    }
    if(temp==1)
    {
        er=1;
    
    }
    for(i=0;i<l;i++)
    {
        if(ch[i]>='A'&&ch[i]<='Z'&&ch[i]!='A'&&ch[i]!='C')
        {
            ty++;
        }
    }
    if(ty==0)
    {
        sp=1;
    }
    
    if(sp==1&&er==1&&sum==1)
    {
        printf("AC\n");
    }
    else
    {
        printf("WA\n");
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
    9 |     gets(ch);
      |     ^~~~
      |     getw
Language: C++

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

int main(){
  string a;
  int count;
  int judge;
  count = 0;
  judge = 0;
  cin >> a;
  if(a[0] == "A"){
    if(a[1] >= "a" && a[1] <= "z" && a[a.size()-1] >= "a" && a[a.size()-1] <= "z"){
    	for(int i = 2; i < a.size() - 1; i++){
          if(a[i] == "C"){
            count++;
            continue;
          }
          else if(a[i] >= "a" && a[i] <= "z"){
            continue;
          }
          else{
            break;
          }
          if(i == a.size() - 2){
            judge = 1;
          }
        }
    }
  }
  if(judge == 1 && count == 1){
    cout << "AC" << endl;
  }
  else(){
    cout << "WA" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:11: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |   if(a[0] == "A"){
a.cc:13:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 |     if(a[1] >= "a" && a[1] <= "z" && a[a.size()-1] >= "a" && a[a.size()-1] <= "z"){
a.cc:13:28: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 |     if(a[1] >= "a" && a[1] <= "z" && a[a.size()-1] >= "a" && a[a.size()-1] <= "z"){
a.cc:13:52: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 |     if(a[1] >= "a" && a[1] <= "z" && a[a.size()-1] >= "a" && a[a.size()-1] <= "z"){
a.cc:13:76: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 |     if(a[1] >= "a" && a[1] <= "z" && a[a.size()-1] >= "a" && a[a.size()-1] <= "z"){
a.cc:15:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   15 |           if(a[i] == "C"){
a.cc:19:24: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   19 |           else if(a[i] >= "a" && a[i] <= "z"){
a.cc:19:39: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   19 |           else if(a[i] >= "a" && a[i] <= "z"){
a.cc:34:8: error: expected primary-expression before ')' token
   34 |   else(){
      |        ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main() {
	string s;
	cin >> s;
	int cnt = 0;

	bool b1=false, b2=false, b3=false;
	if (s[0] = 'A')  b1 = true;
	for (int i = 2; i <= s.size() - 2; i++) {
		if (s[i] == 'C') {
			cnt++;
		}
	}
	if (cnt == 1) {
		b2 = true;
	}

	int cnt2=0;
	for (int i = 0; i < N; i++) {
		if (isupper(s[i])) {
			cnt2++;
		}
	}
	if (cnt2 == 2) {
		b3 == true;
	}
	if (b1&&b2) {
		if (b2&&b3) {
			cout << "AC" << endl;
		}
	}
	else {
		cout << "WA" << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:29: error: 'N' was not declared in this scope
   20 |         for (int i = 0; i < N; i++) {
      |                             ^
Language: C++

#include <iostream>
#include <string> 
#include <cctype>
using namespace std;


int main(){
  std::string S;
  cin>>S;
 int N=S.size()-1;
 int i=1;
 int ans=0;
  int num;
  if(S[0]=='A'){
  while(i<N){
    if(S[i]=='C'){
      int ans++;
    }
    if(isupper(S[i])){
      num++;
    }
    
    i++;
  }
  }
  if(num==1&&ans==1){
    cout<<"AC"<<endl;
  }else{
    cout<<"WA"<<endl;
  }
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:14: error: expected initializer before '++' token
   17 |       int ans++;
      |              ^~
Language: C++

s = input()
count = 0
for i in range(len(s)):
    if i == 0:
        if s[i] != 'A':
            break
    elif s[i].isupper():
        if 2 <= i < len(s) - 1 and s[i] == 'C':
            count += 1
        else:
            count = 0
            break
if count == 1:
    print('AC')
else:
    print('WA')


Compiler output:
a.cc:14:11: warning: multi-character character constant [-Wmultichar]
   14 |     print('AC')
      |           ^~~~
a.cc:16:11: warning: multi-character character constant [-Wmultichar]
   16 |     print('WA')
      |           ^~~~
a.cc:1:1: error: 's' does not name a type
    1 | s = input()
      | ^
Language: C++

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

bool check(stirng S){
  if(S[0]=='A')
    return false;
  
  int count=0;
  for(int i=1;i<S.size()-1;++i){
    if(S[i]=='C')
      ++count;
  }
  if(count!=1)
    return false;
  
  int cnt=0;
  for(int i=0;i<S.size();++i){
    if('A'<=S[i] && S[i]<='Z')
      ++cnt;
  }
  
  if(cnt!=2)
    return false;
  
  return true;
}

int main() {
  string S;
  cin>>S;
  
  if(check(S))
    cout<<"AC"<<endl;
  else
    cout<<"WA"<<endl;
}


Compiler output:
a.cc:6:12: error: 'stirng' was not declared in this scope
    6 | bool check(stirng S){
      |            ^~~~~~
a.cc: In function 'int main()':
a.cc:34:11: error: 'check' cannot be used as a function
   34 |   if(check(S))
      |      ~~~~~^~~
Language: C++

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

int main() {
  string S;
  cin>>S;
  
  bool accept1=false;
  bool accept2=false;
  bool accept3=false;
  
  if(S[0]=='A')
    accept1=true;
  
  int count=0;
  int index=0;
  for(int i=2;i<S.size()-1;++i){
    if(S[i]=='C'){
      ++count;
      index=i;
    }
  }
  
  if(count==1)
    accept2=true;
  
  int cnt=0;
  for(int i=1;i<S.size() && i!=index;++i){
    if(S[i]=='A' || S[i]=='B' || S[i]=='C' || S[i]=='D' || S[i]=='E'
      S[i]=='F' || S[i]=='G' || S[i]=='H' || S[i]=='I' || S[i]=='J'
      || S[i]=='K' || S[i]=='L' || S[i]=='M' || S[i]=='N' || S[i]=='O' ||
      S[i]=='P' || S[i]=='Q' || S[i]=='R' || S[i]=='S' || S[i]=='T' || 
      S[i]=='U' || S[i]=='V' || S[i]=='W' || S[i]=='X' || S[i]=='Y' || S[i]=='Z')
      ++cnt;
  }
  
  if(cnt==0)
    accept3=true;
  
  if(accept1 && accept2 && accept3)
    cout<<"AC"<<endl;
  else
    cout<<"WA"<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:31:69: error: expected ')' before 'S'
   31 |     if(S[i]=='A' || S[i]=='B' || S[i]=='C' || S[i]=='D' || S[i]=='E'
      |       ~                                                             ^
      |                                                                     )
   32 |       S[i]=='F' || S[i]=='G' || S[i]=='H' || S[i]=='I' || S[i]=='J'
      |       ~