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

#include<bits/stdc++.h>
using namespace std;
int main(){
  string s;cin>>s;
  if(s.at(0)=='A'){
    int p=0;
    for(int i=2;i<s.size()-1;i++){
      if(s.at(i)=='C')p++;
    }
    if(p==1){
      if(s.at(1)>='a'&&s.at(1)<='z'){
        int q=0;
        for(int i=2;i<s.size-1;i++){
          if(s.at(i)!='C'&&s.at(i)>='A'&&s.at(i)<='Z')q++;
        }
        if(q==0)cout<<"AC"<<endl;
        else cout<<"WA"<<endl;
      }
      else cout<<"WA"<<endl;
    }
    else cout<<"WA"<<endl;
  }
  else cout<<"WA"<<endl;
}
        

Compiler output:
a.cc: In function 'int main()':
a.cc:13:25: 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 '()' ?)
   13 |         for(int i=2;i<s.size-1;i++){
      |                       ~~^~~~
      |                             ()
Language: C++

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


bool islower(char x)
{
  int n=x[i]-'a';
  return (n>=0 && n<26);
}

int main()
{
  string x;
  cin>>x;
  int n=x.size();
  if(x[0]=='A')
  {
    bool flag=false;
    int j;
    for(int i=2;i<n-1;i++)
    {
      if(x[i]=='C') flag=true; j=i;
    }
    if(flag)
    {
      for(int i=1;i<n;i++)
      {
        if(i==j) continue;
        if(!islower(x[i]))
        {
          printf("WA");
          return 0;
        }
      }
      printf("AC");
      return 0;
    }
    else printf("WA");
    return 0;
  }

Compiler output:
a.cc: In function 'bool islower(char)':
a.cc:7:11: error: 'i' was not declared in this scope
    7 |   int n=x[i]-'a';
      |           ^
a.cc: In function 'int main()':
a.cc:40:4: error: expected '}' at end of input
   40 |   }
      |    ^
a.cc:12:1: note: to match this '{'
   12 | {
      | ^
Language: Java

import java.util.*;
class Main {
  public static void main(String [] args) {
    Scanner in = new Scanner(System.in);
    String str = in.nextLine();
    in.close();
    String ans = "AC";
    int countC = 0;
    if (str.charAt(0) != 'A') ans = "WA";
    if (str.charAt(1) == 'C') ans = "WA";
    if (str.charAt(str.length() - 1) == 'C') ans = "WA";
    for (char c : str.toCharArray()) {
      if (c == 'C') {
        countC++;
      }
      if (countC > 1) {
        ans = "WA";
        break;
      }
    }
    if (countC == 0) {
      ans =="WA";
    }
    System.out.println(ans);
  }
}
    
      
      

Compiler output:
Main.java:22: error: not a statement
      ans =="WA";
          ^
1 error
Language: Java

import java.util.*;
class Main {
  public static void main(String [] args) {
    Scanner in = new Scanner(System.in);
    String str = in.nextLine();
    in.close();
    String ans = "AC"
    int countC = 0;
    if (str.charAt(0) != 'A') ans = "WA";
    if (str.charAt(1) == 'C') ans = "WA";
    if (str.charAt(str.length() - 1) == 'C') ans = "WA";
    for (char c : str.toCharArray()) {
      if (c == 'C') {
        countC++;
      }
      if (countC > 1) {
        ans = "WA";
        break;
      }
    }
    if (countC == 0) {
      ans == "WA";
    }
    System.out.println(ans);
  }
}
    
      
      

Compiler output:
Main.java:7: error: ';' expected
    String ans = "AC"
                     ^
Main.java:22: error: not a statement
      ans == "WA";
          ^
2 errors
Language: C++

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

using ll = long long;
#define ld long double
#define ull unsigned long long int

#define rep(i, n) for (int i = 0; i < (int)(n); i++)  // (i, 10) i=0～i=9まで
#define repr(i, n) for (int i = n; i >= 0; i--)   // (i, 10) i=10～i=0まで
#define FOR(i, m, n) for (int i = m; i < n; i++)  // (i, 3, 10) i=3～i=9まで
#define SORT(v, n) sort(v, v + n);
#define VSORT(v) sort(v.begin(), v.end());
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define sz(x) ((int)(x).size())
#define pb push_back
#define ret return

typedef pair<int, int>    pii;
typedef vector<int>       vi;
typedef vector<vi>        vii;
typedef vector<long long> vl;

// 総数を1000000007で割った余り
const long long mod = 1e9 + 7;
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))

