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

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

int main()
{
  char S[10];
  int i;
  cin>>S;
  if(S[0]!="A")
  {
    cout<<"WA"<<endl;
  }
  else
  {
     for(i=3;i<10;i++)
     {
      if(S.at(i)!="C")
      {
        cout<<"WA"<<endl;
      }
       else
       {
         if(S[]>="a")&&(S[]<="z")
         {
             cout<<"AC"<<endl;
         }
         else
         {
           cout<<"WA"<<endl;
         }
       }
     }
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |   if(S[0]!="A")
      |      ~~~~^~~~~
a.cc:17:12: error: request for member 'at' in 'S', which is of non-class type 'char [10]'
   17 |       if(S.at(i)!="C")
      |            ^~
a.cc:23:15: error: expected primary-expression before ']' token
   23 |          if(S[]>="a")&&(S[]<="z")
      |               ^
a.cc:23:24: error: expected identifier before '(' token
   23 |          if(S[]>="a")&&(S[]<="z")
      |                        ^
Language: C++

#include<iostream>
#include<string>

int main()
{
	std::string S;
	std::cin >> S;
	if (S[0] != 'A')
	{
		std::cout << "WA" << std::endl;
		return 0;
	}
	if (S[1] == 'C' || S[S.size()-1] =='C') {
		std::cout << "WA" << std::endl;
		return 0;
	}
	for (auto itr = S.begin(); itr != S.end(); ++itr)
	{
		static int i;
		if (*itr == 'C')
			i++;
		if (i >= 2) {
			std::cout << "WA" << std::endl;
			return 0;
}
                if(*itr == 'A' && itr !=S.begin()){
std::cout << "WA" << std::endl;
			return 0;
		}
		if (*itr == 'B') {
			std::cout << "WA" << std::endl;
			return 0;
		}
		if (*itr == 'D') {
			std::cout << "WA" << std::endl;
			return 0;
		}
		if (*itr == 'E') {
			std::cout << "WA" << std::endl;
			return 0;
		}
		if (*itr == 'F') {
			std::cout << "WA" << std::endl;
			return 0;
		}if (*itr == 'G') {
			std::cout << "WA" << std::endl;
			return 0;
		}if (*itr == 'H') {
			std::cout << "WA" << std::endl;
			return 0;
		}if (*itr == 'I') {
			std::cout << "WA" << std::endl;
			return 0;
		}if (*itr == 'J') {
			std::cout << "WA" << std::endl;
			return 0;
		}if (*itr == 'K') {
			std::cout << "WA" << std::endl;
			return 0;
		}if (*itr == 'L') {
			std::cout << "WA" << std::endl;
			return 0;
		}if (*itr == 'M') {
			std::cout << "WA" << std::endl;
			return 0;
		}if (*itr == 'N') {
			std::cout << "WA" << std::endl;
			return 0;
		}if (*itr == 'O') {
			std::cout << "WA" << std::endl;
			return 0;
		}if (*itr == 'P') {
			std::cout << "WA" << std::endl;
			return 0;
		}if (*itr == 'Q') {
			std::cout << "WA" << std::endl;
			return 0;
		}if (*itr == 'R') {
			std::cout << "WA" << std::endl;
			return 0;
		}if (*itr == 'S') {
			std::cout << "WA" << std::endl;
			return 0;
		}if (*itr == 'T') {
			std::cout << "WA" << std::endl;
			return 0;
		}if (*itr == 'U') {
			std::cout << "WA" << std::endl;
			return 0;
		}if (*itr == 'V') {
			std::cout << "WA" << std::endl;
			return 0;
		}if (*itr == 'W') {
			std::cout << "WA" << std::endl;
			return 0;
		}if (*itr == 'X') {
			std::cout << "WA" << std::endl;
			return 0;
		}if (*itr == 'Y') {
			std::cout << "WA" << std::endl;
			return 0;
		}if (*itr == 'Z') {
			std::cout << "WA" << std::endl;
			return 0;
		}
	}
       if(i==0){
std::cout<<"WA"<<std::endl;
return 0;
}
	std::cout << "AC" << std::endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:107:11: error: 'i' was not declared in this scope
  107 |        if(i==0){
      |           ^
Language: C++

#include <stdio.h>
#include <iostream>
#include <string>
using namespace std;
int main(){
	int cnt=0;
	string a;
	getline(cin,a);
	for(int i=0;i<strlen(a);i++){
		if(a[i]=='C'){
			cnt++;
		}
	}
	if(cnt!=1){
		cout<<"WA";
		return 0;
	}
	
	if(a[0]=='A'&&a[2]=='C'){
		for(int i=0;i<strlen(a);i++){
			if(i==0||i==2){
				continue;
			}else{
				if(a[i]<'a'){
					cout<<"WA";
					return 0;
				}
			}
		}
		cout<<"AC";
	}else{
		cout<<"WA";
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:23: error: 'strlen' was not declared in this scope
    9 |         for(int i=0;i<strlen(a);i++){
      |                       ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include <iostream>
  +++ |+#include <cstring>
    3 | #include <string>
a.cc:20:31: error: 'strlen' was not declared in this scope
   20 |                 for(int i=0;i<strlen(a);i++){
      |                               ^~~~~~
a.cc:20:31: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C

#include<stdio.h>
#include<ctype.h>
int main(void) {
	char S[11];
	scanf("%s", &S, 10);

	int size = 0;
	for (int i = 0; S[i] != NULL; i++) {
		size++;
	}

	bool judge = true;

	if (S[0] != 'A') {
		judge = false;
	}

	for (int i = 2; i < size - 1&&judge==true; i++) {
		if (S[i] == 'C') {
			for (int j = i + 1; j < size - 1; j++) {
				if (S[j] == 'C') {
					judge = false;
				}
			}
		}
	}

	for (int i = 0; i < size&&judge==true; i++) {
		if (S[i] != 'A' && S[i] != 'C') {
			if (isupper(S[i]) != 0) {
				judge = false;
			}
		}
	}

	if (judge == true) {
		printf("AC");
	}
	else {
		printf("WA");
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:30: warning: comparison between pointer and integer
    8 |         for (int i = 0; S[i] != NULL; i++) {
      |                              ^~
main.c:12:9: error: unknown type name 'bool'
   12 |         bool judge = true;
      |         ^~~~
main.c:3:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    2 | #include<ctype.h>
  +++ |+#include <stdbool.h>
    3 | int main(void) {
main.c:12:22: error: 'true' undeclared (first use in this function)
   12 |         bool judge = true;
      |                      ^~~~
main.c:12:22: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:12:22: note: each undeclared identifier is reported only once for each function it appears in
main.c:15:25: error: 'false' undeclared (first use in this function)
   15 |                 judge = false;
      |                         ^~~~~
main.c:15:25: note: 'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  string S;
  cin >> S;
  int count;
  count = 0;
  int checker;
  checker = 0;
  int checka;
  checka = 0;
  if (S.at(0) == 'A') {
    checka++;
  }
  for (int i = 2; i < N-1; i++) {
    if( S.at(i) == 'C') {
      count++;
    }
    if( isupper(S.at(i))) {
      checker++;
    }
  }
  if (checka == 1 && count == 1 && checker == 1) {
    cout << "AC" << endl;
  }
   else {
     cout << "WA" << endl;
   }
}
     

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

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		String s = sc.next();
		
		int nagasa = s.length();
		
		int WhereA = s.indexOf("A");
		int WhereC = s.indexOf("C");
		int LastC =s.lastIndexOf("C");
		int last = nagasa - 1;
		
		if (whereC =! LastC){
			System.out.println("WA");
			System.exit(0);
		}
		
		if (WhereC < 2){
			System.out.println("WA");
			System.exit(0);
		}
		
		if (WhereC == last){
			System.out.println("WA");
			System.exit(0);
		}
		int c_mae = WhereC - 1;
		int nimozime = 0;
		String mannaka = s.substring(1,c_mae);
		
		int c_ushiro = WhereC + 1;
		
		String ushiro = s.substring(c_ushiro,last);
		
		String naka_komozi = mannaka.toLowerCase();
		String ushiro_komozi = ushiro.toLowerCase();
		
		if (WhereA == 0 && WhereC > 1 && WhereC < nagasa && mannaka.equals(naka_komozi) && ushiro.equals(ushiro_komozi)) {
			System.out.println("AC");
		}else{
			System.out.println("WA");
		}
	
	
	}
}



Compiler output:
Main.java:15: error: cannot find symbol
		if (whereC =! LastC){
		    ^
  symbol:   variable whereC
  location: class Main
Main.java:15: error: bad operand type int for unary operator '!'
		if (whereC =! LastC){
		            ^
2 errors
Language: C++

#include <bits/stdc++.h>

#define rep2(x,fr,to) for(int (x)=(fr);(x)<(to);(x)++)
#define rep(x,to) for(int (x)=0;(x)<(to);(x)++)
#define repr(x,fr,to) for(int (x)=(fr);(x)>=(to);(x)--)
#define all(c) (c).begin(),(c).end()
#define sz(v) (int)(v).size()

using namespace std;
typedef long long ll; typedef vector<int> VI; typedef pair<int,int> pii;

const int mod = (int)1e9 + 7;
void dbg(){ cerr << "\n"; } template <typename T,typename ...T2>
void dbg(const T& fst, const T2&...rst){ cerr << fst << ": "; dbg(rst...); }
const int dr[]={0,1,0,-1,0};


int main()
{
	
	//cin.tie(0); ios_base::sync_with_stdio(false);
	string s;
	
	cin >> s;
	bool ok=1;
	if(s[0] !='A') ok=0;
	int ct=0, n=sz(s);
	rep(i, n) if(s[i]=='B'|| s[i]>'C') sw=0;
	
	rep(i, n) if(s[i]=='A') ct++;
	if(ct !=1) ok=0;
	ct=0;
	rep(i, n) if(s[i]=='C') ct++;
	if(ct !=1) ok=0;
	ct=0;
	rep2(i, 2, n-1) if(s[i]=='C') ct++;
	if(ct !=1) ok=0;
	if(n < 4) ok=0;
	//dbg(ct);
	puts(ok? "AC":"WA");
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:28:44: error: 'sw' was not declared in this scope; did you mean 's'?
   28 |         rep(i, n) if(s[i]=='B'|| s[i]>'C') sw=0;
      |                                            ^~
      |                                            s
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main()
{
	char c[11];
	int flag=0,flag1=0;
	scanf("%s",c);
	for(i=0;i<strlen(c);i++)
	{
		if(i==1&&c[i]=='C')
		{
			printf("WA");
			return 0;
		}
		if(c[i]=='C'&&flag1==1)
		{
			printf("WA");
			return 0;
		}
		if(i==0)
			if(c[i]!='A')
			{
				printf("WA");
				return 0;
			}
		if(c[i]=='C'&&i==strlen(c)-1)
		{
			printf("WA");
			return 0;
		}
		if(c[i]=='C')
		{
			flag1++;
		}
		if(c[i]!='C'&&(!c[i]>=97))
		{
			printf("WA");
			return 0;
		}
	}
	printf("AC");
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:13: error: 'i' was not declared in this scope
    8 |         for(i=0;i<strlen(c);i++)
      |             ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:18: error: 'i' was not declared in this scope
   10 |         if(!(str[i] >= 'a' && str[i] <= 'z')){
      |                  ^
Language: C++

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

int main() {

    int j = 0;
    int i <=8;
    string str;
    cin >> str;



for(int i=2;str[i];i++) {
if(str[i]=='C') {
j++;
}
}
cout << j << endl;
}

//数字が一つでも含まれる場合、エラー    
if(any_of(str.cbegin(), str.cend(), isdigit))
  {cout << "WA" <<endl;}

    // 前提条件: 4≤|str|≤10 （|str| は文字列 S の長さ）
    else if (str.size() >=4 && str.size() <= 10) {
      if(str.at(0) == 'A' && int j == 1)
        cout << "AC" << endl;
    }
    
 
    




Compiler output:
a.cc: In function 'int main()':
a.cc:11:11: error: expected initializer before '<=' token
   11 |     int i <=8;
      |           ^~
a.cc: At global scope:
a.cc:26:1: error: expected unqualified-id before 'if'
   26 | if(any_of(str.cbegin(), str.cend(), isdigit))
      | ^~
a.cc:30:5: error: expected unqualified-id before 'else'
   30 |     else if (str.size() >=4 && str.size() <= 10) {
      |     ^~~~
Language: C

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


int main(void){

    char s[10];
    int flg=0;
    int flg_c=0;

    scanf("%10s",s);

    int i,j;
    int length;

    i=0;
    length=strlen(s);

    //printf("length=%d\n",length);

    if(s[0]=='A'){
      for(i=2;i<=(length-2);i++){
        if(s[i]=='C'){
          flg++;
        }
      }
    //printf("flg==%d\n",flg);
    if(flg==1){
      for(j=0;j<length;j++){
       if(s[j]>=97&&s[j]<=122){
          flg_c++;
        }
      }
      //printf("flg_c==%d\n",flg_c);
      if(flg_c==(length-2)){
        printf("AC");
      }else{
        printf("WA");
      }
    }else{
      printf("WA");
    }
 }else{
  printf("WA");
  }

 return 0;
}

Compiler output:
main.c:1:2: error: invalid preprocessing directive #innclude; did you mean #include?
    1 | #innclude<stdio.h>
      |  ^~~~~~~~
      |  include
main.c: In function 'main':
main.c:11:5: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
   11 |     scanf("%10s",s);
      |     ^~~~~
main.c:3:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
    2 | #include<string.h>
  +++ |+#include <stdio.h>
    3 | 
main.c:11:5: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
   11 |     scanf("%10s",s);
      |     ^~~~~
main.c:11:5: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:36:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   36 |         printf("AC");
      |         ^~~~~~
main.c:36:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:36:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:36:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:38:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   38 |         printf("WA");
      |         ^~~~~~
main.c:38:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:41:7: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   41 |       printf("WA");
      |       ^~~~~~
main.c:41:7: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:44:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   44 |   printf("WA");
      |   ^~~~~~
main.c:44:3: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main()
{
	char c[11];
	int flag=0,flag1=0;
	scanf("%s",c);
	for(i=0;i<strlen(c);i++)
	{
		if(i==1&&c[i]=='C')
		{
			printf("WA");
			return 0;
		}
		if(c[i]=='C'&&flag1==1)
		{
			printf("WA");
			return 0;
		}
		if(i==0)
			if(c[i]!='A')
			{
				printf("WA");
				return 0;
			}
		if(c[i]=='C'&&i==strlen(c)-1)
		{
			printf("WA");
			return 0;
		}
		if(c[i]=='C')
		{
			flag1++;
		}
	}
	printf("AC");
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:13: error: 'i' was not declared in this scope
    8 |         for(i=0;i<strlen(c);i++)
      |             ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
	string S;
	cin>>S;
		{
		if(S[0]=='A'&&S[2]=='C')
		cout<<"AC";
		}
		{
		else
		cout<<"WA";
		}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:17: error: 'else' without a previous 'if'
   12 |                 else
      |                 ^~~~
Language: C++

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

bool sub() {
  string s;
  cin >> s;
  
  int cap = 0;
  int A = 0;
  int C = 0;
  for (char c : s) {
    if (c == 'A') ++A;
    if (c == 'C') ++C;
    if (c >= 'A' && c <= 'Z') ++cap;
  }
  if (cap != 2) return false;
  if (!a || !c) return false;
  if (s[0] != 'A') return false;
  if (s[1] == 'C') return false;
  if (s.back() == 'C') return false;
  return true;
}
int main() {
  cout << (sub() ? "AC" : "WA") << endl;
}

Compiler output:
a.cc: In function 'bool sub()':
a.cc:18:8: error: 'a' was not declared in this scope
   18 |   if (!a || !c) return false;
      |        ^
a.cc:18:14: error: 'c' was not declared in this scope
   18 |   if (!a || !c) return false;
      |              ^
Language: C++

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


int main()
{
	string s;
	int x=0,y=0;
	cin >> s;
	int y = s.size();
	if (s.substr(0, 1) != "A"||s.substr(1,1)=="C"||s.substr(y-1,1)=="C") {
		cout << "WA" << endl;
		return 0;
	}
	else {
		for (int i = 2; i < y - 1; i++) {
			if (s.substr(i, 1) == "C") {
				x++;

			}
			if (isupper(s.substr(i, 1)))y++;
		}
		if (x == 1&&y==0)cout << "AC" << endl;
		else cout << "WA" << endl;
	}
	
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:13: error: redeclaration of 'int y'
   11 |         int y = s.size();
      |             ^
a.cc:9:17: note: 'int y' previously declared here
    9 |         int x=0,y=0;
      |                 ^
a.cc:22:36: error: no matching function for call to 'isupper(std::__cxx11::basic_string<char>)'
   22 |                         if (isupper(s.substr(i, 1)))y++;
      |                             ~~~~~~~^~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/bits/basic_ios.h:37,
                 from /usr/include/c++/14/ios:46,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/locale_facets.h:2631:5: note: candidate: 'template<class _CharT> bool std::isupper(_CharT, const locale&)'
 2631 |     isupper(_CharT __c, const locale& __loc)
      |     ^~~~~~~
/usr/include/c++/14/bits/locale_facets.h:2631:5: note:   candidate expects 2 arguments, 1 provided
In file included from /usr/include/c++/14/cctype:42,
                 from /usr/include/c++/14/bits/localefwd.h:42,
                 from /usr/include/c++/14/ios:43:
/usr/include/ctype.h:117:1: note: candidate: 'int isupper(int)'
  117 | __exctype (isupper);
      | ^~~~~~~~~
/usr/include/ctype.h:117:1: note:   no known conversion for argument 1 from 'std::__cxx11::basic_string<char>' to 'int'
  117 | __exctype (isupper);
      | ^~~~~~~~~
Language: C++


#include <iostream>
using namespace std;

int main() {
	char* S ;
	cin >> S;
  	char* answer[3];
  int count = 0;
  	if(S[0]!='A'){
    	answer = 'WA';
    }
  	if(!(S[1]>=97&&S[1]<=122)){
    	answer ='WA';
    }
  
  	for(int i = 2;i!=8;i++){
        if(!(S[i]>=97&&S[i]<=122)){
    		answer ='WA';
    	}
      	if(S[i]=='C'){
        	count++;
        }
    }
  if(count!=1){
  	answer = 'WA';
  }
  	if(!(S[9]>=97&&S[9]<=122)){
    	answer ='WA';
    }
  
  	if(answer != 'WA'){
    	answer = 'AC';
    }
  	cout << answer;
}

Compiler output:
a.cc:11:18: warning: multi-character character constant [-Wmultichar]
   11 |         answer = 'WA';
      |                  ^~~~
a.cc:14:17: warning: multi-character character constant [-Wmultichar]
   14 |         answer ='WA';
      |                 ^~~~
a.cc:19:25: warning: multi-character character constant [-Wmultichar]
   19 |                 answer ='WA';
      |                         ^~~~
a.cc:26:18: warning: multi-character character constant [-Wmultichar]
   26 |         answer = 'WA';
      |                  ^~~~
a.cc:29:17: warning: multi-character character constant [-Wmultichar]
   29 |         answer ='WA';
      |                 ^~~~
a.cc:32:22: warning: multi-character character constant [-Wmultichar]
   32 |         if(answer != 'WA'){
      |                      ^~~~
a.cc:33:18: warning: multi-character character constant [-Wmultichar]
   33 |         answer = 'AC';
      |                  ^~~~
a.cc: In function 'int main()':
a.cc:11:16: error: incompatible types in assignment of 'int' to 'char* [3]'
   11 |         answer = 'WA';
      |         ~~~~~~~^~~~~~
a.cc:14:16: error: incompatible types in assignment of 'int' to 'char* [3]'
   14 |         answer ='WA';
      |         ~~~~~~~^~~~~
a.cc:19:24: error: incompatible types in assignment of 'int' to 'char* [3]'
   19 |                 answer ='WA';
      |                 ~~~~~~~^~~~~
a.cc:26:16: error: incompatible types in assignment of 'int' to 'char* [3]'
   26 |         answer = 'WA';
      |         ~~~~~~~^~~~~~
a.cc:29:16: error: incompatible types in assignment of 'int' to 'char* [3]'
   29 |         answer ='WA';
      |         ~~~~~~~^~~~~
a.cc:32:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   32 |         if(answer != 'WA'){
      |            ~~~~~~~^~~~~~~
a.cc:33:16: error: incompatible types in assignment of 'int' to 'char* [3]'
   33 |         answer = 'AC';
      |         ~~~~~~~^~~~~~
Language: C++


#include <iostream>
using namespace std;

int main() {
	char* S ;
	cin >> S;
  	char* answer[3];
  int count = 0;
  	if(S[0]!="A"){
    	answer = "WA";
    }
  	if(!(S[1]>=97&&S[1]<=122)){
    	answer ="WA";
    }
  
  	for(int i = 2;i!=8;i++){
        if(!(S[i]>=97&&S[i]<=122)){
    		answer ="WA";
    	}
      	if(S[i]=="C"){
        	count++;
        }
    }
  if(count!=1){
  	answer = "WA";
  }
  	if(!(S[9]>=97&&S[9]<=122)){
    	answer ="WA";
    }
  
  	if(answer != "WA"){
    	answer = "AC";
    }
  	cout << answer;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |         if(S[0]!="A"){
      |            ~~~~^~~~~
a.cc:11:16: error: incompatible types in assignment of 'const char [3]' to 'char* [3]'
   11 |         answer = "WA";
      |         ~~~~~~~^~~~~~
a.cc:14:16: error: incompatible types in assignment of 'const char [3]' to 'char* [3]'
   14 |         answer ="WA";
      |         ~~~~~~~^~~~~
a.cc:19:24: error: incompatible types in assignment of 'const char [3]' to 'char* [3]'
   19 |                 answer ="WA";
      |                 ~~~~~~~^~~~~
a.cc:21:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   21 |         if(S[i]=="C"){
      |            ~~~~^~~~~
a.cc:26:16: error: incompatible types in assignment of 'const char [3]' to 'char* [3]'
   26 |         answer = "WA";
      |         ~~~~~~~^~~~~~
a.cc:29:16: error: incompatible types in assignment of 'const char [3]' to 'char* [3]'
   29 |         answer ="WA";
      |         ~~~~~~~^~~~~
a.cc:32:19: error: comparison between distinct pointer types 'char**' and 'const char*' lacks a cast
   32 |         if(answer != "WA"){
      |            ~~~~~~~^~~~~~~
a.cc:33:16: error: incompatible types in assignment of 'const char [3]' to 'char* [3]'
   33 |         answer = "AC";
      |         ~~~~~~~^~~~~~
Language: C++

#include<iostream>
#include<cstring>
#include<string>
#include<algorithm>
#include<cstdio>
#include<cmath>
using namespace std;

int main()
{
	 ios::sync_with_stdio(false);
	 string str;
	 int flag;
	 int cnt;
	 while(cin>>str)
	 {
	 	 flag=0; cnt=0;
	 	 if(str.length()>=4 && str.length()<= 10)
	 	 {
		 	 	 if(str.at(0)=='A')
		 	 	 {
			 	 	 	for(i=0;i<str.length();i++)
	 	 	 	    {
			 	 	 		if(str.at(i)=='C')
			 	 	 		 flag==1;
			 	 	 		 if(str.at(i)>='a'&&str.at(i)<='z')
			 	 	 		  cnt++;
				    }
				    if(cnt+flag==str.length())
				      cout<<"AC\n";
				 }
					 else cout<<"WA\n";
			}
			else cout<<"WA\n";
	 	 
	 }
	 return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:53: error: 'i' was not declared in this scope
   22 |                                                 for(i=0;i<str.length();i++)
      |                                                     ^
Language: C++


#include <iostream>
using namespace std;

int main() {
	char* S ;
	cin >> S;
  	char* answer[2];
  int count = 0;
  	if(S[0]!="A"){
    	answer = "WA";
    }
  	if(!(S[1]>=97&&S[1]<=122)){
    	answer ="WA";
    }
  
  	for(int i = 2;i!=8;i++){
        if(!(S[i]>=97&&S[i]<=122)){
    		answer ="WA";
    	}
      	if(S[i]=="C"){
        	count++;
        }
    }
  if(count!=1){
  	answer = "WA";
  }
  	if(!(S[9]>=97&&S[9]<=122)){
    	answer ="WA";
    }
  
  	if(answer != "WA"){
    	answer = "AC";
    }
  	cout << answer;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |         if(S[0]!="A"){
      |            ~~~~^~~~~
a.cc:11:16: error: incompatible types in assignment of 'const char [3]' to 'char* [2]'
   11 |         answer = "WA";
      |         ~~~~~~~^~~~~~
a.cc:14:16: error: incompatible types in assignment of 'const char [3]' to 'char* [2]'
   14 |         answer ="WA";
      |         ~~~~~~~^~~~~
a.cc:19:24: error: incompatible types in assignment of 'const char [3]' to 'char* [2]'
   19 |                 answer ="WA";
      |                 ~~~~~~~^~~~~
a.cc:21:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   21 |         if(S[i]=="C"){
      |            ~~~~^~~~~
a.cc:26:16: error: incompatible types in assignment of 'const char [3]' to 'char* [2]'
   26 |         answer = "WA";
      |         ~~~~~~~^~~~~~
a.cc:29:16: error: incompatible types in assignment of 'const char [3]' to 'char* [2]'
   29 |         answer ="WA";
      |         ~~~~~~~^~~~~
a.cc:32:19: error: comparison between distinct pointer types 'char**' and 'const char*' lacks a cast
   32 |         if(answer != "WA"){
      |            ~~~~~~~^~~~~~~
a.cc:33:16: error: incompatible types in assignment of 'const char [3]' to 'char* [2]'
   33 |         answer = "AC";
      |         ~~~~~~~^~~~~~
Language: C++


#include <iostream>
using namespace std;

int main() {
	char* S ;
	cin >> S;
  	int answer;
  int count = 0;
  	if(S[0]!="A"){
    	answer = "WA";
    }
  	if(!(S[1]>=97&&S[1]<=122)){
    	answer ="WA";
    }
  
  	for(int i = 2;i!=8;i++){
        if(!(S[i]>=97&&S[i]<=122)){
    		answer ="WA";
    	}
      	if(S[i]=="C"){
        	count++;
        }
    }
  if(count!=1){
  	answer = "WA";
  }
  	if(!(S[9]>=97&&S[9]<=122)){
    	answer ="WA";
    }
  
  	if(answer != "WA"){
    	answer = "AC";
    }
  	cout << answer;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |         if(S[0]!="A"){
      |            ~~~~^~~~~
a.cc:11:18: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
   11 |         answer = "WA";
      |                  ^~~~
      |                  |
      |                  const char*
a.cc:14:17: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
   14 |         answer ="WA";
      |                 ^~~~
      |                 |
      |                 const char*
a.cc:19:25: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
   19 |                 answer ="WA";
      |                         ^~~~
      |                         |
      |                         const char*
a.cc:21:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   21 |         if(S[i]=="C"){
      |            ~~~~^~~~~
a.cc:26:18: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
   26 |         answer = "WA";
      |                  ^~~~
      |                  |
      |                  const char*
a.cc:29:17: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
   29 |         answer ="WA";
      |                 ^~~~
      |                 |
      |                 const char*
a.cc:32:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   32 |         if(answer != "WA"){
      |            ~~~~~~~^~~~~~~
a.cc:33:18: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
   33 |         answer = "AC";
      |                  ^~~~
      |                  |
      |                  const char*
Language: C++

#include <iostream>
#include <cstring>
#include <cmath>
#include <vector>
#include <algorithm>
#include <queue>
#include <map>
#include <set>
#include <sstream>
#include <stack>
#include <deque>
using namespace std;
#define ll long long
#define F first
#define S second
#define pb push_back
#define mp make_pair
#define pi pair<int,int>
#define pii pair<pi,int>
#define sqr(x) ((x)*(x))
#define FOR for(int i=0;i<n;i++)for(int j=0;j<m;j++)
const int dx[4]={1,0,-1,0},dy[4]={0,1,0,-1};

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


Compiler output:
a.cc: In function 'int main()':
a.cc:35:10: error: 'else' without a previous 'if'
   35 |          else
      |          ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
char str[11];
int main()
{
	int i,c=0;
	scanf("%s",str);
	if(str[0]!='A')
	{
		printf("WA");
		return 0; 
	}
	else if(str[1]=='C')
	{
		printf("WA");
		return 0;
	}
	else if(str[strlen(str)-1]=='C')
	{
		printf("WA");
		return 0;
	}
	for(i=2;i<strlen(str);i++)
	{
		if(c==2)
		{
			printf("WA");
			return 0;
		}
		else if(str[i]=='C')
		{
			c++;
		}
	}
	if(c==1)
		printf("AC");
	else ds
		printf("WA");	
	return 0;			
}

Compiler output:
a.cc: In function 'int main()':
a.cc:37:14: error: 'ds' was not declared in this scope
   37 |         else ds
      |              ^~
Language: C++

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

int main()
{
	ios::sync_with_stdio(false);
	string s;
	int i,len,num;
	int flag,temp;
	while(cin>>s)
	{
		temp=-1;
		flag=1;
		num=0;
		if(s[0]!='A')
		{
			cout<<"WA"<<endl;
			continue;
		}
		else
		{
			for(i=2;i<len-1;i++)
		    {
			    if(s[i]=='C')
			    {
			       	num++;
			       	temp=i;
				}
	      	}
	 	    if(num!=1)
		    {
		    	cout<<"WA"<<endl;
		    	continue;
			}
		for(i=1;i<len;i++)
		{
			if(i!=temp)
			{
				if(s[i]>'A'&&s[i]<='Z')
				{
					flag=0;
					break;
				}
			}
		}
		if(flag==0)
		{
			cout<<"WA"<<endl;
			continue;
		}
		
		cout<<"AC"<<endl;
	}
	return 0;
}

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

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

typedef long long ll;

string s,t;
int c;

int main(){
  cin>>s;
  if(s[0]!='A'){
    cout<<"WA"<<endl;return 0;
  }
  
  for(int i=1;i<s.size();i++){
    if(s[0]=='A'){
      continue;
    }else{
      cout<<"WA"<<endl;return 0;
    }
    
    else if(s[i]=='C'){
      if(i>=2&&i<=s.size()-2){
        c++;
        if(c==2){
          cout<<"WA"<<endl;return 0;
        }else{
          continue;
        }
      }
    }
    
    else if(s[i]>='a'&&s[i]<='z'){
      continue;
    }

    else{
      cout<<"WA"<<endl;return 0;
    }
    
  }
  if(c==0)cout<<"WA"<<endl;
  else cout<<"AC"<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:5: error: 'else' without a previous 'if'
   22 |     else if(s[i]=='C'){
      |     ^~~~
Language: C++

#include <iostream>
#include <cstring>
#include <cmath>
#include <vector>
#include <algorithm>
#include <queue>
#include <map>
#include <set>
#include <sstream>
#include <stack>
#include <deque>
using namespace std;
#define ll long long
#define F first
#define S second
#define pb push_back
#define mp make_pair
#define pi pair<int,int>
#define pii pair<pi,int>
#define sqr(x) ((x)*(x))
#define FOR for(int i=0;i<n;i++)for(int j=0;j<m;j++)
const int dx[4]={1,0,-1,0},dy[4]={0,1,0,-1};

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


Compiler output:
a.cc: In function 'int main()':
a.cc:32:55: error: expected ';' before ')' token
   32 |          for(int i=0;i<s.size();i++)if(s[i]=='C')cnt++);
      |                                                       ^
      |                                                       ;
a.cc:35:19: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
   35 |         puts("AC")<<endl;
      |         ~~~~~~~~~~^~~~~~
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(){
	string str;
	cin >> str;
	int flag = 1;
	for(int i = 0; i < str.length(); i++){
		if(i == 0 && str[i] != 'A') flag = 0;
		if(i == 2 && str[i] != 'C') flag = 0;
		if(str[i] < 'a')			flag = 0;
	}
	if(flag) 
		cout << "AC";
	else
		cout << "WA"
	return 0;
}

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

#include<stdio.h>
#include<ctype.h>
int main(void) {
	char S[11];
	scanf_s("%s", &S, 11);

	int size = 0;
	for (int i = 0; S[i] != NULL; i++) {
		size++;
	}


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

	for (int i = 2; i < size; i++) {
		if (S[i] == 'C') {
			for (int j = i + 1; j < size; j++) {
				if (S[i] == 'C'&& S[j] == 'C') {
					printf("WA");
					return 0;
				}
			}
		}
		else {
			printf("WA");
			return 0;
		}

	}

	for (int i = 0; i < size+1; i++) {
		if (S[i] != 'A'&&S[i] != 'C') {
			if (isupper(S[i]) == 0) {
				printf("AC");
				return 0;
			}
		}
	}
	printf("AC");
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    5 |         scanf_s("%s", &S, 11);
      |         ^~~~~~~
      |         scanf
main.c:8:30: warning: comparison between pointer and integer
    8 |         for (int i = 0; S[i] != NULL; i++) {
      |                              ^~
Language: C

#include <string.h>
#include <stdlib.h>
#include <stdio.h>
 
int main() {
  char s[10];
  int l = 0;
  scanf("%s", s);
  l = strlen(s);
  if (s[0] != 'A') {
    printf("WA");
    exit(1);
  }
 
  int i = 0;
  int t = 0;
  for (i = 2; i < l-1; i++) {
    if (s[i] == 'C') {
      t++;
    }
  }
 
  if (t != 1) {
    printf("WA");
    exit(1);
  }
  t = 0;
  for (i = 0; i < l; i++) {
    if (s[i] <= 'Z') {
      t++;
    }
  }
 
  if (t == 2) {
    printf("AC");
  }
  else {
    printf("WA");
  }
  return 0;
}
#include <string.h>
#include <stdlib.h>
#include <stdio.h>

int main() {
  char s[10];
  int l = 0;
  scanf("%s", s);
  l = strlen(s);
  if (s[0] != 'A') {
    printf("WA");
    exit(1);
  }

  int i = 0;
  int t = 0;
  for (i = 2; i < l-1; i++) {
    if (s[i] == 'C') {
      t++;
    }
  }

  if (t != 1) {
    printf("WA");
    exit(1);
  }
  t = 0;
  for (i = 0; i < l; i++) {
    if (s[i] <= 'Z') {
      t++;
    }
  }

  if (t == 2) {
    printf("AC");
  }
  else {
    printf("WA");
  }
  return 0;
}

Compiler output:
main.c:46:5: error: redefinition of 'main'
   46 | int main() {
      |     ^~~~
main.c:5:5: note: previous definition of 'main' with type 'int()'
    5 | int main() {
      |     ^~~~
Language: C++

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

int main(int argc, char** argv) {
  string s;
  cin >> s;

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

  int c_pos = 0;
  if (s[2] == 'C' && s[s.size() - 2] != 'C') {
    c_pos = 2;
  } else if (s[s.size() - 2] == 'C' && s[2] == 'C') {
    c_pos = s.size() - 2;
  }
  if (c_pos == 0) {
    cout << "No";
    return 0;
  }

  for (int i = 0; i < s.size(); i++) {
    if (i == c_pos || i == 0) {
      continue;
    }
    if (isupper(s[i] == 0) {
      cout << "No";
      return 0;
    }
  }
  cout << "Yes";
  return 0;
}


Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:31:27: error: expected ')' before '{' token
   31 |     if (isupper(s[i] == 0) {
      |        ~                  ^~
      |                           )
a.cc:35:3: error: expected primary-expression before '}' token
   35 |   }
      |   ^
Language: C++

#include <iostream>
#include <cstring>
#include <string>
#include <algorithm>
#include <cstdio>
#include <cmath>
using namespace std;

int main(){
	string s;
	while(cin>>s){
		int len=strlen(s.c_str()),i,count=0;
		if(len<4||len>10){
			cout<<"WA"<<endl;
			continue;
		}
		if(s[0]!='A'){
			cout<<"WA"<<endl;
			continue;
		}
		for(i=2;i<len-1;i++){
			if(s[i]=='C'){
				count++;				
			}
		}
		if(count!=1){
			cout<<"WA"<<endl;
			continue;
		}
		for(i=0;i<len;i++){
			if(s[i]=='B'||(s[i]>='D'&&s[i]<='Z')||){
				cout<<"WA"<<endl;
				continue;
			}
		}
		cout<<"AC"<<endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:31:63: error: expected primary-expression before ')' token
   31 |                         if(s[i]=='B'||(s[i]>='D'&&s[i]<='Z')||){
      |                                                               ^
Language: C++

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

int main(int argc, char** argv) {
  string s;
  cin >> s;

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

  int c_pos = 0;
  if (s[2] == 'C' && s[s.size() - 2] != 'C') {
    _pos = 2;
  } else if (s[s.size() - 2] == 'C' && s[2] == 'C') {
    c_pos = s.size() - 2;
  }
  if (c_pos == 0) {
    cout << "No";
    return 0;
  }

  for (int i = 0; i < s.size(); i++) {
    if (i == c_pos || i == 0) {
      continue;
    }
    if (isupper(s[i] == 0) {
      cout << "No";
      return 0;
    }
  }
  cout << "Yes";
  return 0;
}


Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:18:5: error: '_pos' was not declared in this scope; did you mean 'c_pos'?
   18 |     _pos = 2;
      |     ^~~~
      |     c_pos
a.cc:31:27: error: expected ')' before '{' token
   31 |     if (isupper(s[i] == 0) {
      |        ~                  ^~
      |                           )
a.cc:35:3: error: expected primary-expression before '}' token
   35 |   }
      |   ^
Language: C++

#include <iostream>
#include <cstdio>
#include <cstring>

using namespace std;

int main()
{
    char ch[11];
    int count=0;
    int len,i,j,flag=1;
    scanf("%s",ch);
    len=sizeof(ch);
    for(i=0,j=0;ch[i]!='\0';i++)
    {
        if(ch[i]=='C')
        {
            a[j]=i;
            count++;
        }
        if((ch[i]=='C'&&(i<=2&&i>=len-1))||count>1)
        {
            flag=0;
            break;
        }
        if((ch[i]>'z'&&ch[i]<'a')||(ch[i]>'C'&&ch[i]<'A'))
        {
            flag=0;
            break;
        }
        if(ch[i]=='B')
         {
            flag=0;
            break;
        }
        if(ch[0]!='A')
        {
            flag=0;
            break;
        }
    }
        if(ch[0]=='A'&&ch[2]=='C'&&flag!=0)
            printf("AC\n");
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:13: error: 'a' was not declared in this scope
   18 |             a[j]=i;
      |             ^
Language: C++

#include <iostream>
#include <cstring>
#include <string>
#include <algorithm>
#include <cstdio>
#include <cmath>
using namespace std;

int main(){
	string s;
	while(cin>>s){
		int len=strlen(s.c_str()),i,count=0;
		if(len<4||len>10){
			ccout<<"WA"<<endl;
			continue;
		}
		if(s[0]!='A'){
			cout<<"WA"<<endl;
			continue;
		}
		for(i=2;i<len-1;i++){
			if(s[i]=='C'){
				count++;				
			}
		}
		if(count!=1){
			cout<<"WA"<<endl;
			continue;
		}
		for(i=0;i<len;i++){
			if(s[i]=='B'||(s[i]>='D'&&s[i]<='Z')||){
				cout<<"WA"<<endl;
				continue;
			}
		}
		cout<<"AC"<<endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:25: error: 'ccout' was not declared in this scope
   14 |                         ccout<<"WA"<<endl;
      |                         ^~~~~
a.cc:31:63: error: expected primary-expression before ')' token
   31 |                         if(s[i]=='B'||(s[i]>='D'&&s[i]<='Z')||){
      |                                                               ^
Language: C++

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

int main(int argc, char** argv) {
  string s;
  cin >> s;

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

  int c_pos = 0;
  if (s[2] == 'C' && s[s.size() - 2] != 'C') {
    _pos = 2;
  } else if (s[s.size() - 2] == 'C' && s[2] == 'C') {
    c_pos = s.size() - 2;
  }
  if (c_pos == 0) {
    cout << "No";
    return 0;
  }

  for (int i = 0; i < s.size(); i++) {
    if (i == c_pos || i == 0) {
      continue;
    }
    if (isupper(s[i] == 0) {
      cout << "No";
      return 0;
    }
  }
  cout << "Yes";
  return 0;
}


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

S = str(input())
if S[0] == "A":
    S = "a" + S[1:]
    if "C" in S[2:-1]:
        cs = False
        for i,s in enumerate(S[2:-1]):
            if not(cs) and s == "C":
                S = S[:i+2] + "c" + S[i+3:]
                cs = True
        if S.islower():
            print("AC")
        else:
            print("WA")
    else:
        print("WA")
else:
    print("WA")

Compiler output:
a.cc:1:1: error: 'S' does not name a type
    1 | S = str(input())
      | ^
Language: C++

#include<bits/stdc++.h>
#include<string>
using namespace std;
int main()
{
	char s[10];
	int i=1;
	int n;
	int k=0;
	int t=1;
	int x=1;
	gets(s);
	n=strlen(s);
	if(s[0]!='A')
	{
		i=0;
	}
	else if(s[1]=='C'||s[n-1]=='C')
	{
		i=0;
	}
	for(int j=2;j<n-2;j++)
	{
		if(s[j]=='C')
		{
			k=1;
			break;
		}
	}
	if(k==0)
	{
		i=0;
	}
	for(;x<n;x++)
	{
		if(s[x]=='C'&&t==1)
		{
			t=0;
			continue;
		}
		if(s[x]<='Z')
		{
			i=0;
			break;
		}
	}
	if(i==0)
	{
		printf("WA");
	}
	else
	{
		printf("AC");
	}
	return 0;
}

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

import java.util.Scanner;
public class Main_104b {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		boolean c = true;
		if(s.charAt(0) != 'A' && s.substring(2, s.length()).split("C").length != 2) c = false;
		char[] set = s.toCharArray();
		if(c)for(int i = 1; i < set.length; i++) {
			if(set[i] != 'C' && !Character.isLowerCase(set[i])) {
				c = false;
				break;
			}
		}
		if(c)System.out.println("AC");
		else System.out.println("WA");
	}
}

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

#include<bits/stdc++.h>
using namespace std;
int main()
{
	char s[10];
	int i=1;
	int n;
	int k=0;
	int t=1;
	int x=1;
	gets(s);
	n=strlen(s);
	if(s[0]!='A')
	{
		i=0;
	}
	else if(s[1]=='C'||s[n-1]=='C')
	{
		i=0;
	}
	for(int j=2;j<n-2;j++)
	{
		if(s[j]=='C')
		{
			k=1;
			break;
		}
	}
	if(k==0)
	{
		i=0;
	}
	for(;x<n;x++)
	{
		if(s[x]=='C'&&t==1)
		{
			t=0;
			continue;
		}
		if(s[x]<='Z')
		{
			i=0;
			break;
		}
	}
	if(i==0)
	{
		printf("WA");
	}
	else
	{
		printf("AC");
	}
	return 0;
}

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

    #include <bits/stdc++.h>
     
    using namespace std;
     
    int main(){
    	int s;cin>>s; int flag=1, i;
      	for(i=0; i<s.length()-1; i++){
        	if(i == 0 && s[i] != 'A') break;
          	else if(i == 1)
              	if(s[i] >=65 && s[i] <97 ) break;
          	else if(s[i] >= 65 && s[i]<97 && flag){
            	if(s[i] == 'C') flag = 0;
              	else break;
            }
       	}	
      	if(i != s.length()-1 || (s[n-1] >= 65 && s[n-1] < 97) cout<<"WA";
        else cout<<"AC";
      	return 0;
           }

Compiler output:
a.cc: In function 'int main()':
a.cc:7:22: error: request for member 'length' in 's', which is of non-class type 'int'
    7 |         for(i=0; i<s.length()-1; i++){
      |                      ^~~~~~
a.cc:8:31: error: invalid types 'int[int]' for array subscript
    8 |                 if(i == 0 && s[i] != 'A') break;
      |                               ^
a.cc:10:21: error: invalid types 'int[int]' for array subscript
   10 |                 if(s[i] >=65 && s[i] <97 ) break;
      |                     ^
a.cc:10:34: error: invalid types 'int[int]' for array subscript
   10 |                 if(s[i] >=65 && s[i] <97 ) break;
      |                                  ^
a.cc:11:26: error: invalid types 'int[int]' for array subscript
   11 |                 else if(s[i] >= 65 && s[i]<97 && flag){
      |                          ^
a.cc:11:40: error: invalid types 'int[int]' for array subscript
   11 |                 else if(s[i] >= 65 && s[i]<97 && flag){
      |                                        ^
a.cc:12:21: error: invalid types 'int[int]' for array subscript
   12 |                 if(s[i] == 'C') flag = 0;
      |                     ^
a.cc:16:19: error: request for member 'length' in 's', which is of non-class type 'int'
   16 |         if(i != s.length()-1 || (s[n-1] >= 65 && s[n-1] < 97) cout<<"WA";
      |                   ^~~~~~
a.cc:16:36: error: 'n' was not declared in this scope
   16 |         if(i != s.length()-1 || (s[n-1] >= 65 && s[n-1] < 97) cout<<"WA";
      |                                    ^
a.cc:17:9: error: expected primary-expression before 'else'
   17 |         else cout<<"AC";
      |         ^~~~
a.cc:16:74: error: expected ')' before 'else'
   16 |         if(i != s.length()-1 || (s[n-1] >= 65 && s[n-1] < 97) cout<<"WA";
      |           ~                                                              ^
      |                                                                          )
   17 |         else cout<<"AC";
      |         ~~~~
Language: C++

#include <iostream>
#include <cstdio>
#include <string>
#include <vector>
#include <algorithm>
#include <numeric>
#include <map>
#include <math.h>
#include <cstring>

using namespace std;

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

#define INF 		2000000007
#define MOD			998244353

#define MAX 		100005

typedef unsigned int 			uint;
typedef unsigned long long int	ull;
typedef long long int ll;


int dp[1100];

int main(void) {
	string R;cin>>R;
	bool flag = true;
 
	if(R[0]!='A') flag = false;
	if(R[1]<'a'||R[1]>'z')flag = false;
	int cnt = 0;
	int oomosi = 0
	for(int i=1;i<R.size();++i){
		if(R[i]>='a' && R[i] <= 'z')continue;
		else if(R[i]=='C')cnt++;
		else oomosi++;
	}
	if(cnt != 1)flag = false;
	if(oomosi!=0)flag = false;
	if(R[R.size()-1]=='C')flag = false;
 
	cout << (flag ? "AC" : "WA") << endl;
 
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:36:9: error: expected ',' or ';' before 'for'
   36 |         for(int i=1;i<R.size();++i){
      |         ^~~
a.cc:36:21: error: 'i' was not declared in this scope
   36 |         for(int i=1;i<R.size();++i){
      |                     ^
Language: C++

#include <stdio.h>
#include <iostream>

using namespace std;
		
int main(){
  char buf[100];

  scanf("%s", buf);

  int len = strlen(buf);
  //cout << len << endl;

  int flag = 0;

  for(int i=1; i < len; i++){
    if(buf[i] >= 'A' && buf[i] <= 'Z'){
      if(buf[i] != 'C'){
	goto error; 
      }else if(i >= 2 && i <= (len - 2)){
	if(flag == 1){
	  goto error;
	}else{
	  flag = 1;
	}
	continue;
      }else{
	goto error;
      }
    }else if (buf[i] < 'a' && buf[i] > 'z')
      goto error;
      
  }

  if(buf[0] != 'A')
    goto error;
  
  if(flag == 0){
    goto error;
  }

  cout << "AC" << endl;

  return 0;

error:
  cout << "WA" << endl;
  return 1;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:11:13: error: 'strlen' was not declared in this scope
   11 |   int len = strlen(buf);
      |             ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include <iostream>
  +++ |+#include <cstring>
    3 |