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

#include <iostream>
#include <algorithm>
#include <cctype>

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

    bool cond1 = S[0] == 'A';
    bool cond2 = std::count(S.begin() + 2, S.end() - 1, 'C') == 1;
    bool cond3 = std::count_if(S.begin() + 2, S.end() - 1, isupper) == ;
    std::cout << (cond1 && cond2 && cond3 ? "AC" : "WA") << std::endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:72: error: expected primary-expression before ';' token
   11 |     bool cond3 = std::count_if(S.begin() + 2, S.end() - 1, isupper) == ;
      |                                                                        ^
Language: C++

#include <iostream>
#include <vector>
#include <string>
using namespace std;
int main(){
    string s;
    cin>>s;
    bool a=false,b=false,c=true,key=false;
    rep(i,s.size()){
        if(s[i]>='A' && s[i]<='Z'){
            if(i==0 && s[i]=='A'){
                a = true;
            }else if((i>1 && i<=s.size()-2) && s[i]=='C' && !key2){
                key = true;
                b = true;
            }else if((key || i<=1)&& s[i]=='C'){
                b = false;
                key = true;
            }else{
                c = false;
            }
        }else{
 
        }
    }
    if(a&&b&&c){
        cout<<"AC"<<endl;
    }else{
        cout<<"WA"<<endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: 'i' was not declared in this scope
    9 |     rep(i,s.size()){
      |         ^
a.cc:9:5: error: 'rep' was not declared in this scope
    9 |     rep(i,s.size()){
      |     ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
    string  n;
    cin>>n;
    int len = n.size();
    if(n[0]!='A')
    {
        cout<<"WA"<<endl;
        return 0;
    }
    else if (n[1]=='C'||(n[1]>='A'&&n[1]<='Z')||n[len-1]=='C'||n[2]!="C")
    {
        cout<<"WA"<<endl;
        return 0;
    }
    int num = 0;
    for(int i=3;i<len-1;i++)
    {
        if(n[i]>='A'&&n[i]<='Z')
        {
            cout<<"WA"<<endl;
            return 0;
        }
    }
    cout<<"AC"<<endl;
    return 0;
}
//AccccCcc


Compiler output:
a.cc: In function 'int main()':
a.cc:13:68: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 |     else if (n[1]=='C'||(n[1]>='A'&&n[1]<='Z')||n[len-1]=='C'||n[2]!="C")
Language: C

#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>

int main(void) {
	char S[11];
	scanf("%s", S);

	int i, m, count = 0, I;
	for (i = 0; S[i] != '\0'; i++);
	I = i;

	if (S[0] == 'A') {
		for (i = 2; i <= I - 2; i++) {
			if (S[i] == 'C') {
				count++;
				m = i;
			}
		}
		if (count == 1) {
			for (i = 1; i <= I - 1; i++) {
				if (i == m)continue;
				if (S[i] >= 'A'&&S[i] <= 'Z') {
					printf("WA\n");
					return 0;
				}
			}
		}
		else {
			printf("WA\n");
			return 0;
		}
	}
	else {
		printf("WA\n");
		return 0;
	}
	printf("AC\n");
	return 0;
}
　

Compiler output:
main.c:40:1: error: stray '\343' in program
   40 | <U+3000>
      | ^~~~~~~~
Language: C++

#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>

int main(void) {
	char S[11];
	scanf("%s", S);

	int i, m, count = 0, I;
	for (i = 0; S[i] != '\0'; i++);
	I = i;

	if (S[0] == 'A') {
		for (i = 2; i <= I - 2; i++) {
			if (S[i] == 'C') {
				count++;
				m = i;
			}
		}
		if (count == 1) {
			for (i = 1; i <= I - 1; i++) {
				if (i == m)continue;
				if (S[i] >= 'A'&&S[i] <= 'Z') {
					printf("WA\n");
					return 0;
				}
			}
		}
		else {
			printf("WA\n");
			return 0;
		}
	}
	else {
		printf("WA\n");
		return 0;
	}
	printf("AC\n");
	return 0;
}
　

Compiler output:
a.cc:40:1: error: extended character 　 is not valid in an identifier
   40 | 　
      | ^
a.cc:40:1: error: '\U00003000' does not name a type
   40 | 　
      | ^~
Language: C++

#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>

int main(void) {
	char S[11];
	scanf("%s", S);

	int i,m, count = 0,I;
	for (i = 0; S[i] != '\0'; i++);
	I = i;

	if (S[0] == 'A') {
		for (i = 2; i<=I-2; i++) {
			if (S[i] == 'C') {
				count++;
				m = i;
			}
		}
		if (count == 1) {
			for (i = 1; i<=I-1; i++) {
				if (i == m)continue;
				if (S[i] >= 'A'&&S[i] <= 'Z') {
					printf("WA\n");
					return 0;
				}
			}
		}else {
			printf("WA\n");
			return 0;
		}
	}else {
		printf("WA\n");
		return 0;
	}
	printf("AC\n");
	return 0;
}
　

Compiler output:
a.cc:38:1: error: extended character 　 is not valid in an identifier
   38 | 　
      | ^
a.cc:38:1: error: '\U00003000' does not name a type
   38 | 　
      | ^~
Language: C++

#define _USE_MATH_DEFINES
#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<string>
#include<iostream>
#include<iostream>
#include<cctype>
#include<cstdio>
#include<vector>
#include<stack>
#include<queue>
#include <algorithm>
#include<math.h>
#include<set>
#include<map>
#include <sstream>
#include<iomanip>
#include <ctype.h>
using namespace std;

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


int main() {
	
	string p;
	cin >> p;
	if (p[0] != 'A'||(p[1]>='A'&&p[1]<='Z')) {
		cout << "WA" << endl; return 0;
	}
	int x = 0;
	for (int i = 2; i < p.size(); i++) {
		if ((p[i] >= 'A'&&p[i] <= 'Z')) {
			if (p[i] == 'C')x++;
			else {
				cout << "WA" << endl; return 0;
			}
			if(x>1) {
				cout << "WA" << endl; return 0;
			}
		}
	}
       if(!x)) {
				cout << "WA" << endl; return 0;
			}

	cout << "AC" << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:43:14: error: expected primary-expression before ')' token
   43 |        if(!x)) {
      |              ^
Language: C++

#include"iostream"
#include"string"
using namespace std;

int main() {
	string s;
	string ans;
	cin >> s;
	int Size = s.size();
	
	int numC = 0;
	for (int i = 2; i < Size - 1; i++)
	{
		if (s.at(i) == 'C')
		{
			numC++;
		}
	}


	int numCap = 0;
	for (int i = 0; i < Size ; i++)
	{
		if ('A'<=s.at(i) && s.at(i)<='Z')
		{
			numCap++;
		}
	}


	if (s.at(0) != 'A'||numC!=1||numCap!=2)
	{
		ans = "WA";
	}
	else 
	{
		ans = "AC";
	}
	cout << ans << endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:39:29: error: expected '}' at end of input
   39 |         cout << ans << endl;
      |                             ^
a.cc:5:12: note: to match this '{'
    5 | int main() {
      |            ^
Language: C++

#include <bits/stdc++.h>

using namespace std;
int main()
{
    string s;
    cin >> s;
    if (s[0] != 'A') {
        cout << "WA\n";
        return 0;
    }
    if (s[1] == 'C' || isupper(s[1]) {
            cout << "WA\n";
            return 0;
    }
    int k = 0;
    for (int i = 2, j; i < s.length() -1; i++) {
        if (s[i] == 'C')
            k++;
        else if (isupper(s[i])) {
            cout <<"WA\n";
            return 0;
        }
        if (k > 1) {
            cout << "WA\n";
            return 0;
        }
    }
      
    cout << "AC\n";
    
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:12:37: error: expected ';' before '{' token
   12 |     if (s[1] == 'C' || isupper(s[1]) {
      |                                     ^~
      |                                     ;
a.cc:16:14: error: expected ')' before ';' token
   16 |     int k = 0;
      |              ^
      |              )
a.cc:12:8: note: to match this '('
   12 |     if (s[1] == 'C' || isupper(s[1]) {
      |        ^
a.cc:19:13: error: 'k' was not declared in this scope
   19 |             k++;
      |             ^
a.cc:24:13: error: 'k' was not declared in this scope
   24 |         if (k > 1) {
      |             ^
Language: C++

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

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

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


Compiler output:
a.cc:27:18: warning: missing terminating " character
   27 |     string ans = "AC
      |                  ^
a.cc:27:18: error: missing terminating " character
   27 |     string ans = "AC
      |                  ^~~
a.cc: In function 'int main()':
a.cc:28:5: error: expected primary-expression before 'if'
   28 |     if(S[0] != 'A'){
      |     ^~
a.cc:32:5: error: expected ',' or ';' before 'for'
   32 |     for(int i = 0;i < len;i++){
      |     ^~~
a.cc:32:19: error: 'i' was not declared in this scope
   32 |     for(int i = 0;i < len;i++){
      |                   ^
Language: C++

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

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

int main(){
    cin.tie(0);
   	ios::sync_with_stdio(false);
    string S;
    cin >> S;
    int len = S.size();
    int l_C = 0;
    int l_C_i;
    if(S[0] != 'A'){
      cout << "WA" << endl;
      return 0;
    }
  
    for(int i = 0;i < len - 1;i++){
      if(isupper(S[i]){
      	if(i == 1 || i == len - 1 || S[i] != 'C'){ 
        cout << "WA" << endl;
        return 0;
        }
        l_C++;
      }
         }
         }
    if(l_C =! 1){
      cout << "WA" << endl;
      return 0;
    }
    cout << "AC" << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:34:23: error: expected ')' before '{' token
   34 |       if(isupper(S[i]){
      |         ~             ^
      |                       )
a.cc:41:10: error: expected primary-expression before '}' token
   41 |          }
      |          ^
a.cc: At global scope:
a.cc:43:5: error: expected unqualified-id before 'if'
   43 |     if(l_C =! 1){
      |     ^~
a.cc:47:5: error: 'cout' does not name a type
   47 |     cout << "AC" << endl;
      |     ^~~~
a.cc:48:5: error: expected unqualified-id before 'return'
   48 |     return 0;
      |     ^~~~~~
a.cc:49:1: error: expected declaration before '}' token
   49 | }
      | ^
Language: C++

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

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

int main(){
    cin.tie(0);
   	ios::sync_with_stdio(false);
    string S;
    cin >> S;
    int len = S.size();
    int l_C = 0;
    int l_C_i;
    if(S[0] != 'A'){
      cout << "WA" << endl;
      return 0;
    }
    for(int i = 0;i < len - 1;i++){
      if(isupper(S[i]){
      	if(i == 1 || i == len - 1 || S[i] != 'C'){ 
        cout << "WA" << endl;
        }
        l_C++
        return 0;
      
      }
         }
    if(l_C =! 1){
      cout << "WA" << endl;
      return 0;
    }
    cout << "AC" << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:33:23: error: expected ')' before '{' token
   33 |       if(isupper(S[i]){
      |         ~             ^
      |                       )
a.cc:41:10: error: expected primary-expression before '}' token
   41 |          }
      |          ^
Language: C++

#include <iostream>

using namespace std;

int main()
{
  	string S
  	cin >> S;
  	int a = 0;
  	for(int i = 2; i < S.size() - 1; i++){
      if(S.at(i) = 'C'){
        a++;
      }
    }
  	int b = 0;
  	for(int i = 0; i < S.size(); i++){
      if(isupper(S.at(i))){
        b++;
      }
    }
  	if(S.at(0) == 'A' && a == 1 && b == 2){
      cout << "AC";
    }else{
      cout << "WA";
    }
  	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: expected initializer before 'cin'
    8 |         cin >> S;
      |         ^~~
a.cc:10:28: error: 'S' was not declared in this scope
   10 |         for(int i = 2; i < S.size() - 1; i++){
      |                            ^
a.cc:16:28: error: 'S' was not declared in this scope
   16 |         for(int i = 0; i < S.size(); i++){
      |                            ^
a.cc:21:12: error: 'S' was not declared in this scope
   21 |         if(S.at(0) == 'A' && a == 1 && b == 2){
      |            ^
Language: C++

#include <iostream>

using namespace std;

int main()
{
  	string S;
  	cin >> S;
  	int a = 0;
  	for(i = 2; i < S.size() - 1; i++){
      if(S.at(i) = 'C'){
        a++;
      }
    }
  	int b = 0;
  	for(i = 0; i < S.size(); i++){
      if(isupper('S.at(i)')){
        b++;
      }
    }
  	if(S.at(0) == 'A' && a == 1 && b == 2){
      cout << "AC";
    }else{
      cout << "WA";
    }
  	return 0:
}

Compiler output:
a.cc:17:18: warning: multi-character literal with 7 characters exceeds 'int' size of 4 bytes
   17 |       if(isupper('S.at(i)')){
      |                  ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:10:13: error: 'i' was not declared in this scope
   10 |         for(i = 2; i < S.size() - 1; i++){
      |             ^
a.cc:16:13: error: 'i' was not declared in this scope
   16 |         for(i = 0; i < S.size(); i++){
      |             ^
a.cc:26:17: error: expected ';' before ':' token
   26 |         return 0:
      |                 ^
      |                 ;
a.cc:26:17: error: expected primary-expression before ':' token
Language: C++

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

int main() {

    string S;
    cin >> S;

    bool flag = false;
    if (S.substr(0, 1) == "A") {
        int i_num = 0;
        int count = 0;
        for(int i = 2; i < S.size() - 1; i++) {

            if(S.substr(i, 1) == "C") {
                i_num = i;
                count += 1;
            }
        }

        if(count == 1) {

            count = 0;

            for(int i = 0; i < S.size(); i++) {
                if( S.sbustr(i, 1) >= "A" && S.substr(i, 1) <= "Z") {
                    count++;
                }
            }

            if (count == 2) {
                flag = true;
            }
        }
    }

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


Compiler output:
a.cc: In function 'int main()':
a.cc:26:23: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'sbustr'; did you mean 'substr'?
   26 |                 if( S.sbustr(i, 1) >= "A" && S.substr(i, 1) <= "Z") {
      |                       ^~~~~~
      |                       substr
Language: C++

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

int main() {

    string S;
    cin >> S;

    bool flag = false;
    if (S.substr(0, 1) == "A") {
        int i_num = 0;
        int count = 0;
        for(int i = 2; i < S.size() - 1; i++) {

            if(S.substr(i, 1) == "C") {
                i_num = i;
                count += 1;
            }
        }

        if(count == 1) {

            count = 0;

            for(int i = 0; i < S.size(); i++) {
                if( S.sbustr(i, 1) >= "A" && S.substr(i, 1) <= "Z") {
                    count++
                }
            }

            if (count == 2) {
                flag = true;
            }
        }
    }

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


Compiler output:
a.cc: In function 'int main()':
a.cc:26:23: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'sbustr'; did you mean 'substr'?
   26 |                 if( S.sbustr(i, 1) >= "A" && S.substr(i, 1) <= "Z") {
      |                       ^~~~~~
      |                       substr
a.cc:27:28: error: expected ';' before '}' token
   27 |                     count++
      |                            ^
      |                            ;
   28 |                 }
      |                 ~
Language: C++

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

int main()
{
	string s;
	cin >> s;
	if (s[0] != 'A')
	{
		cout << "WA";
		return 0;
	}
	if (count(s.begin(), s.end(), 'C') > 1)
	{
		cout << "WA";
		return 0;
	}
	if (s.find('C', s.length()) < 2)
	{
		cout << "WA";
		return 0;
	}
	cout << "AC";
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:13: error: 'count' was not declared in this scope
   18 |         if (count(s.begin(), s.end(), 'C') > 1)
      |             ^~~~~
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
char ch[20];

int main(void){
    cin >> ch;
    if(ch[0] != 'A')
        return cout << "WA",0;
    if(ch[1] < 'a' ||ch[1] > 'z') 
        return cout << "WA",0;
    if(ch[2] != 'C')
        return cout << "WA",0;
    for(int i=3;i<strlen(ch);++i)
        if(ch[i] < 'a' || ch[i] > 'z') return cout << "WA",0;
    cout << "AC"; return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:19: error: 'strlen' was not declared in this scope
   14 |     for(int i=3;i<strlen(ch);++i)
      |                   ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include<algorithm>
  +++ |+#include <cstring>
    3 | using namespace std;
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
char ch[11];

int main(void){
    scanf("%s",ch);
    if(ch[0] != 'A')
        return cout << "WA",0;
    if(ch[1] < 'a' ||ch[1] > 'z') 
        return cout << "WA",0;
    if(ch[2] != 'C')
        return cout << "WA",0;
    for(int i=3;i<strlen(ch);++i)
        if(ch[i] < 'a' || ch[i] > 'z') return cout << "WA",0;
    cout << "AC"; return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:19: error: 'strlen' was not declared in this scope
   14 |     for(int i=3;i<strlen(ch);++i)
      |                   ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include<algorithm>
  +++ |+#include <cstring>
    3 | using namespace std;
Language: C++

#include <iostream>
using namespace std;

int main(){
  string s;
  cin >> s;
  int resultC = 0,
      resultLower = 0;
  for (int i = 2; i <= (s.length() - 2); i++) {
    if (s[i] == "C") {
      resultC += 1;
    }
  }
  for (int i = 1; i <= s.length(); i++) {
    if (islower(s[i])) {
    }else if (isupper(s[i])) {
      if (i >= 2 && i <= (s.length() - 2) && s[i] == "C") {
        
      } else {
        resultLower += 1;
      }
    }
  }
  if (s[0] == "A" && resultC == 1 && resultLower == 0) {
    cout << "AC" << endl;
  } else {
    cout << "WA" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |     if (s[i] == "C") {
a.cc:17:51: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   17 |       if (i >= 2 && i <= (s.length() - 2) && s[i] == "C") {
a.cc:24:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   24 |   if (s[0] == "A" && resultC == 1 && resultLower == 0) {
Language: C++

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

#define rep(i, n) REP(i, 0, n)
#define REP(i, k, n) for(int i = (int)k; i < (int)n; i++)
#define rrep(i, n) RREP(i, 0, n)
#define RREP(i, k, n) for(int i = (int)n-1; i > (int)k-1; i--)
#define mmax(start, end) *max_element(start, end)
#define mmin(start, end) *min_element(start, end)
#define ALL(x) (x).begin(), (x).end()

typedef long long ll;

int dx[4] = {1, -1, 0, 0};
int dy[4] = {0, 0, 1, -1};
int dx8[8] = {-1, -1, -1, 0, 0, 1, 1, 1};
int dy8[8] = {-1, 0, 1, -1, 1, -1, 0, 1};

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

    string S;
    cin >> S;

    string ans;
    if (S[0] != 'A') ans = "WA";
    else {
        if(S[1] < 'a' || 'z' < S[1]) ans = "WA";
        else {
            int cnum = 0;
            REP(i, 2, S.length()) {
                if(S[i] == 'C') cnum++;
                else if('A' <= S[i] && S[i] <= 'Z') {
                    ans = "WA";
                    cout << ans << endl;
                    exit();
                }
            }

            if(cnum == 1 && ('a' < S[S.length()-1] && S[S.length()-1] < 'z')) ans = "AC";
            else ans = "WA";
        }
    }
    cout << ans << endl;

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:37:25: error: too few arguments to function 'void exit(int)'
   37 |                     exit();
      |                     ~~~~^~
In file included from /usr/include/c++/14/cstdlib:79,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:42,
                 from a.cc:1:
/usr/include/stdlib.h:756:13: note: declared here
  756 | extern void exit (int __status) __THROW __attribute__ ((__noreturn__));
      |             ^~~~
Language: C++

#include <iostream>

using namespace std;

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

        cout << ((cnt == 1 && upper == 1) ? "AC" : "WA") << endl;

    }

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:23: error: expected ')' before ']' token
   22 |         if('A' <= s[1]] && s[1] <= 'Z')
      |           ~           ^
      |                       )
a.cc:22:23: error: expected primary-expression before ']' token
Language: C++

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

using namespace std;

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


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

#include"bits/stdc++.h"
using namespace std;
int main(){
	string s;
	cin>>s;
	bool ch=true;
	if(s[0]!='A')
		ch=false;
	int cnt=0;
	for(int i=2;i!=s.size()-1;++i){
		if(s[i]=='C')
			++cnt;
		else if(isupper(s[i]))
			ch=false;
	}
	if(isupper(s[1]) || isupper(s.back())
		ch=false;
	if(cnt!=1)
		ch=false;
	cout<<(ch ? "AC":"WA");
}




Compiler output:
a.cc: In function 'int main()':
a.cc:16:46: error: expected ';' before 'ch'
   16 |         if(isupper(s[1]) || isupper(s.back())
      |                                              ^
      |                                              ;
   17 |                 ch=false;
      |                 ~~                            
a.cc:18:9: error: expected primary-expression before 'if'
   18 |         if(cnt!=1)
      |         ^~
a.cc:17:26: error: expected ')' before 'if'
   17 |                 ch=false;
      |                          ^
      |                          )
   18 |         if(cnt!=1)
      |         ~~                
a.cc:16:11: note: to match this '('
   16 |         if(isupper(s[1]) || isupper(s.back())
      |           ^
Language: C

#include<stdio.h>
 
int main(void){
 
  int i,j;
  int a=0;
 
  char S;
  /* 文字を入力 */
  scanf("%s", S);
     for (i = 0;S[i] != '\0';i++);
    if(S[0] != 'A'){
        goto WA;
    }
    else if(i < 4 || i > 10){
        goto WA;
    }
    else if((S[1]>= 'A') && (S[1]<='Z')){
        goto WA;
 
    }
    else if((S[i-1]>= 'A') && (S[i-1]<='Z')){
        goto WA;
 
    }
    else{
        for(j = 2;j < i-1; j++){
            if((S[j]>= 'A') && (S[j]<='Z')){
                if(S[j] != 'C'){
                    goto WA;
                }
                else{
                    a = a + 1;
                }
            }
        }
    }
    if(a == 1){
printf("AC");
goto End;
    }
    else goto WA;
WA:
printf("WA");
 
End:
 
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:18: error: subscripted value is neither array nor pointer nor vector
   11 |      for (i = 0;S[i] != '\0';i++);
      |                  ^
main.c:12:9: error: subscripted value is neither array nor pointer nor vector
   12 |     if(S[0] != 'A'){
      |         ^
main.c:18:15: error: subscripted value is neither array nor pointer nor vector
   18 |     else if((S[1]>= 'A') && (S[1]<='Z')){
      |               ^
main.c:18:31: error: subscripted value is neither array nor pointer nor vector
   18 |     else if((S[1]>= 'A') && (S[1]<='Z')){
      |                               ^
main.c:22:15: error: subscripted value is neither array nor pointer nor vector
   22 |     else if((S[i-1]>= 'A') && (S[i-1]<='Z')){
      |               ^
main.c:22:33: error: subscripted value is neither array nor pointer nor vector
   22 |     else if((S[i-1]>= 'A') && (S[i-1]<='Z')){
      |                                 ^
main.c:28:18: error: subscripted value is neither array nor pointer nor vector
   28 |             if((S[j]>= 'A') && (S[j]<='Z')){
      |                  ^
main.c:28:34: error: subscripted value is neither array nor pointer nor vector
   28 |             if((S[j]>= 'A') && (S[j]<='Z')){
      |                                  ^
main.c:29:21: error: subscripted value is neither array nor pointer nor vector
   29 |                 if(S[j] != 'C'){
      |                     ^
Language: Java

import java.util.Scanner;

// これはきょーか(@ks96neko)が書いたやつ
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String r = sc.next();
        int rl = r.length();

        String r0 = r.substring(0, 0);
        String a = "A";

        String rb = r.substring(2, rl);

        int c1 = rb.indexOf("C");
        int cn = rb.lastIndexOf("C");


        if (a.equals(r0)) {
            if (c1 != -1 && cn != -1) {
                if (c1 != cn) {
                    System.out.println("WA");
                } else {
                    for (int i = 1; i <= rl; i++) {
                        if (i != c1 && !Character.isLowerCase(r.charAt(i)) {
                            System.out.println("WA");
                            return;
                        }
                    }
                    System.out.println("AC");
                }

            } else {
                System.out.println("WA");
            }
        } else {
            System.out.println("WA");
        }


    }

}




Compiler output:
Main.java:25: error: ')' expected
                        if (i != c1 && !Character.isLowerCase(r.charAt(i)) {
                                                                          ^
1 error
Language: C++

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

 bool checker(string s){
	int L=s.size();
	int cont;
	int lcont

	if(s[0]!='A') return false;
	for(int t=2;t<L-1;t++){
		if(s[t]=='C') cont++;
	}

	for(int m=0;m<L;m++){
		if('A'<=s[m]&&s[m]<='Z') lcont++;
	}
	if(cont!=1||lcont!=2) return false;

	return ture;
}

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

	if(checker(s)){
		cout<<"AC"<<"\n";
	}else{
		cout<<"WA"<<"\n";
	}

}

Compiler output:
a.cc: In function 'bool checker(std::string)':
a.cc:11:9: error: expected initializer before 'if'
   11 |         if(s[0]!='A') return false;
      |         ^~
a.cc:17:42: error: 'lcont' was not declared in this scope; did you mean 'cont'?
   17 |                 if('A'<=s[m]&&s[m]<='Z') lcont++;
      |                                          ^~~~~
      |                                          cont
a.cc:19:21: error: 'lcont' was not declared in this scope; did you mean 'cont'?
   19 |         if(cont!=1||lcont!=2) return false;
      |                     ^~~~~
      |                     cont
a.cc:21:16: error: 'ture' was not declared in this scope
   21 |         return ture;
      |                ^~~~
Language: C++

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

int main(){
	auto read_string 	=	[](){ string s; cin >> s; return s; };
	auto read_int       =   [](){ int tmp; cin >> tmp; return tmp; };
	auto read_char      =   [](){ char c; cin >> c; return c; };
	auto str_repeat	 	=	[](string a,int count){	string res = ""; for(size_t i = 0 ; i < count ; i++) res += a; return res;	};
	auto to_lower_case 	= 	[](string s){ string res=""; for(size_t i = 0 ; i < s.size() ; i++) res += tolower(s[i]); return res; };
	auto to_upper_case 	= 	[](string s){ string res=""; for(size_t i = 0 ; i < s.size() ; i++) res += toupper(s[i]); return res; };
	auto read_vec_int   =   [](int count){ vector<int> tmp(count); for(size_t i = 0 ; i < count ; i++) cin >> tmp[i]; return tmp; };
	auto title_case     =   [](string s) { string ret = ""; ret+=toupper(s[0]); ret += s.substr(1); return ret; };
	auto is_upper 		=   [](char c){ return (int)c >= (int)'A' && (int)c <= (int)'Z'; };
	auto is_lower		=   [](char c){ return (int)c >= (int)'a' && (int)c <= (int)'z'; };

	string s; cin >> s;
	int L = s.size();
	string ans = "AC";
	if(s[0]!='A'){
		ans = "WA";
	}

	int cnt = 0;
	for(size_t 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;
	return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:26:52: error: 'S' was not declared in this scope
   26 |                         if(i == 1 || i == L - 1 || S[i] != 'C'){
      |                                                    ^
Language: C++

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


int main(){
	auto read_string 	=	[](){ string s; cin >> s; return s; };
	auto read_int       =   [](){ int tmp; cin >> tmp; return tmp; };
	auto read_char      =   [](){ char c; cin >> c; return c; };
	auto str_repeat	 	=	[](string a,int count){	string res = ""; for(size_t i = 0 ; i < count ; i++) res += a; return res;	};
	auto to_lower_case 	= 	[](string s){ string res=""; for(size_t i = 0 ; i < s.size() ; i++) res += tolower(s[i]); return res; };
	auto to_upper_case 	= 	[](string s){ string res=""; for(size_t i = 0 ; i < s.size() ; i++) res += toupper(s[i]); return res; };
	auto read_vec_int   =   [](int count){ vector<int> tmp(count); for(size_t i = 0 ; i < count ; i++) cin >> tmp[i]; return tmp; };
	auto title_case     =   [](string s) { string ret = ""; ret+=toupper(s[0]); ret += s.substr(1); return ret; };
	auto is_upper 		=   [](char c){ return (int)c >= (int)'A' && (int)c <= (int)'Z'; };
	auto is_lower		=   [](char c){ return (int)c >= (int)'a' && (int)c <= (int)'z'; };

	string s = read_string();
    bool ok = s[0] == 'A';

    for(char c : s){
    	if(c!='A' && c!=='C'){
    		if(is_upper(c)){
    			ok = false;
    			break;
    		}
    	}
    }
    if(count_if(s.begin()+2,s.end()-2,[](char c){ return c == 'C'; }) > 1 ){
    	ok = false;
    }
    if(ok){
    	cout << "AC" << endl;
    }else{
    	cout <<  "WA" << endl;
    }
	return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:21:25: error: expected primary-expression before '=' token
   21 |         if(c!='A' && c!=='C'){
      |                         ^
Language: C++

#include<cstdio>
#include<cstring> 
char s[15];
int main()
{
	int num=0;
	scanf("%s",s+1);
	int lens=strlen(s+1);
	if(s[1]!='A') 
	{
		printf("WA\n");
		return 0;
	}
	if(s[2]=='C'||s[lena]=='C')
	{
		printf("WA\n");
		return 0;
	}
	for(int i=3;i<=lens-1;i++)
	{
		if(s[i]=='C')
		{
			num++;
			continue;
		}
		//if(s[i]=='A') continue;
		if(s[i]<97||s[i]>122)
		{
			printf("WA\n");
			return 0;
		}
	}
	if(num!=1) printf("WA\n");
	else printf("AC\n");
	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:25: error: 'lena' was not declared in this scope; did you mean 'lens'?
   14 |         if(s[2]=='C'||s[lena]=='C')
      |                         ^~~~
      |                         lens
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
string a;
  cin >> a;
  bool ax=false;
  int count=0;
  if (a[0]=='A')ax=true;
  for (int i=2;i<n-1;i++){
  	if (a[i]=='C') count++;
  }
  if (ax&&count==1)cout << "AC" <<endl;
  else cout <<"WA"<<endl;
}

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

#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  bool flag = true;
  if (s[0] == 'A' && islower(s[1]) && islower(s[s.size() - 1]) && islower(s[s.size - 2])) {
    for (int i = 3; i < s.size(); i++) {
      if (isupper(s[i]) && s[i] != 'C') flag = false;
    }
  }
  else flag = false;
  if (flag) cout << "AC" << endl;
  else cout << "WA" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:79: 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 '()' ?)
    7 |   if (s[0] == 'A' && islower(s[1]) && islower(s[s.size() - 1]) && islower(s[s.size - 2])) {
      |                                                                             ~~^~~~
      |                                                                                   ()
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  bool flag = true;
  if (s[0] == 'A' && islower(s[1]) && islower(s[s.size() - 1] && islower(s[s.size - 2]))) {
    for (int i = 3; i < s.size(); i++) {
      if (isupper(s[i]) && s[i] != 'C') flag = false;
    }
  }
  else flag = false;
  if (flag) cout << "AC" << endl;
  else cout << "WA" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:78: 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 '()' ?)
    7 |   if (s[0] == 'A' && islower(s[1]) && islower(s[s.size() - 1] && islower(s[s.size - 2]))) {
      |                                                                            ~~^~~~
      |                                                                                  ()
Language: C++

#include<iostream>
#include<string>
#include<iomanip>
using namespace std;
int main(){
  string s;
  cin >> s;
  int x,z;
  int y = s.lenth()-1;
  if (s[0] == 'A'){
    x=1;
  }
  for(int i = 2; i < y; i++){
    if (s[i] == 'C'){
    	if (x=1){x=2;z=i;}
    }
    if (s.length - z - s[0]){cout << AC;}
  }
  else{cout << WA;}
  if ()
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'lenth'; did you mean 'length'?
    9 |   int y = s.lenth()-1;
      |             ^~~~~
      |             length
a.cc:17:11: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   17 |     if (s.length - z - s[0]){cout << AC;}
      |         ~~^~~~~~
      |                 ()
a.cc:17:38: error: 'AC' was not declared in this scope
   17 |     if (s.length - z - s[0]){cout << AC;}
      |                                      ^~
a.cc:19:3: error: 'else' without a previous 'if'
   19 |   else{cout << WA;}
      |   ^~~~
a.cc:19:16: error: 'WA' was not declared in this scope
   19 |   else{cout << WA;}
      |                ^~
a.cc:20:7: error: expected primary-expression before ')' token
   20 |   if ()
      |       ^
Language: C++

#include <iostream>
#include <cstdio>
#include <fstream>
#include <algorithm>
#include <cmath>
#include <deque>
#include <vector>
#include <queue>
#include <string>
#include <cstring>
#include <map>
#include <stack>
#include <set>
#include <list>
#define INF 0x3f3f3f3f
#define maxn 105000
#define maxnn 6000
#define juzheng 300
#define line cout << "-------------------------" << endl;
#define PI acos(-1.0)
#define mem(a,b) memset(a,b,sizeof(a))
#define fill_(a,b,n) fill(a,a + n,b)
#define esp 1e-9
 
#define ri(n) scanf("%d",&n)
#define ri2(a,b) scanf("%d %d",&a,&b)
#define ri3(a,b,c) scanf("%d %d %d",&a,&b,&c)
#define rd(n) scanf("%lf",&n)
#define rd2(a,b) scanf("%lf %lf",&a,&b)
#define rd3(a,b,c) scanf("%lf %lf %lf",&a,&b,&c)
#define rl(n) scanf("%lld",&n)
#define rl2(a,b) scanf("%lld %lld",&a,&b)
#define rl3(a,b,c) scanf("%lld %lld %lld",&a,&b,&c)
#define rs(str) scanf("%s",str)
#define pr(n) cout << n << endl
#define ll long long
#define int64 __int64

using namespace std;

const ll mod = 1e9 + 7;

//Date:2018-8-5
//Author：HarryBlackCat

string str;

int main() {
	//cin.sync_with_stdio(false);//降低cin，cout时间
	while(cin >> str){
		if(str[0] != 'A'){
			puts("WA"); 
		}
		else{
			int counter1 = 0,counter2 = 0;
			bool flag = true;
			for(int i = 1;i <= 2;i++){
				if(str[i] >= 'A' && str[i] <= 'Z'){
					if(str[i] == 'C'){
						counter1++;
					}
					else{
						flag = false;
						break;
					}
				}
			}
			
			if(!flag){
				puts("WA");
				continue;
			}
			
			for(int i = 1;i < str.size();i++){
				if(str[i] >= 'A' && str[i] <= 'Z'){
					if(str[i] == 'C'){
						counter2++;
					}
					else{
						flag = false;
						break;
					}
				}
			}
			
			if(!flag){
				puts("WA");
				continue;
			}
			
			if(counter1 == 1 counter2 != 1)
				puts("AC");
			else if(counter2 == 1 counter1 != 1)
				puts("AC");
			else
				puts("NO");
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:91:41: error: expected ')' before 'counter2'
   91 |                         if(counter1 == 1 counter2 != 1)
      |                           ~             ^~~~~~~~~
      |                                         )
a.cc:93:46: error: expected ')' before 'counter1'
   93 |                         else if(counter2 == 1 counter1 != 1)
      |                                ~             ^~~~~~~~~
      |                                              )
Language: C++

#include <iostream>
using namespace std;
bool ans = false;
ll u;
string s;
int main(void){
    // Your code here!
    cin >> s;
    if (s[0] != 'A') ans = false;
    ll cou = 0;
    for (ll i = 1; i < s.length(); i++) {
        if ('Z' - s[i] >= 0) cou++;
        if (s[i] == 'C') u = i;
    }
    if (cou != 1) ans = false;
    if (u < 2 || u >= len - 2) ans = false;
    if (ans) cout << "Yes" << endl;
    else cout << "No" << endl;
}


Compiler output:
a.cc:4:1: error: 'll' does not name a type
    4 | ll u;
      | ^~
a.cc: In function 'int main()':
a.cc:10:5: error: 'll' was not declared in this scope
   10 |     ll cou = 0;
      |     ^~
a.cc:11:12: error: expected ';' before 'i'
   11 |     for (ll i = 1; i < s.length(); i++) {
      |            ^~
      |            ;
a.cc:11:20: error: 'i' was not declared in this scope
   11 |     for (ll i = 1; i < s.length(); i++) {
      |                    ^
a.cc:12:30: error: 'cou' was not declared in this scope
   12 |         if ('Z' - s[i] >= 0) cou++;
      |                              ^~~
a.cc:13:26: error: 'u' was not declared in this scope
   13 |         if (s[i] == 'C') u = i;
      |                          ^
a.cc:15:9: error: 'cou' was not declared in this scope
   15 |     if (cou != 1) ans = false;
      |         ^~~
a.cc:16:9: error: 'u' was not declared in this scope
   16 |     if (u < 2 || u >= len - 2) ans = false;
      |         ^
a.cc:16:23: error: 'len' was not declared in this scope; did you mean 'mblen'?
   16 |     if (u < 2 || u >= len - 2) ans = false;
      |                       ^~~
      |                       mblen
Language: C++

#include<bits/stdc++.h>
#define pb push_back
#define ll long long
#define FOR(i,a,n) for(int i = a; i < n; i++)
using namespace std;
 
const int N = 1e5+123;
ll a[N];
const long double PI = 3.14159265358979323846;

bool ok(string x)
{
    int c=0,a=0;
    sort(x.begin(),x.end());
    for(int i = 0; i < x.size();i++)
        if(x[i]=='C')c++;
        if(x[i]=='A')a++;
    return c==1 && a==1;
}

bool ok1(string x)
{
    sort(x.begin(),x.end());
    for(int i = 2; i<x.size();i++)
        for(char j = 'a'; j<='z';j++)
            if(x[i]==j)
                return 1;
    return 0;
}
int main()
{
    string s;
    cin >> s;
    int c =0;
    if(s[0] == 'A')
    {
        bool good=0;
        for(int i = 2; i<=s.size() - 2; i++)
            //cout << s[i];
            if(s[i] == 'C'){
                good = 1;
            }
        if(ok(s)&& good&&ok1(s))
            puts("AC");
        else
            puts("WA");
            
    }else
        puts("WA");
    return 0;  
}


Compiler output:
a.cc: In function 'bool ok(std::string)':
a.cc:17:14: error: 'i' was not declared in this scope
   17 |         if(x[i]=='A')a++;
      |              ^
Language: C++

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:25: error: ambiguous overload for 'operator=' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int')
    7 |         if(s[0]=='A') s=0;
      |                         ^
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:817:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
  817 |       operator=(const basic_string& __str)
      |       ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:828:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(const _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
  828 |       operator=(const _CharT* __s)
      |       ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:840:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(_CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
  840 |       operator=(_CharT __c)
      |       ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:858:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
  858 |       operator=(basic_string&& __str)
      |       ^~~~~~~~
a.cc:13:31: error: 't' was not declared in this scope
   13 |                 if(s[i]=='C') t++;
      |                               ^
a.cc:18:42: error: 't' was not declared in this scope
   18 |                 if(s[i]>='a'&&s[i]<='s') t++;
      |                                          ^
Language: C++

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

int main(){
	char moji[10]={'0','0','0','0','0','0','0','0','0','0'};
	int ct=0;
	int ctC=0;
	int ctx=0;
	for(int t=0;t<10;t++){
		scanf("%c",&moji[t]);
		if(moji[t]=='0'){break;}
		ct=t;
	}
	for(int a=2;a<(ct-1);a++){
		if(moji[a]=='C'){
			ctC++;
		}
	for(int b=2;b<ct;b++)	{
		if ('A'<= moji[a] && 'Z'>= moji[a]){
			ctx++;
		}
	}

	if(moji[0]=='A'){
		if(ctx==t-1&&ctC==1){
			cout<<"AC";
		}else{
			cout<<"WA";
		}

	}else{
		cout<<"WA";
	}

	return 0;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:25: error: 't' was not declared in this scope
   27 |                 if(ctx==t-1&&ctC==1){
      |                         ^
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 if(judge==false){
		printf("WA");
    }
	return 0;
}


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