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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: expected ',' or ';' before 'if'
    8 |   if(s[0] != 'A' || s[1] == 'C'  || s[l-1] == 'C' ){
      |   ^~
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <cmath>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> plglg;
typedef pair<double, ll> pdlg;
typedef tuple<int, int, int> tiii;
typedef tuple<ll, ll, ll> tlglglg;
typedef tuple<double, double, double> tddd;

bool judge_cap(char);

int main(void){
  string str;
  cin >> str;
  int counter = 0;
  int len = str.size();
  
  if(str[0] != 'A' || judge_cap(str[1])){
    cout << "WA" << endl; return 0;
  } else {
    for(int i = 2; i < len - 1; i++){
      if(str[i] == 'C'){
	counter++;
      } else if(judge_cap(str[i])){
	cout << "WA" << endl; return 0;
      } else {
	
      }
    }
  }
  if(judge_cap(str[len]) || flag != 1){
    cout << "WA" << endl; return 0;
  } else {
    cout << "AC" << endl; return 0;
  }
}
bool judge_cap(char c){
  if(c >= 'A' && c <= 'Z'){
    return true;
  } else {
    return false;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:36:29: error: 'flag' was not declared in this scope
   36 |   if(judge_cap(str[len]) || flag != 1){
      |                             ^~~~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:22:21: error: expected ';' before 'cnt'
   22 |     if((n[i]-'Z'<=0)cnt++;
      |                     ^~~
      |                     ;
a.cc:23:3: error: expected primary-expression before '}' token
   23 |   }
      |   ^
a.cc:22:27: error: expected ')' before '}' token
   22 |     if((n[i]-'Z'<=0)cnt++;
      |       ~                   ^
      |                           )
   23 |   }
      |   ~                        
a.cc:23:3: error: expected primary-expression before '}' token
   23 |   }
      |   ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:13:17: error: 's' was not declared in this scope
   13 |   for(int i=2;i<s.size()-1;i++){
      |                 ^
a.cc:21:17: error: 's' was not declared in this scope
   21 |   for(int i=0;i<s.size();i++){
      |                 ^
a.cc:22:21: error: expected ';' before 'cnt'
   22 |     if((n[i]-'Z'<=0)cnt++;
      |                     ^~~
      |                     ;
a.cc:23:3: error: expected primary-expression before '}' token
   23 |   }
      |   ^
a.cc:22:27: error: expected ')' before '}' token
   22 |     if((n[i]-'Z'<=0)cnt++;
      |       ~                   ^
      |                           )
   23 |   }
      |   ~                        
a.cc:23:3: error: expected primary-expression before '}' token
   23 |   }
      |   ^
Language: C++

#include <bits/stdc++.h>
 
using namespace std;
 
char s[20];
int x,y;
 
int main() {
    cin >> s;
 
    if (s[0] != 'A') {
        cout << "WA"<< endl;
        return 0;
    }
    if(s[1] == 'C' || s[1] < 95) {
        cout << "WA"<< endl;
        return 0;
    }
    if (s[strlen(s)-1] < 95) {
        cout << "WA"<<endl;
        return 0;
    }
    for (x=2 ; x <strlen(s)-1 ; x++) {
        if (s[x] == 'C') {
            if (y != 0) {
                cout << "WA"<<endl;
                return 0;
            }
            y++;
        }
        if (s[x] < 60) {
            cout << "WA"<<endl;
            return 0;
        }
    }
    if (y == 0) {
        cout << "WA" endl;
        return 0;
    }
    cout << "AC" << endl;
 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:37:21: error: expected ';' before 'endl'
   37 |         cout << "WA" endl;
      |                     ^~~~~
      |                     ;
Language: C

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

int main(){
    string s; cin >> s;
    bool ans1 = false;
    bool ans2 = false;
    if(s[0] == 'A') ans1 = true;

    int ret = 0;
    for(int i = 2; i < s.size() - 1; ++i){
        if(s[i] == 'C'){
            ret++;
        }
    }
    if(ret == 1){
        ans2 = true;
    }
    if(ans1 & ans2) cout << "AC" << endl;
    else cout << "WA" << endl;
}

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

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

int main()
{
    
    string S;
    cin >> S;    

    if(S[0]=='A'){
      int count = 0;
      for(int i=0; i<S.size()-1; i++)
      {  
        if(i<2)
        {
          if(!islower(S[i])) 
          {
             cout << "WA" << endl;
             return 0;
          }
        }
        else{ 
          if(S[i]=='C') count++;
          else if(!islower(S[i])) 
          { 
            cout << "WA" << endl;
            return 0;
          }
        }
      if(count==1) cout << "AC" << endl;
      else cout << "WA" << endl;
    }
    
    else {
      cout << "WA" << endl;
    }
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:35:5: error: expected '}' before 'else'
   35 |     else {
      |     ^~~~
a.cc:11:18: note: to match this '{'
   11 |     if(S[0]=='A'){
      |                  ^
Language: C++

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

int main() {
  string a;
  int b=0;
  int c=0;
  int l;
  l = a.size();
  cin >> a;
  if(a.at(0) != 'A'){
    cout << "WA" << endl;
  }
  else{
    for(i = 2; i < l-1; i++){
      if(a.at(i) == 'C'){
        b++;
      }
      if(b != 1){
        cout << "WA" << endl;
        break;
      }
    for(i = 1; i < l; i++){
      if('a' < a.at(i) < 'z'){
        c++;
      }
      if(b != l-2 ){
        cout << "WA" << endl;
        break;
      }
    }
      cout << "AC" << endl;
    }
  }
}
    
    

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

#include<stdio.h>
#include<string.h>
main()
{
	int w=0,x=0,p=0,len,i,y=0,z=0,cnt=0,c,cex=0;
	char s[10000];
	scanf("%s",s);
	len=strlen(s);
	if(s[0]=='A')
	{
		w=1;
	}
	for(i=2;i<len-1;i++)
	{
		if(s[i]>='A' && s[i]<='Z')
		{
			cnt++;
			c=i;
		}
	}
	
	if(cnt==1 && s[c]=='C')
	{
		x=1;
	}
	if(s[len-1]=='C' || (s[len-1]>='a' && s[len-1] <='z'))
	{
		y=1;
	}
	
	for(i=1;i<len-1;i++)
	{
		if(i!=c){
		if(s[i]>='a' && s[i]<='z' && z=1)
		{
			z=1;
		}
		if(s[i]>='a' && s[i]<='z'){}
		else if(s[i]<'a' || s[i]>'z'){
		break;}}
	}
	
	if(w==1 && x==1 && y==1 && z==1)
	{
		printf("AC\n");
	}
	else printf("WA\n");
	//printf("%d%d%d%d",w,x,y,z);
}
	
 


Compiler output:
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
    3 | main()
      | ^~~~
main.c: In function 'main':
main.c:34:47: error: lvalue required as left operand of assignment
   34 |                 if(s[i]>='a' && s[i]<='z' && z=1)
      |                                               ^
Language: C++

#include<stdio.h>
int main()
{
    int i,siz,low=0,c=0;
    char a[100];
    scanf("%s",a);
    siz=strlen(a);
    if(a[0]=='A')
    {
        for(i=2; i<siz-1; i++)
        {
            if(a[i]=='C')
                c++;

        }
        if(c==1)
        {
            for(i=1; i<siz; i++)
            {
                if(a[i]>='a'||a[i]<='z')
                {
                    low++;
                }

            }
            if(low=siz-2)
            {
                printf("AC\n");
            }
            else printf("WA\n");
        }
        else printf("WA\n");



    }
    else printf("WA\n");
    return 0;


}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'strlen' was not declared in this scope
    7 |     siz=strlen(a);
      |         ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<stdio.h>
  +++ |+#include <cstring>
    2 | int main()
Language: C++

#include<stdio.h>
#include<string.h>
int main(){
  int l,c=0;
  char s[100];
  scanf("%s",s);
  l=strlen(s);
  if(s[0]=='A' && s[l-1]>='a' && s[l-1]<='z' && s[1]>='a' && str[1]<='z'){
    for(int i=2;i<=l-2;i++){
      if(s[i]=='C') c++;
    }
    if(c==1) puts("AC");
    else puts("WA");
  }
    else puts("WA\n");
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:62: error: 'str' was not declared in this scope; did you mean 'std'?
    8 |   if(s[0]=='A' && s[l-1]>='a' && s[l-1]<='z' && s[1]>='a' && str[1]<='z'){
      |                                                              ^~~
      |                                                              std
Language: C++

#include<stdio.h>
#include<math.h>
#include<string.h>
int main(){
    int i,len,count=999;
    char str[15];
    scanf("%s",str);
    len=strlen(str);
    if(str[0]=='A'){
        if((str[2]=='C' || str[len-2]=='C') && str[2] != str[len-2]){
               cnt=0;
            for(i=1;i<len;i++){
                if(str[i]>='a' && str[i]<='z') count++;
            }
           if(len-2==count) printf("AC");
           else printf("WA");
        }
        else printf("WA\n");
    }
    else printf("WA\n");
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:16: error: 'cnt' was not declared in this scope; did you mean 'int'?
   11 |                cnt=0;
      |                ^~~
      |                int
Language: C++

#include<stdio.h>
#include<math.h>
#include<string.h>
int main(){
    int i,len,count=999;
    char str[15];
    scanf("%s",str);
    len=strlen(str);
    if(str[0]=='A'){
        if((str[2]=='C' || str[len-2]=='C') && str[2] != str[len-2]){
               cnt=0;
            for(i=0;i<len;i++){
                if(str[i]>='a' && str[i]<='z') count++;
            }
        }
        if(count==len-2) printf("AC\n");
        else printf("WA\n");
    }
    else printf("WA\n");
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:16: error: 'cnt' was not declared in this scope; did you mean 'int'?
   11 |                cnt=0;
      |                ^~~
      |                int
Language: C++

#include<stdio.h>
#include<math.h>
#include<string.h>
int max(int a,int b){
   if(a>b) return a;
   return b;
}
int min(int a,int b){
   if(a<b) return a;
   return b;
}
void sort(char *a,int l){
    for(int i=0;i<l;i++){
       for(int j=i+1;j<l;j++){
          char t;
         if(a[i]>a[j]) {
            t=a[i];
            a[i]=a[j];
            a[j]=t;
         }

       }
    }


}

int main(){
    char a[100],b[1000];
    scanf("%s",a);
    int l=strlen(a),cnt=0;
    if(a[0]!='A') {
       printf("WA");
       return 0;
    }
    for(int i=1;i<l;i++){
       if(a[i]<='a') {
          if(i=1 || i=l-1 || a[i]!='C'){
             printf("WA"); return 0;
          }
          cnt++;
       }
    }
   if(cnt==1) printf("AC");
}
   
   
   
   
   
   

Compiler output:
a.cc: In function 'int main()':
a.cc:38:18: error: lvalue required as left operand of assignment
   38 |           if(i=1 || i=l-1 || a[i]!='C'){
      |                ~~^~~~
Language: C++

#include<stdio.h>

int main()
{
    char string[15];
    scanf("%s",string);
    if(string[0]!='A')
    {
        printf("WA\n");
        return 0;
    }
    int c=0,i=0;
    for(i=1;string[i]!='\0';i++)
    {
        if(i>1 && string[i]=='C') c++;
        else {
            if(string[i]>='A'&& string[i]<='Z')
            {
                printf("WA\n");
                return 0;
            }
        }
    }
    i--;
    if(i>3)
    {
        if(c!=1)
        {
            printf("WA\n");
            return 0;
        }
        else
        {
            if(sting[i]=='C')
            {
                printf("WA\n");
                return 0;
            }
        }
    }
    else
    {
        if(c==1)
        {
            printf("WA\n");
            return 0;
        }
    }
    printf("Yes\n");
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:34:16: error: 'sting' was not declared in this scope; did you mean 'string'?
   34 |             if(sting[i]=='C')
      |                ^~~~~
      |                string
Language: C++

#include<stdio.h>
#include<string.h>
int main()
{
	char a[500];
	int l,b,c,i,n;
	gets(a);
	n=strlen(a);
	if(a[0]=='A')
	{
		if(a[2]=='C' && a[n-2]=='C')
		{
			b=0;
		}
		else if(a[2]=='C' || a[n-2]=='C')
		{
			for(i=0;i<n;i++)
			{
				if(i==0 || i==2 || i==n-2)
				{
					continue;
				}
				else{
					if(a[i]>'Z')
					{b=1;}
					else{b=0;
						break;}
					}
				}
			}
		}
			if(b==1)
			printf("AC\n");
			else
			printf("WA\n");
			return 0;
		}
					
					
				


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

#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<cmath>
#include<string>
#include<cstring>
#include<algorithm>
#include<functional>
#include<vector>
#include<map>

using namespace std;
#define endl '\n'
#define pb push_back
#define fst first
#define scd second
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
#define MOD (1e9 + 7)
#define ALL(x) (x).begin(), (x).end()
#define RALL(x) (x).rbegin(), (x).rend()
#define REP(i,n) for(int i = 0;i < (n);i++)
#define FOR(i,a,b) for(int i = (a);i <= (b);i++)
#define YES(n) cout << ((n) ? "YES" : "NO" ) << endl
#define Yes(n) cout << ((n) ? "Yes" : "No" ) << endl


typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> P;
typedef vector<int> vi;
typedef vector<vector<int>> vii;

template <class T = int> T in() { T x; cin >> x; return (x); }
template <class T = int> void out(T x) { cout << (x) << endl; }

int gcd(int a, int b) { return b ? gcd(b, a%b) : a; }

void solve() {

	string s;
	cin >> s;

	bool ans = true;
	if (s[0] != 'A') ans = false;

	if (count(s.begin() + 2, s.end() - 1, 'C') != 1) ans = false;

	FOR(i, 1, s.size - 1) {
		if (s[i] != 'C' && s[i] > 'z') ans = false;
	}

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

	return;

}

int main() {

	cin.tie(0);
	ios::sync_with_stdio(false);

	solve();

	return 0;

}

Compiler output:
a.cc: In function 'void solve()':
a.cc:50:21: 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 '()' ?)
   50 |         FOR(i, 1, s.size - 1) {
      |                   ~~^~~~
a.cc:24:42: note: in definition of macro 'FOR'
   24 | #define FOR(i,a,b) for(int i = (a);i <= (b);i++)
      |                                          ^
Language: C++

#include<iostream>

using namespace std;

int main(){
  int i, ss, answer;
  char array[10];
  answer = 0;
  cin >> array;
  if(array[0]=='A'){
    for(i = 2;i <= strlen(array) - 2;i++){
      if(array[i]=='C'){
        for(ss = 0;ss <= strlen(array);ss++){
          if((array[ss]>='A')&&(array[ss]<='Z')){
            answer++;
          }
        }
        if(answer==2){
          cout << "AC" << endl;
        }
        else if(answer<2||answer>2){
          cout << "aA" << endl;
        }
        break;
      }
      else{
        cout << "WA" << endl;
        break;
      }
    }
  }
else{
  cout << "Wa" << endl;
}
return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:11:20: error: 'strlen' was not declared in this scope
   11 |     for(i = 2;i <= strlen(array) - 2;i++){
      |                    ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<iostream>
  +++ |+#include <cstring>
    2 | 
a.cc:35:10: error: expected '}' at end of input
   35 | return 0;
      |          ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: C++

#include <iostream>
using namespace std;

bool check(string S){
  if(S[0]!='A') return false;
  int C=0;
  for (int i = 2 ; i < S.length()-1; i++) {
    if(S[i]=='C'){
      C++;
    }
  }
  if(C!=1) return false;
  int upper=0;
  for (int i = 0; i < S.length(); i++) {
    if(S[i]>='A'&&S[i]<='Z'){
      upper++;
    }
  }
  if(upper!=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: In function 'int main()':
a.cc:26:14: error: expected ')' before '{' token
   26 |   if(check(S){
      |     ~        ^
      |              )
a.cc:31:1: error: expected primary-expression before '}' token
   31 | }
      | ^
Language: C++

#include <iostream>
using namespace std;

bool check(string S){
  if(S[0]!='A') return false;
  int C=0;
  for (int i = 2 ; i < S.legth()-1; i++) {
    if(S[i]=='C'){
      C++;
    }
  }
  if(C!=1) return false;
  int upper=0;
  for (int i = 0; i < S.length(); i++) {
    if(S[i]>='A'&&S[i]<='Z'){
      upper++:
    }
  }
  if(upper!=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: In function 'bool check(std::string)':
a.cc:7:26: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'legth'; did you mean 'length'?
    7 |   for (int i = 2 ; i < S.legth()-1; i++) {
      |                          ^~~~~
      |                          length
a.cc:16:14: error: expected ';' before ':' token
   16 |       upper++:
      |              ^
      |              ;
a.cc: In function 'int main()':
a.cc:26:13: error: expected ')' before '{' token
   26 |   if(check(S{
      |           ~ ^
      |             )
a.cc:30:4: error: expected ')' before '}' token
   30 |   }
      |    ^
      |    )
   31 | }
      | ~   
a.cc:26:5: note: to match this '('
   26 |   if(check(S{
      |     ^
a.cc:31:1: error: expected primary-expression before '}' token
   31 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
	char s[10010];
	scanf("%s",&s);
	bool flag = true;
	int cc = 0;
	for(int i = 0;i < strlen(s);i++){
		if(s[i] == 'C')cc++;
		if(s[i] != 'A' && s[i] != 'C' && isupper(s[i]))flag = false;
	}
	if(cc != 1)flag = false;
	if(c[0] != 'A' || c[2] != 'C')flag = false;
	if(flag)printf("AC\n");
	else printf("WA\n");
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:12: error: 'c' was not declared in this scope; did you mean 'cc'?
   13 |         if(c[0] != 'A' || c[2] != 'C')flag = false;
      |            ^
      |            cc
Language: C++

#include<iostream>
#include<string>
using namespace std;
void WA(){cout << "WA" << endl;}
void AC(){cout << "AC" << endl;}

int main(){
  string s;
  cin >> s;
  
  if(s[0] != 'A'){
    WA();
    return 0;
  }
  int c = 1000;
  for(int i=2;i<s.length();i++){
    if(s[i] == 'C'){
      c=i;
      break;
    }
  }
  if (c = 1000){
    WA();
    return 0;
  }
  for(i=1;i<s.length();i++){
    if(i!=c && (s[i] < 'a' || s[i] > 'z')){
      WA();
      return 0;
    }
  }
  AC();
}

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

include<iostream>
using namespace std;

int main(){

        string S;
        cin >> S;

        int L=S.size(); // length of the series of words

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

        int C=0; // counter for "C"

        int i;

        for(i=1;i<L;i++){
                if(isupper(S[i])){              // judge of capital letters
                        if(i==1 || i==L-1 || S[i]!='C'){
                        cout << "WA";
                        return 0;
                        }
                C++;
                }
        }

        if(C!=1){
        cout << "WA";
        return 0;
        }

        cout << "AC";

        return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:6:9: error: 'string' was not declared in this scope
    6 |         string S;
      |         ^~~~~~
a.cc:7:9: error: 'cin' was not declared in this scope
    7 |         cin >> S;
      |         ^~~
a.cc:7:16: error: 'S' was not declared in this scope
    7 |         cin >> S;
      |                ^
a.cc:12:17: error: 'cout' was not declared in this scope
   12 |                 cout << "WA";
      |                 ^~~~
a.cc:21:20: error: 'isupper' was not declared in this scope
   21 |                 if(isupper(S[i])){              // judge of capital letters
      |                    ^~~~~~~
a.cc:23:25: error: 'cout' was not declared in this scope
   23 |                         cout << "WA";
      |                         ^~~~
a.cc:31:9: error: 'cout' was not declared in this scope
   31 |         cout << "WA";
      |         ^~~~
a.cc:35:9: error: 'cout' was not declared in this scope
   35 |         cout << "AC";
      |         ^~~~
Language: Java

public class Main {
	public static void main(String[] arg) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		System.out.print(aCheck(s)&&cCheck(s)&&sCheck(s)?"AC":"WA");
	}
	private static boolean aCheck(String str){
		return str.matches("^A.*");
	}
	
	private static boolean cCheck(String str){
		return str.matches("^.{2}.*C.*.{1}$");
	}
	
	private static boolean sCheck(String str){
		return str.matches("^.[a-z]*C[a-z]*$");
	}
}

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: Java

public class Main {
	public static void main(String[] arg) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		System.out.print(aCheck(s)&&cCheck(s)&&sCheck(s)?"AC":"WA");
	}
	private static boolean aCheck(String str){
		return str.matches("^A.*");
	}
	
	private static boolean cCheck(String str){
		return str.matches("^.{3}.*C.*.{2}$");
	}
	
	private static boolean sCheck(String str){
		return str.matches("^.[a-z]*C[a-z]*$");
	}
}

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: Java

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
        String S = sc.next();

        if(S.matches("^A[a-z]+[C]{1}+[a-z]+$")) {
        	System.out.println("AC");
        }else {
        	System.out.println("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: Java

public class AcCeptedMain {

	public static void main(String S) {
		// TODO Auto-generated method stub
		return (aCheck(S)&&cCheck(S)&&sCheck(S))?"AC":"WA";				
	}
	private static boolean aCheck(String str){
		return str.matches("^A.*");
	}
	
	private static boolean cCheck(String str){
		return str.matches("^.{3}.*C.*.{2}$");
	}
	
	private static boolean sCheck(String str){
		return str.matches("^.[a-z]*C[a-z]*$");
	}

}

Compiler output:
Main.java:1: error: class AcCeptedMain is public, should be declared in a file named AcCeptedMain.java
public class AcCeptedMain {
       ^
Main.java:5: error: incompatible types: unexpected return value
		return (aCheck(S)&&cCheck(S)&&sCheck(S))?"AC":"WA";				
		                                        ^
2 errors
Language: Java

	public static String solution(String S){
		return (aCheck(S)&&cCheck(S)&&sCheck(S))?"AC":"WA";				
	}
	
	private static boolean aCheck(String str){
		return str.matches("^A.*");
	}
	
	private static boolean cCheck(String str){
		return str.matches("^.{3}.*C.*.{2}$");
	}
	
	private static boolean sCheck(String str){
		return str.matches("^.[a-z]*C[a-z]*$");
	}

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
	public static String solution(String S){
	              ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: C++

#include <bits/stdc++.h>
#define int long long
using namespace std;
signed main(){
	string s;
	cin>>s;
	if(s[0]!='A'){
		cout<<"WA"<<endl;
		return 0;
	}
	if(s[1]>='A'&&s[1]<='Z'){
		cout<<"WA"<<endl;
		return 0;
	}
	int d=0;
	for(int i=1;i<=s.size();i++){
		if(i>=2&&i<s.sise()-1){
            if(s[i]=='C'){
				d++;
			}
        }
		else if(s[i]>='A'&&s[i]<='Z'){
			cout<<"WA"<<endl;
		    return 0;
		}
    }
    if(d!=1)cout<<"WA"<<endl;
    else cout<<"AC"<<endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:30: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'sise'; did you mean 'size'?
   17 |                 if(i>=2&&i<s.sise()-1){
      |                              ^~~~
      |                              size
Language: C++

#include <bits/stdc++.h>
#define int long long
using namespace std;
signed main(){
	string s;
	cin>>S;
	if(s[0]!='A'){
		cout<<"WA"<<endl;
		return 0;
	}
	if(s[1]>='A'&&s[1]<='Z'){
		cout<<"WA"<<endl;
		return 0;
	}
	int d=0;
	for(int i=1;i<=s.size();i++){
		if(i>=2&&i<s.sise()-1){
            if(s[i]=='C'){
				d++;
			}
        }
		else if(s[i]>='A'&&s[i]<='Z'){
			cout<<"WA"<<endl;
		    return 0;
		}
    }
    if(d!=1)cout<<"WA"<<endl;
    else cout<<"AC"<<endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:14: error: 'S' was not declared in this scope
    6 |         cin>>S;
      |              ^
a.cc:17:30: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'sise'; did you mean 'size'?
   17 |                 if(i>=2&&i<s.sise()-1){
      |                              ^~~~
      |                              size
Language: C++

#include <bits/stdc++.h>
#define int long long
using namespace std;
signed main(){
	string s;
	cin>>s;
	if(s[0]!='A'){
		cout<<"WA"<<endl;
		return 0;
	}
	if(s[1]>='A'&&s[1]<='Z'){
		cout<<"WA"<<endl;
		return 0;
	}
	int c=0;
	for(int i=1;i<=s.size();i++){
		if(i>=2&&i<s.sise()-1){
            if(s[i]=='C';)
        }
		else if(s[i]>='A'&&s[i]<='Z'){
			cout<<"WA"<<endl;
		    return 0;
		}
    }
    if(C!=1)cout<<"WA"<<endl;
    else cout<<"AC"<<endl;

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:30: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'sise'; did you mean 'size'?
   17 |                 if(i>=2&&i<s.sise()-1){
      |                              ^~~~
      |                              size
a.cc:18:26: error: expected primary-expression before ')' token
   18 |             if(s[i]=='C';)
      |                          ^
a.cc:19:9: error: expected primary-expression before '}' token
   19 |         }
      |         ^
a.cc:25:8: error: 'C' was not declared in this scope
   25 |     if(C!=1)cout<<"WA"<<endl;
      |        ^
Language: C++

#include <bits/stdc++.h>
#define int long long
using namespace std;
signed main(){
	string s;
	cin>>S;
	if(s[0]!='A'){
		cout<<"WA"<<endl;
		return 0;
	}
	if(s[1]>='A'&&s[1]<='Z'){
		cout<<"WA"<<endl;
		return 0;
	}
	int c=0;
	for(int i=1;i<=s.size();i++){
		if(i>=2&&i<s.sise()-1){
            if(s[i]=='C';)
        }
		else if(s[i]>='A'&&s[i]<='Z'){
			cout<<"WA"<<endl;
		    return 0;
		}
    }
    if(C!=1)cout<<"WA"<<endl;
    else cout<<"AC"<<endl;

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:14: error: 'S' was not declared in this scope
    6 |         cin>>S;
      |              ^
a.cc:17:30: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'sise'; did you mean 'size'?
   17 |                 if(i>=2&&i<s.sise()-1){
      |                              ^~~~
      |                              size
a.cc:18:26: error: expected primary-expression before ')' token
   18 |             if(s[i]=='C';)
      |                          ^
a.cc:19:9: error: expected primary-expression before '}' token
   19 |         }
      |         ^
a.cc:25:8: error: 'C' was not declared in this scope
   25 |     if(C!=1)cout<<"WA"<<endl;
      |        ^
Language: C++

include <bits/stdc++.h>
#define int long long
using namespace std;
signed main(){
	string s;
	cin>>S;
	if(s[0]!='A'){
		cout<<"WA"<<endl;
		return 0;
	}
	if(s[1]>='A'&&s[1]<='Z'){
		cout<<"WA"<<endl;
		return 0;
	}
	int c=0;
	for(int i=1;i<=s.size();i++){
		if(i>=2&&i<s.sise()-1){
            if(s[i]=='C';)
        }
		else if(s[i]>='A'&&s[i]<='Z'){
			cout<<"WA"<<endl;
		    return 0;
		}
    }
    if(C!=1)cout<<"WA"<<endl;
    else cout<<"AC"<<endl;

	return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:5:9: error: 'string' was not declared in this scope
    5 |         string s;
      |         ^~~~~~
a.cc:6:9: error: 'cin' was not declared in this scope
    6 |         cin>>S;
      |         ^~~
a.cc:6:14: error: 'S' was not declared in this scope
    6 |         cin>>S;
      |              ^
a.cc:7:12: error: 's' was not declared in this scope
    7 |         if(s[0]!='A'){
      |            ^
a.cc:8:17: error: 'cout' was not declared in this scope
    8 |                 cout<<"WA"<<endl;
      |                 ^~~~
a.cc:8:29: error: 'endl' was not declared in this scope
    8 |                 cout<<"WA"<<endl;
      |                             ^~~~
a.cc:11:12: error: 's' was not declared in this scope
   11 |         if(s[1]>='A'&&s[1]<='Z'){
      |            ^
a.cc:12:17: error: 'cout' was not declared in this scope
   12 |                 cout<<"WA"<<endl;
      |                 ^~~~
a.cc:12:29: error: 'endl' was not declared in this scope
   12 |                 cout<<"WA"<<endl;
      |                             ^~~~
a.cc:16:24: error: 's' was not declared in this scope
   16 |         for(int i=1;i<=s.size();i++){
      |                        ^
a.cc:18:26: error: expected primary-expression before ')' token
   18 |             if(s[i]=='C';)
      |                          ^
a.cc:19:9: error: expected primary-expression before '}' token
   19 |         }
      |         ^
a.cc:21:25: error: 'cout' was not declared in this scope
   21 |                         cout<<"WA"<<endl;
      |                         ^~~~
a.cc:21:37: error: 'endl' was not declared in this scope
   21 |                         cout<<"WA"<<endl;
      |                                     ^~~~
a.cc:25:8: error: 'C' was not declared in this scope
   25 |     if(C!=1)cout<<"WA"<<endl;
      |        ^
a.cc:25:13: error: 'cout' was not declared in this scope
   25 |     if(C!=1)cout<<"WA"<<endl;
      |             ^~~~
a.cc:25:25: error: 'endl' was not declared in this scope
   25 |     if(C!=1)cout<<"WA"<<endl;
      |                         ^~~~
a.cc:26:10: error: 'cout' was not declared in this scope
   26 |     else cout<<"AC"<<endl;
      |          ^~~~
a.cc:26:22: error: 'endl' was not declared in this scope
   26 |     else cout<<"AC"<<endl;
      |                      ^~~~
Language: C++

#include <bits/stdc++.h>
#define int long long
using namespace std;
signed main(){
	string s;
	cin>>S;
	if(s[0]!='A'){
		cout<<"WA"<<endl;
		return 0;
	}
	if(s[1]>='A'&&s[1]<='Z'){
		cout<<"WA"<<endl;
		return 0;
	}
	int c=0;
	for(int i=2;i<=s.size()-2;i++){
		if(s[i]=='C')c++;
		else if(s[i]>='A'&&s[i]<='Z'){
			cout<<"WA"<<endl;
		    return 0;
		}
		
			

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:14: error: 'S' was not declared in this scope
    6 |         cin>>S;
      |              ^
a.cc:26:2: error: expected '}' at end of input
   26 | }
      |  ^
a.cc:4:14: note: to match this '{'
    4 | signed main(){
      |              ^
Language: Java

package atcoder;

import java.util.Scanner;

public class ABC104B_AcCepted {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		int c = 0;
		boolean flag = true;
		if (s.charAt(0) != 'A') {
			flag = false;
		}
		for(int i = 2; i < s.length() - 2; i++) {
			if(s.charAt(i) == 'C') {
				c++;
			}
			else if (Character.isUpperCase(s.charAt(i))) {
				flag = false;
				break;
			}
		}
		if (Character.isUpperCase(s.charAt(s.length() - 1))) {
			flag = false;
		}
		if (Character.isUpperCase(s.charAt(s.length() - 2))) {
			flag = false;
		}

		if (flag && c == 1) {
			System.out.println("AC");
		}else {
			System.out.println("WA");
		}

	}

}


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

#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
int main(){
	string str;
	int key=1,cou=0,m;
	cin>>str;
	if (str[0]=='A'&&str[2]=='C') key=0;
	for (int i=2;i<str.size()-2;i++){
		if (str[i]=='C') cou++;
		if (str[i]>='a'&&str[i]<='z') m++;
		else key=0;
	}
	if (key==1&&cou!1) cout<<"AC"<<endl;
	else cout<<"WA"<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:24: error: expected ')' before '!' token
   15 |         if (key==1&&cou!1) cout<<"AC"<<endl;
      |            ~           ^
      |                        )
Language: C++

/*
ID: jerrywcy
TASK: AtCoder ABC 104 Problem B
LINK: https://abc104.contest.atcoder.jp/tasks/abc104_b
LANG: C++
*/
#include <bits/stdc++.h>

using namespace std;

string s;

bool up(char ch){
	return ('A'<=ch && ch<='Z')
}

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

	return 0;
}



Compiler output:
a.cc: In function 'bool up(char)':
a.cc:14:36: error: expected ';' before '}' token
   14 |         return ('A'<=ch && ch<='Z')
      |                                    ^
      |                                    ;
   15 | }
      | ~
Language: C++

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

#define Max(a,b) max({a,b})
#define Min(a,b) min({a,b})
#define rep(i,n) for(long long int (i)=0;(i)<(int)(n);(i)++)
#define len(n) n.size()
#define print(n) cout << n << endl;

// s.substr(i,n)

using namespace std;

//char a = 65;

int n,m,a,b,c,cou,co;
double d,k;
char num = 65;
string s,t;


int main(){
    
    cin >> s;
    n = len(s);

    string ans = "AC";

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

    cou = 0;

    rep(i,n){
        if(isupper(s[i])){
            if(i == 1 || i = n-1 || s[i] != 'C'){
                ans = "WA";
            }
            cou++;
        }
    }
    if(cou != 1){
        ans = "WA";
    }

    print(ans)
    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:39:23: error: lvalue required as left operand of assignment
   39 |             if(i == 1 || i = n-1 || s[i] != 'C'){
      |                ~~~~~~~^~~~
Language: C++

#include <bits/stdc++.h>
#define REP(i,n) for(int i=0;i<(n);i++)
const int MOD=(int)1e9+7;
using namespace std;
int main(){
    string s;
    cin>>s;
    string ans="AC";
    int a = string.size();
    int cnt=0;
    if(s[0]!='A') cout<<"WA"<<endl;
    REP(i,a){
        if(isupper(s[i])){
            if(i==1||i==a-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:9:19: error: expected primary-expression before '.' token
    9 |     int a = string.size();
      |                   ^
Language: C++

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

using ll = long long;

#define for_(i, a, b) for(int i = (a);i < (b);++i)
#define rfor_(i, a, b) for(int i = (b)-1;i >= (a);--i)
#define rep(i, n) for_(i, 0, n)
#define rrep(i, n) rfor_(i, 0, n)

string S;
int L;
bool c = true;

int main() {
  cin.tie(0);cout.tie(0);
  ios_base::sync_with_stdio(false);
  
  cin>>S;
  
  L = S.length();
  
  c &= (S[0]=='A');
  
  int t = 0;
  for(i, 2, L-2)if(S[i]=='C')t++;
  c &= (t==1);
  
  t = 0;
  rep(i, N)if('a' <= S[i] && S[i] <= 'z')t++;
  
  c &= (t==L-2);
  
  cout<<(c?"AC":"WA")<<endl;
  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:7: error: 'i' was not declared in this scope
   27 |   for(i, 2, L-2)if(S[i]=='C')t++;
      |       ^
a.cc:30:8: error: expected ')' before ';' token
   30 |   t = 0;
      |        ^
      |        )
a.cc:27:6: note: to match this '('
   27 |   for(i, 2, L-2)if(S[i]=='C')t++;
      |      ^
a.cc:31:10: error: 'N' was not declared in this scope
   31 |   rep(i, N)if('a' <= S[i] && S[i] <= 'z')t++;
      |          ^
a.cc:7:44: note: in definition of macro 'for_'
    7 | #define for_(i, a, b) for(int i = (a);i < (b);++i)
      |                                            ^
a.cc:31:3: note: in expansion of macro 'rep'
   31 |   rep(i, N)if('a' <= S[i] && S[i] <= 'z')t++;
      |   ^~~
Language: C++

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

using ll = long long;

#define for_(i, a, b) for(int i = (a);i < (b);++i)
#define rfor_(i, a, b) for(int i = (b)-1;i >= (a);--i)
#define rep(i, n) for_(i, 0, n)
#define rrep(i, n) rfor_(i, 0, n)

string S;

int l;

bool c = true;

int main() {
  cin.tie(0);cout.tie(0);
  ios_base::sync_with_stdio(false);
  
  cin>>S;
  
  l = S.length();
  
  c &= (S[0]=='A');
  
  int t = 0;
  for(i, 2, L-2) if(S[i]=='C') t++;
  c &= (t==1);
  
  t = 0;
  rep(i, N) if('a' <= S[i] && S[i] <= 'z')t++;
  
  c &= (t==L-2);
  
  cout<<(c?"AC":"WA")<<endl;
  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:29:7: error: 'i' was not declared in this scope
   29 |   for(i, 2, L-2) if(S[i]=='C') t++;
      |       ^
a.cc:29:13: error: 'L' was not declared in this scope
   29 |   for(i, 2, L-2) if(S[i]=='C') t++;
      |             ^
a.cc:32:8: error: expected ')' before ';' token
   32 |   t = 0;
      |        ^
      |        )
a.cc:29:6: note: to match this '('
   29 |   for(i, 2, L-2) if(S[i]=='C') t++;
      |      ^
a.cc:33:10: error: 'N' was not declared in this scope
   33 |   rep(i, N) if('a' <= S[i] && S[i] <= 'z')t++;
      |          ^
a.cc:7:44: note: in definition of macro 'for_'
    7 | #define for_(i, a, b) for(int i = (a);i < (b);++i)
      |                                            ^
a.cc:33:3: note: in expansion of macro 'rep'
   33 |   rep(i, N) if('a' <= S[i] && S[i] <= 'z')t++;
      |   ^~~
a.cc:35:12: error: 'L' was not declared in this scope
   35 |   c &= (t==L-2);
      |            ^
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=0;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;
    }


Compiler output:
a.cc: In function 'int main()':
a.cc:20:10: error: expected primary-expression before '!=' token
   20 |   if(cnt(!=1){
      |          ^~
a.cc:20:13: error: 'cnt' cannot be used as a function
   20 |   if(cnt(!=1){
      |             ^
a.cc:23:24: error: expected ')' before ';' token
   23 |     cout << ans << endl;
      |                        ^
      |                        )
a.cc:20:5: note: to match this '('
   20 |   if(cnt(!=1){
      |     ^
Language: C++

#include <iostream>
#include <stack>

using namespace std;

char S[100];

int main(int argc, char** argv) {
    cin >> S;
    bool c1 = S[0] == 'A';

    int count = 0;
    for (int i = 2; i < strlen(S) - 1; i++) if (S[i] == 'C') count++;
    bool c2 = count == 1;

    count = 0;
    for (int i = 0; i < strlen(S); i++) if (S[i] <= 'Z') count++;
    bool c3 = count <= 2;

    //cout << c1 << endl;
    //cout << c2 << endl;
    //cout << c3 << endl;
    if (c1 && c2 && c3)
        cout << "AC" << endl;
    else
        cout << "WA" << endl;
}


Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:13:25: error: 'strlen' was not declared in this scope
   13 |     for (int i = 2; i < strlen(S) - 1; i++) if (S[i] == 'C') count++;
      |                         ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include <stack>
  +++ |+#include <cstring>
    3 | 
a.cc:17:25: error: 'strlen' was not declared in this scope
   17 |     for (int i = 0; i < strlen(S); i++) if (S[i] <= 'Z') count++;
      |                         ^~~~~~
a.cc:17:25: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C++

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

int main(int argc, char const *argv[])
{
	string s; cin >> s;
	bool f = true;
	if (s[0] != 'A') f = false;
	int cnt = 0;
	for (int i = 2; i < s.size() - 1; ++i) {
		if (s[i] == 'C') cnt++;
	}
	if (cnt != 1) f = false;

	rep(i, s.size()) {
		if (s[i] == 'A' || s[i] == 'C') contin
		if (!('a' <= s[i] && s[i] <= 'z')) f = false;
	}

	printf("%s\n", f ? "AC" : "WA");
	return 0;
}

Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:18:49: error: 'contin' was not declared in this scope
   18 |                 if (s[i] == 'A' || s[i] == 'C') contin
      |                                                 ^~~~~~
Language: C++

#include <iostream>
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cctype>
#include <cmath>
#include <climits>
#include <cstring>
#include <string>
#include <map>
#include <set>
#include <vector>
#include <queue>


using namespace std;
#define INF 0x3f3f3f3f3f
#define ll long long
#define pr(x) (cerr << #x << ' ' << x << ' ')
#define prln(x) (cerr << #x << ' ' << x << endl)


int main()
{
    #ifdef LOCAL
        freopen("in.txt", "r", stdin);
    #endif // LOCAL
    string s;
    cin >> s;
    int c = 0;
    if (s[0] != 'A' || s[1] == 'C' || s[s.size() - 1] == 'C') {
        puts("WA");
        return 0;
    }
    int len = s.size();
    for (int i = 0; i < len; ++i) {
        if (isupper(s[i]) && (s[i] != 'A' || s[i] != 'C')) {
            puts("WA");
            return 0;
        }else if (i >= 3 && i <= len - 2 && s[i] == 'C') {
            ++c;
            if (c > 1) {
                puts("WA");
                return 0;
            }
        }
    }
    if (cnt == 0) {
        puts("WA");
        return 0;
    }
    puts("AC");
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:48:9: error: 'cnt' was not declared in this scope; did you mean 'int'?
   48 |     if (cnt == 0) {
      |         ^~~
      |         int
Language: C++

#include <iostream>
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cctype>
#include <cmath>
#include <climits>
#include <cstring>
#include <string>
#include <map>
#include <set>
#include <vector>
#include <queue>


using namespace std;
#define INF 0x3f3f3f3f3f
#define ll long long
#define pr(x) (cerr << #x << ' ' << x << ' ')
#define prln(x) (cerr << #x << ' ' << x << endl)


int main()
{
    #ifdef LOCAL
        freopen("in.txt", "r", stdin);
    #endif // LOCAL
    string s;
    cin >> s;
    int c = 0;
    if (s[0] != 'A' || s[1] !== 'C' || s[s.size() - 1] == 'C') {
        puts("WA");
        return 0;
    }
    int len = s.size();
    for (int i = 0; i < len; ++i) {
        if (isupper(s[i]) && (s[i] != 'A' || s[i] != 'C')) {
            puts("WA");
            return 0;
        }else if (i >= 3 && i <= len - 2 && s[i] == 'C') {
            ++c;
            if (c > 1) {
                puts("WA");
                return 0;
            }
        }
    }
    puts("AC");
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:31:31: error: expected primary-expression before '=' token
   31 |     if (s[0] != 'A' || s[1] !== 'C' || s[s.size() - 1] == 'C') {
      |                               ^
Language: C++

/A[a-z]\+C[a-z]\+$/cAC
cWA

Compiler output:
a.cc:1:8: error: stray '\' in program
    1 | /A[a-z]\+C[a-z]\+$/cAC
      |        ^
a.cc:1:16: error: stray '\' in program
    1 | /A[a-z]\+C[a-z]\+$/cAC
      |                ^
a.cc:1:1: error: expected unqualified-id before '/' token
    1 | /A[a-z]\+C[a-z]\+$/cAC
      | ^
Language: C++

#include<bits/stdc++.h>
#define rep(i, n) for(int i = 0;i < (int)n;i++)
#define repb(i, n) for(int i = (int)n;i >= 0;i--)
#define reps(i, m, n) for(int i = (int)m;i < (int)n;i++)
#define repsb(i, m, n) for(int i = (int)m;i >= (int)n;i--)
#define SORT(v, n) sort(v, v+n);
#define VSORT(v) sort(v.begin(), v.end());
#define pb(a) push_back(a)
#define INF 999999999999999999
using namespace std;
int dy[]={0, 0, 1, -1, 0};
int dx[]={1, -1, 0, 0, 0};
using namespace std;
int main(int argc, char const *argv[]) {
    string s;
    bool flg,c=false;
    int temp=0;
    cin>>s;
    reps(i,2,s.size()-1){
      if(s[i]=='C'&&s[0]=='A'){
        if(c==true){
          flg=false;
          break;a        }
        flg=c=true;
        temp=i;
      }
    }
    rep(i,s.size()){
      if((i!=temp&&i!=0)&&s[i]-'A'<=0) {
        flg=false;
        cout<<"in"<<endl<<(int)s[i]<<endl;
      }
    }
    if(flg) cout<<"AC"<<endl;
    else    cout<<"WA"<<endl;

    return 0;
}


Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:23:17: error: 'a' was not declared in this scope
   23 |           break;a        }
      |                 ^
Language: C

#include <iostream>
using namespace std;

int main()
{
    char s[11];
    int i,n,flag[3]={};

    cin >> s;

    for(n=0 ; s[n]!='\0' ; n++);

    if(s[0] == 'A')
        flag[0]=1;
    for(i=2 ; i<n-1 ; i++){
        if(s[i] == 'C')
            flag[1]++;
    }
    for(i=1 ; i<n ; i++){
        if((s[i] >= 'a')&&(s[i] <= 'z')){
            flag[2]++;
        } 
    }
    
    if(flag[0]==1 && flag[1]==1 && flag[2]==n-2)
        cout << "AC" << endl;
    else
        cout << "WA" << endl;

    return 0;
}

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