int main() {
    // cin.tie(0);
    // ios::sync_with_stdio(false);
    // cout << fixed << setprecision(5);

    // 入力
    string s;
    cin >> s;

    // 処理
    int  cnt = 0;
    bool ans = true;
    if (s[0] != 'A') {
        ans = false;
    } else {
        cnt++
    }

    for (int i = 1; i < s.size(); i++) {
        if (isupper(s[i])) {
            if (i == 1 || i == s.size() - 1 || s[i] != 'C') {
                cnt += 100;
            } else if (s[i] == 'C') {
                cnt++;
            }
        }
    }

    for (int i = 0; i < s.size(); i++) {
        islower(s[i]);
        cnt++;
    }

    // 出力
    cout << (cnt == s.size() + 2 ? "AC" : "WA") << endl;

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:45:14: error: expected ';' before '}' token
   45 |         cnt++
      |              ^
      |              ;
   46 |     }
      |     ~
Language: C++

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

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

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

#include <iostream>
#include<algorithm>
#include<string>
#include<vector>
#define _USE_MATH_DEFINES
#include <math.h>
#include <iomanip>
#include <stdio.h>
#include <numeric>
#include <cmath>
#include <limits>
using namespace std;


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

	cout << (Cnum==1   ? "AC" : "WA") << endl;
}


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

#include <iostream>
#include<algorithm>
#include<string>
#include<vector>
#define _USE_MATH_DEFINES
#include <math.h>
#include <iomanip>
#include <stdio.h>
#include <numeric>
#include <cmath>
#include <limits>
using namespace std;


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

Compiler output:
a.cc: In function 'int main()':
a.cc:25:30: error: expected primary-expression before '?' token
   25 |         cout << (Cnum==1 &&  ? "AC" : "WA") << endl;
      |                              ^
Language: C++

#include <iostream>
#include <string>
#define rep(i, n) for(int i = 0; i < n; ++i)
using namespace std;

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

  string s; cin >> s;
  bool flag = true;

  if(s[0]!='A') flag = false;
  if(count(s.begin()+2, s.end()-1, 'C')!= 1) flag = false;
  int cnt = 0;
  rep(i, s.length()) {
    if(s[i] < 'a') ++cnt;
    if(cnt > 2) flag = false;
  }

  cout << (flag ? "AC" : "WA") << '\n';
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:6: error: 'count' was not declared in this scope
   14 |   if(count(s.begin()+2, s.end()-1, 'C')!= 1) flag = false;
      |      ^~~~~
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <cmath>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <math.h>
using namespace std;

int main() {
	string A;
	cin >> A;
	int N = A.size();



	int ans = 0;
	for (int i = 2; i < N - 1; i++){
		if (A[0] == 'A' && A[i] == 'C') {
			ans++;
		}
	}
    int cnt=0;
    for(int i=0;i<N;i++)if(isupper(A[i])cnt++;
	if (ans != 1||cnt!=2) {
		cout << "WA" << endl;
	}
	else {
		cout << "AC" << endl;
	}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:41: error: expected ';' before 'cnt'
   27 |     for(int i=0;i<N;i++)if(isupper(A[i])cnt++;
      |                                         ^~~
      |                                         ;
a.cc:28:9: error: expected primary-expression before 'if'
   28 |         if (ans != 1||cnt!=2) {
      |         ^~
a.cc:27:47: error: expected ')' before 'if'
   27 |     for(int i=0;i<N;i++)if(isupper(A[i])cnt++;
      |                           ~                   ^
      |                                               )
   28 |         if (ans != 1||cnt!=2) {
      |         ~~                                     
a.cc:34:1: error: expected primary-expression before '}' token
   34 | }
      | ^
Language: C++

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

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

  bool check(strring s){
    if(s[0]!='A') return false;
    int c=0;
    for(int i=2; i<s.size()-1);i++){
      if(s[i]=='C'){
        c++;
      }
    }

    if(c!='1') return false;
    int upper=0;
    for(int j=0; j<s.size();j++){
      if(s[j]>='A' && s[j]<='Z'){
        upper++;
      }
    }

    if(upper!=2) return false;
    return ture;
  }
  
  
  }


Compiler output:
a.cc: In function 'int main()':
a.cc:7:6: error: 'check' was not declared in this scope
    7 |   if(check(s)){
      |      ^~~~~
a.cc:13:14: error: 'strring' was not declared in this scope
   13 |   bool check(strring s){
      |              ^~~~~~~
Language: C++

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

int main() {
   string S;
   cin >> S;
   int flag = 0;

   if(S[0] != 'A') {
       flag = 1;
   }

   int counter = 0;
   for(int i = 2; i <= S.size()-2; i++) {
       if(S[i] == 'C') {
           counter++;
       }
   }
   if(counter != 1) {
       flag = 1;
   }

   for(int i = 1; i <= N-1; i++) {
       if(S[i] == 'C') {
           continue;
       }
       if(islower(S[i]) == 0) {
           flag = 1;
           break;
       }
   }

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

    cout << endl;
    return 0;
}

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

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

int main() {
  string S;
  cin >> S;
  bool ans;
  if(S[0]!='A')ans=false;
  else{
    int c=0;
    for(i=2;i<S.length()-1;i++){
      if(S[i]=='C')c+=1;
      else if((S[i]>= 'A') && (S[i]<='Z')){
        ans=false;
      }
    }
    if(c!=1)ans=false;
  }
  if(ans)cout "AC";
  else cout "WA";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: 'i' was not declared in this scope
   11 |     for(i=2;i<S.length()-1;i++){
      |         ^
a.cc:19:14: error: expected ';' before string constant
   19 |   if(ans)cout "AC";
      |              ^~~~~
      |              ;
a.cc:20:12: error: expected ';' before string constant
   20 |   else cout "WA";
      |            ^~~~~
      |            ;
Language: C++

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

int main() {
    string S;
    cin >> S;
    int cnt = 0;
    int index = 0;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:25:22: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   25 |             if (S[i] == "C" ) {
Language: C++

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

int main() {
    string S;
    cin >> S;
    int cnt = 0;
    int index = 0;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:24: error: expected primary-expression before '<' token
   11 |     for (int i = 2; i =< S.size() -2 ; i++) {
      |                        ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:37: error: 'check' was not declared in this scope
    8 |     if(S.at(i)>='A' && S.at(i)<='Z')check++;
      |                                     ^~~~~
a.cc:12:6: error: 'check' was not declared in this scope
   12 |   if(check!=2)count=0;
      |      ^~~~~
Language: C++

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

#define REP(i, n) for(int i=0; i<n;i++)
#define REPR(i, n) for(int i=n-1 ; i>=0; i--)
#define FOR(i, m, n) for(int i=m; i<n; i++)

#define INF 2e9
#define ll long long

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

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

    cout<<"AC"<<endl;

    return 0;
}

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

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

#define REP(i, n) for(int i=0; i<n;i++)
#define REPR(i, n) for(int i=n-1 ; i>=0; i--)
#define FOR(i, m, n) for(int i=m; i<n; i++)

#define INF 2e9
#define ll long long

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

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

    cout<<"AC"<<endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:20: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   24 |             if(s[i]=="C"){
a.cc:49:2: error: expected '}' at end of input
   49 | }
      |  ^
a.cc:11:11: note: to match this '{'
   11 | int main(){
      |           ^
Language: C++

#include<iostream>
#include<algorithm>
#include<cmath>
using namespace std;
int main() {
  int cnt1=0,cnt2=0;
  string s;
  cin >> s;
  for(int i=2; i<s.length()-1; i++) {
    if(s[i]=='C') {
      cnt1++;
    }
  }
  for(int i=0; i<s.length(); i++) {
    if(isupper(s[i]));
    cnt2++;
  }
  if(s[0]=='A'&&cnt1=1&&cnt2==2) {
    cout << "AC" << endl;
  }
  else {
    cout << "WA" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:15: error: lvalue required as left operand of assignment
   18 |   if(s[0]=='A'&&cnt1=1&&cnt2==2) {
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:11: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    7 |   if(s[0] == "A"){
a.cc:9:9: error: 'i' was not declared in this scope
    9 |     for(i=2;i<s.size()-1;i++){
      |         ^
Language: C++

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

int main(){
    string S; cin >> S;
    if(S.at(0)!='A'){
        cout << "WA" << endl; return 0;
    }
    int cnt=0;
    for(int i=2;i<S.size()-1; i++){
        if(S.at(i)=='c') {cnt++;S.at(i)=='c'}
    }
    if(cnt!=1) {cout << "WA" << endl; return 0;}
    for(int i=1; i<S.size(); i++){
        if( (S.at(i) -'a') >25  || (S.at(i)-'a') <0){
            cout << "WA" << endl; return 0;
        }
    }
    cout << "AC" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:45: error: expected ';' before '}' token
   11 |         if(S.at(i)=='c') {cnt++;S.at(i)=='c'}
      |                                             ^
      |                                             ;
Language: C++

#include<iostream>
#include<vector>

using namespace std;

int main(){
  string S;
  cin >> S;
  string ans = "DEFAULT";
  if(S[0] != 'A') ans = "WA";
  int Ccount = 0;
  for(int i = 2; i < S.size(); i++){
    if(S[i] == 'C') Ccount++;
  }
  if(Ccount != 1) ans = "WA";
  if(isupper(S[1])) ans = "WA";
  for(int i = 2; i < S.size(); i++){
    if(isupper(S[i]) && S[i] != 'C') ans = "WA";
  }
  if(ans = "DAFAULT") ans = "AC";
  cout << ans;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:10: error: could not convert 'ans.std::__cxx11::basic_string<char>::operator=(((const char*)"DAFAULT"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   20 |   if(ans = "DAFAULT") ans = "AC";
      |      ~~~~^~~~~~~~~~~
      |          |
      |          std::__cxx11::basic_string<char>
Language: C++

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

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

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

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

bool ok(string &str){
	if(str[0]!='S') return fales;
	int num=0;
	int id=-1;
	for(int i = 2;i<=str.size()-2;i++){
		if(str[i]=='C') {++num;id=i;}
	}
	if(num!=1) return false;
	for(int i=1;i<str.size();i++){
		if(i==id) continue;
		if(str[i]<'a' || str[i]>'z') return false;
	}
	return true;
}

int main(){
		string s;
		cin>>s;
		
		if(ok(s)) cout<<"AC"<<endl;
		else cout<<"WA"<<endl;
    
    return 0;

}


Compiler output:
a.cc: In function 'bool ok(std::string&)':
a.cc:5:32: error: 'fales' was not declared in this scope
    5 |         if(str[0]!='S') return fales;
      |                                ^~~~~
Language: C++

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

int main() {
  	string s;
	cin >> s;
	bool check1 = false;
	bool check2 = false;
	bool check3 = false;
	int n = s.size();
	int count_C = 0;
    int count_large = 0;
  
	if (s.at(0) == 'A') {
		check1 = true;
	}
  
  
	for (int i = 2; i < n - 1; i++) {
		if (s.at(i) == 'C') {
			count_C++;
            at_C=i;
		}
	}
	if (count_C == 1) {
		check2 = true;
	}
  
  
	for (int i = 0; i < n; i++) {
		if (s.at(i) >= 'A' &&  s.at(i) <= 'Z'){
        count_large ++;
        }
	}
    if(count_large == 2){
        check3 = true;
    }
  
	if (check1 && check2 && check3) {
		cout << "AC" << endl;
	}
	else {
		cout << "WA" << endl;
	}

}







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

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

int main() {
  	string s;
	cin >> s;
	bool check1 = false;
	bool check2 = false;
	bool check3 = false;
	int n = s.size();
	int count_C = 0;
	if (s.at(0) == 'A') {
		check1 = true;
        s.at(0) = '';
	}
  
  
	for (int i = 2; i < n - 1; i++) {
		if (s.at(i) == 'C') {
			count_C++;
            s.at(i) = '';
		}
	}
	if (count_C == 1) {
		check2 = true;
	}
  
  
	for (int i = 0; i < n-count_C-1; i++) {
		if (s.at(i) >= 'A' &&  s.at(i) <= 'Z') {
			break;
		}
		check3 = true;
	}
	if (check1 && check2 && check3) {
		cout << "AC" << endl;
	}
	else {
		cout << "WA" << endl;
	}

}





Compiler output:
a.cc:14:19: error: empty character constant
   14 |         s.at(0) = '';
      |                   ^~
a.cc:21:23: error: empty character constant
   21 |             s.at(i) = '';
      |                       ^~
Language: C++

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

int main() {
  	string s;
	cin >> s;
	bool check1 = false;
	bool check2 = false;
	bool check3 = false;
	int n = s.size();
	int count_C = 0;
	if (s.at(0) == 'A') {
		check1 = true;
        s -= s.at(0);
	}
  
  
	for (int i = 2; i < n - 1; i++) {
		if (s.at(i) == 'C') {
			count_C++;
            s-= s.at(0);
		}
	}
	if (count_C == 1) {
		check2 = true;
	}
  
  
	for (int i = 0; i < n-count_C; i++) {
		if (s.at(i) >= 'A' &&  s.at(i) <= 'Z') {
			break;
		}
		check3 = true;
	}
	if (check1 && check2 && check3) {
		cout << "AC" << endl;
	}
	else {
		cout << "WA" << endl;
	}

}




Compiler output:
a.cc: In function 'int main()':
a.cc:14:11: error: no match for 'operator-=' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'})
   14 |         s -= s.at(0);
      |         ~~^~~~~~~~~~
a.cc:21:14: error: no match for 'operator-=' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'})
   21 |             s-= s.at(0);
      |             ~^~~~~~~~~~
Language: C++

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

int main(){
    string s;   cin>>s;
    string ans="WA";

    if(s[0]=='A'&&s[s.length()-1]-'a'>=0){
        int Cnum=0;
        for(int i=2;i<s.length()-1;i++){tCo
            if(s[i]=='C'){
                Cnum++;
            }
            else if(s[i]-'a'<0){
                ans="WA";
                break;
            }

            if(Cnum==1){
                ans="AC";
            }else ans="WA";
        }
        if(s[1]-'a'<0)ans="WA";
    }

    cout<<ans<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:41: error: 'tCo' was not declared in this scope
   10 |         for(int i=2;i<s.length()-1;i++){tCo
      |                                         ^~~
a.cc:14:13: error: 'else' without a previous 'if'
   14 |             else if(s[i]-'a'<0){
      |             ^~~~
Language: C++

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



int main()
{
	int Achecker,Cchecker,numBigcharS,leg;
	string s;
	cin >> s;
	Achecker = s.find("A");
	Cchecker = s.find("C");
	leg = s.length;
	
	for (int i; i < s.length; i++) numBigcharS += islower(s[i]) == 0 ? 0 : 1;
	if (Achecker == 1 && numBigcharS == 2 && (3 < Cchecker && leg - 2)) { cout << "AC" << endl; }
	else { cout << "WA" << endl; }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:17: error: cannot convert 'std::__cxx11::basic_string<char>::length' from type 'std::__cxx11::basic_string<char>::size_type (std::__cxx11::basic_string<char>::)() const noexcept' {aka 'long unsigned int (std::__cxx11::basic_string<char>::)() const noexcept'} to type 'int'
   18 |         leg = s.length;
      |                 ^~~~~~
a.cc:20:27: 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 '()' ?)
   20 |         for (int i; i < s.length; i++) numBigcharS += islower(s[i]) == 0 ? 0 : 1;
      |                         ~~^~~~~~
      |                                 ()
Language: C++

#include <iostream>
using namespace std;

int main() {
  string s;
  cin >> s;
  int l = s.size();
  string y = "AC";
  
  if(s[0] != 'A'){
    y = "WA";
  }
  
  int count = 0;
  int x = 0;
  int z = 0;
  
  for(int i = 0; i< l; i++){
    if(0 < i && i < l -1){
      if(s.at(i) == 'C'){
        count++;
      }
    }
    if(isupper(s[i])){
      x++;
    }
    if(i < 2 || i = l-1){
      if(s[i] == 'C'){
        z++;
      }
    }
  }
  
  if(count != 1 || x != 2 || z != 1){
    y = "WA";
  }
  
  cout << y << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:14: error: lvalue required as left operand of assignment
   27 |     if(i < 2 || i = l-1){
      |        ~~~~~~^~~~
Language: C++

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

int main() {
	string s;
	cin>>s;
	bool valid=false;
	int cnt=0;
	for(int i=2;i<s.length();i++)
	{ if(s[i]=='C'&&i!=s.length()-1){cnt++;}}
	if(cnt==1){valid=true;} else { cout<<"WA"; return 0;}
	
	if(valid==true&&s[0]=='A'&&s[1]!='C')
	{
	int cc=0;
	for(int i=1;i<s.length();i++)
	{
		if(islower(s[i]))
		{
			cc++;
		}
	}
	} else {cout<<"WA";}
	if(cc==s.length()-2){cout<<"AC";}else{cout<<"WA";}
	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:12: error: 'cc' was not declared in this scope
   25 |         if(cc==s.length()-2){cout<<"AC";}else{cout<<"WA";}
      |            ^~
Language: C++

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

int main()
{
  char s[11];
  int cnt=0, i;
  cin >> s;
  if (s[0] != 'A') {
    cnt++;
    cout << "WA" << endl;
  }
  int c = 0;
  for (i = 1; i < strlen(s); i++) {
    if (s[i] == 'C' && i >= 2 && i < strlen(s)-1)
      c++;
    else if (s[i] < 'a' || s[i] > 'z'))
      c = 2;
  }
  if (c != 1) {
    cnt++;
    cout << "WA" << endl;
  }
  if (cnt == 0)
    cout << "AC" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:39: error: expected primary-expression before ')' token
   18 |     else if (s[i] < 'a' || s[i] > 'z'))
      |                                       ^
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 cnt = 0;
        for(int i =0; i<s.length(); i++){
            if(Character.isUpperCase(s.charAt(i))){
                cnt++;
            }
        }
        if(s.charAt(0)=='A'){
            for(int i =2; i<=s.length-2;i++){
                if(s.charAt(i)=='C'){
                    if(cnt==2){
                        System.out.println("AC");
                        return;
                    }
                }    
            }
        }
        System.out.println("WA");
    }
}


Compiler output:
Main.java:13: error: cannot find symbol
            for(int i =2; i<=s.length-2;i++){
                              ^
  symbol:   variable length
  location: variable s of type String
1 error
Language: C++

#include <vector>
#include <queue>
#include <stack>
#include <algorithm>
#include <iostream>
#include <string>
#include <tuple>
#include <set>
#include <map>
#include <unordered_map>
#include <complex>
#include <iomanip>
#include <cmath>
using namespace std;
typedef long long ll;

int main()
{
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    
    string s, ans = "AC";
    cin >> s;
    int cnt = 0;

    if (s[0] != 'A') ans = "WA";
    int cnt = 0;
    for (int i = 1; i < s.size(); i++) {
        if (isupper(s[i])) {
            if (i == 1 || i == s.size() - 1 || s[i] != 'C') ans = "WA";
            cnt++;
        }
    }
    if (cnt != 1) ans = "WA";
    cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:9: error: redeclaration of 'int cnt'
   27 |     int cnt = 0;
      |         ^~~
a.cc:24:9: note: 'int cnt' previously declared here
   24 |     int cnt = 0;
      |         ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
const long long mod = pow(10, 9) + 7;
const long long MOD = 998244353;
const long long INF = 1LL << 60;
const int inf = pow(10, 9) + 7;
template <class T> bool chmin(T& a, T b) {if (a > b) {a = b; return true;} return false;}
template <class T> bool chmax(T& a, T b) {if (a < b) {a = b; return true;} return false;}
int divCeil(int A, int B) {return (A + (B - 1)) / B;}
long long divCeil(long long A, int B) {return (A + (B - 1)) / B;}
long long divCeil(int A, long long B) {return (A + (B - 1)) / B;}
long long divCeil(long long A, long long B) {return (A + (B - 1)) / B;}

int main()
{
  string S;
  cin >> S;
  int N = S.size();
  
  string ans = "AC";
  
  if (S.at(0) != 'A') ans = "WA";
  if (isupper(S.at(1)) ans = "WA";
  
  int C = 0;
  
  for (int i = 2; i < N - 1; i++)
  {
    if (isupper(S.at(i)))
    {
      if (C >= 1) {ans = "WA"; break;}
      if (S.at(i) != 'C') {ans = "WA"; break;}
      C++;
    }
  }
  if (C == 0) ans = "WA";
  
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:23: error: expected ';' before 'ans'
   23 |   if (isupper(S.at(1)) ans = "WA";
      |                       ^~~~
      |                       ;
a.cc:25:12: error: expected ')' before ';' token
   25 |   int C = 0;
      |            ^
      |            )
a.cc:23:6: note: to match this '('
   23 |   if (isupper(S.at(1)) ans = "WA";
      |      ^
a.cc:31:11: error: 'C' was not declared in this scope
   31 |       if (C >= 1) {ans = "WA"; break;}
      |           ^
a.cc:33:7: error: 'C' was not declared in this scope
   33 |       C++;
      |       ^
a.cc:36:7: error: 'C' was not declared in this scope
   36 |   if (C == 0) ans = "WA";
      |       ^
Language: C++

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

int main(){
string a;
cin>>a;
 int b,c;
  b=a.size();
  c=100000;
 if(a[0]!='A'){
   cout<<"WA"<<endl;
 }
  else{
    for(int i=2;i<b-1;i++){
    if(a[i]=='C'){
      c=i;
      for(int j=i+1;j<b-1;j++){
      if(a[j]=='C'){
        c=100000;
      }
      }
      break;
    } 
    }
  if(c==100000){
      cout<<"WA"<<endl;
  }
    else{
      for(int i=1;i<b;i++){
      if(i!=c&&a[i]<='Z'){
          cout<<"WA"<<endl;
        break;
      
      }
        if(i==b-1){
        cout<<"AC"<<endl;
        }
      }

  }
}



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

#include <iostream>
#include <string>
#include <ctype.h>

using namespace std;

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

    int c_count = 0;
    int c_index;
    int a_count = 0;
    int a_index;

    int upper_count = 0;
    for(int i=0; i<s.length(); i++){
        if(s[i] == 'A'){
            a_index = i;
            a_count++;
        }
        if(s[i] == 'C'){
            c_index = i;
            c_count++;
        }
        if(isupper(s[i])){
            upper_count ++;
        }
    }

    if(c_count == 1 && c_index =>2 && c_index<s.length() && a_count == 1 && a_index ==0 && upper_count == 2){
        cout<<"AC"<<endl;
    }else{
        cout<<"WA"<<endl;
    }

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:31:33: error: expected primary-expression before '>' token
   31 |     if(c_count == 1 && c_index =>2 && c_index<s.length() && a_count == 1 && a_index ==0 && upper_count == 2){
      |                                 ^
Language: C++

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

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

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

#include <iostream>

using namespace std;

int main(){
  string s; cin >> s;
  for (string i : s){
    cout << i << endl;
  }
  retutn 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:19: error: conversion from 'char' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
    7 |   for (string i : s){
      |                   ^
a.cc:10:3: error: 'retutn' was not declared in this scope
   10 |   retutn 0;
      |   ^~~~~~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:11:35: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |                 if(i == 0 && S[i] != "A"){
a.cc:14:36: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 |                 if(i == 1 && !("a" <= S[i] && S[i] <= "z")){
a.cc:14:52: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 |                 if(i == 1 && !("a" <= S[i] && S[i] <= "z")){
a.cc:18:33: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   18 |                         if(S[i] == "C"){
a.cc:24:40: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   24 |                         }else if(!("a" <= S[i] && S[i] <= "z")){
a.cc:24:56: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   24 |                         }else if(!("a" <= S[i] && S[i] <= "z")){
Language: C++

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

int main(){
	string s;
	cin >> s;
	if (s[0] != 'A') {cout << "WA" << endl; return 0;}
	ll pos = s.find('C');
	if (!((pos >= 2) && (pos <= s.size()-1))){cout << "WA" << endl; return 0;}
	else if ()
	FOR(i, 1, s.size()){
		if (i == pos){continue;}
		else if (!((s[i]>='a') && (s[i]<='z'))) {cout << "WA" << endl; return 0;}
	}
	cout << "AC" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:18: error: expected primary-expression before ')' token
   13 |         else if ()
      |                  ^
Language: C

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

int main(void){
    char S[11];
    int c = 0;
    int small = 0;
    scanf("%s", S);
    for(int i = 2; i < strlen(S) ; i++){
        if((i < strlrn(S)-1) && S[i] == 'C') c += 1;
        else if('a' > S[i] && S[i] > 'z') small += 1;  
    }
    printf("%s\n", (small == 0 && c == 1 && S[0] == 'A') ? "AC" : "WA");
    return 0; 
}

Compiler output:
main.c: In function 'main':
main.c:10:17: error: implicit declaration of function 'strlrn'; did you mean 'strlen'? [-Wimplicit-function-declaration]
   10 |         if((i < strlrn(S)-1) && S[i] == 'C') c += 1;
      |                 ^~~~~~
      |                 strlen
Language: C++

#include <bits/stdc++.h>
#include <math.h>
using namespace std;
typedef long long int ll;
template<class T> inline bool chmax(T& a, T b) {
  if (a < b) { a = b; return 1; }return 0; }
template<class T> inline bool chmin(T& a, T b) {
  if (a > b) { a = b; return 1; }return 0; }
#define all(a)  (a).begin(),(a).end()
#define rep(i, n) for (ll i = 1; i < n; i++)
#define vll vector<ll>
#define FOR(i, a, b) for (ll i = a; i < b; i++)
#define cinf(n,x) for(int i=0;i<(n);i++) cin >> x[i];
const ll INF =1LL << 62;

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

      

Compiler output:
a.cc: In function 'int main()':
a.cc:20:11: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   20 |   if(S[0] != "A"){
a.cc:27:37: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   27 |       if(i == 1 || i == L-1 || S[i] != "C"){
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main () {
  string S;
  cin >> S;
  int N = S.size();
  string key = "Cqwertyuiopasdfghjklzxcvbnm";
  if (S[0] != 'A') {
    cout << "WA" << endl;
    return 0;
  }
  if (S[1] == key[0]) {
    cout << "WA" << endl;
    return 0;
  }
  bool did = false;
  for (int i = 1; i < N; i ++) {
    int ju = -1;
    for (int j = 0; j < 27; j ++) {
      if (S[i] == key[j]) ju = i;
    }
    if (ju == -1) {
      cout << "WA" << endl;
      return 0;
    }
    if (ju == 0 && did) {
      cout << "WA" << endl;
      return 0;
    }
    if (jun == 0) {
      did = true;
      if (i == N - 1) {
        cout << "WA" << endl;
        return 0;
      }
    }
  }
  if (!did) {
    cout << "WA" << endl;
    return 0;
  }
  cout << "AC" << endl;
}

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

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

int main(){
	string s;cin>>s;int count=0;
	if(s[0]==65&&s[s.size()-1]!=67&&s[1]!=65){
    	for(int i=3;i<s.size()-1){
        	if(s[i]==67)++count;
        }if(count==1){cout<<"AC"<<endl;return 0;}
      	else {cout<<"WA"<<endl;return 0;}
    }else cout<<"WA"<<endl;return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:33: error: expected ';' before ')' token
    8 |         for(int i=3;i<s.size()-1){
      |                                 ^
      |                                 ;
Language: C++

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

int main(){
	string s;cin>>s;
	if(s[0]==65&&s[s.size()-1]!=67&&s[1]!=65){
    	for(int i=3;i<s.size()-1){
        	if(s[i]==67)++count;
        }if(count==1){cout<<"AC"<<endl;return 0;}
      	else {cout<<"WA"<<endl;return 0;}
    }else cout<<"WA"<<endl;return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:33: error: expected ';' before ')' token
    8 |         for(int i=3;i<s.size()-1){
      |                                 ^
      |                                 ;
a.cc:9:31: error: 'count' was not declared in this scope
    9 |                 if(s[i]==67)++count;
      |                               ^~~~~
a.cc:10:13: error: 'count' was not declared in this scope
   10 |         }if(count==1){cout<<"AC"<<endl;return 0;}
      |             ^~~~~
Language: C

#include<stdio.h>

int main(){
    bool a=false, c=false, small=true;
    int len = cNum = 0;
    char s[10];
    scanf("%s", s);

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

    if(s[0] == 'A') a=true;
    for(int i=2; i<len; i++){
        if(s[i] == 'C'){
            if(cNum != 0){
                c = false;
                break;
            } 
            c = true;
            cNum = i;
        }
    }
    for(int i=1; i<len-2; i++){
        if(i != cNum){
            if(s[i]<'a' || 'z'<s[i]){
                small=false;
                break;
            }
        }
    }
    if(a && c && small) printf("AC");
    else printf("WA");
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:4:5: error: unknown type name 'bool'
    4 |     bool a=false, c=false, small=true;
      |     ^~~~
main.c:2:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    1 | #include<stdio.h>
  +++ |+#include <stdbool.h>
    2 | 
main.c:4:12: error: 'false' undeclared (first use in this function)
    4 |     bool a=false, c=false, small=true;
      |            ^~~~~
main.c:4:12: note: 'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:4:12: note: each undeclared identifier is reported only once for each function it appears in
main.c:4:34: error: 'true' undeclared (first use in this function)
    4 |     bool a=false, c=false, small=true;
      |                                  ^~~~
main.c:4:34: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:5:15: error: 'cNum' undeclared (first use in this function)
    5 |     int len = cNum = 0;
      |               ^~~~
main.c:9:18: error: 'i' undeclared (first use in this function)
    9 |     for(len=0; s[i]!='\0'; len++);
      |                  ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |     if(s[i]=="C")sum++;
a.cc:12:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |   if(s[0]=="A" && sum==1){
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:26:12: error: 'c' was not declared in this scope
   26 |   cout << (c == 1 ? "AC" : "WA") << endl;
      |            ^
Language: C

#include <stdio.h>
#include <ctype.h>
int main(){
    char s[10];
    int l,c=0;
    if(scanf("%s",&s)==1);l=strlen(s);
    if(s[0]=='A'&&islower(s[1])&&islower(s[l-1])){
        for(int i=2;i<l;i++){
            if(isupper(s[i])&&s[i]!='C') printf("WA\n");return 0;
            else if(s[i]=='C')c++;if(c>1) printf("WA\n");return 0;
        }   
        if(c==0) printf("WA\n");return 0;
        else printf("AC\n");return 0;
    }else printf("WA\n"); return 0;
}   


Compiler output:
main.c: In function 'main':
main.c:6:29: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
    6 |     if(scanf("%s",&s)==1);l=strlen(s);
      |                             ^~~~~~
main.c:3:1: note: include '<string.h>' or provide a declaration of 'strlen'
    2 | #include <ctype.h>
  +++ |+#include <string.h>
    3 | int main(){
main.c:6:29: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch]
    6 |     if(scanf("%s",&s)==1);l=strlen(s);
      |                             ^~~~~~
main.c:6:29: note: include '<string.h>' or provide a declaration of 'strlen'
main.c:10:13: error: 'else' without a previous 'if'
   10 |             else if(s[i]=='C')c++;if(c>1) printf("WA\n");return 0;
      |             ^~~~
main.c:13:9: error: expected '}' before 'else'
   13 |         else printf("AC\n");return 0;
      |         ^~~~
main.c: At top level:
main.c:14:6: error: expected identifier or '(' before 'else'
   14 |     }else printf("WA\n"); return 0;
      |      ^~~~
main.c:14:27: error: expected identifier or '(' before 'return'
   14 |     }else printf("WA\n"); return 0;
      |                           ^~~~~~
main.c:15:1: error: expected identifier or '(' before '}' token
   15 | }
      | ^
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
      	//データ取り込み
		Scanner sc = new Scanner(System.in);
		//int N = sc.nextInt();
    	//int M = sc.nextInt();
      	String S = sc.next();
      	//int list[] = new int[N];
      	//for(int i=0;i<N;i++){
        //	list[i] = sc.nextInt();
        //}
      	//Arrays.sort(list);
      	boolean o1 = S.charAt(0) == 'A';
      	boolean o3 = true;
      	for(int i=1;i<S.length();i++){
        	if(S.charAt(i)!='C' && Character.isUpperCase(S.charAt(i))){
            	o3 = false;
              	break;
            }
        }
      	int cnt = 0;
      	boolean o2 = true;
      	if(S.charAt(0)=='C' ||S.charAt(1)=='C'||S.charAt(S.length()-1)=='C'){
        	o2 = false;
        }else{
      	for(int i=0;i<S.length();i++){
        	if(S.charAt(i) == 'C'){
            	cnt++;
            }
        }
        if(cnt!=1){
                  	o2 = false;
                	break;
                }
        }
      	if(o1 && o2 && o3){
        	System.out.println("AC");
        }else{
        	System.out.println("WA");
        }
    }
}


Compiler output:
Main.java:34: error: break outside switch or loop
                	break;
                	^
1 error
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
      	//データ取り込み
		Scanner sc = new Scanner(System.in);
		//int N = sc.nextInt();
    	//int M = sc.nextInt();
      	String S = sc.next();
      System.out.println(S.matches("A[a-z]+C[a-z]+") ? "AC" : "WA")
    }
}

Compiler output:
Main.java:9: error: ';' expected
      System.out.println(S.matches("A[a-z]+C[a-z]+") ? "AC" : "WA")
                                                                   ^
1 error