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

#include <iostream>
#include <vector>
#include <algorithm>
#include <fstream>
#include <string>
#include <math.h>
#include <cstdlib>
#include <istream>
#include <sstream>
#include <cctype>
using namespace std;

int main()
{
	string s;
	int count=0;

	bool A=false;
	bool B=false;
	bool C=true;

	cin >> s;

	for(int i=0;i<s.size();i++){
		if(i==0&&s[i]=='A'){
			A=true;
		}
		else if(i>1&&i<s.size()-1&&s[i]=='C'){
			if(B==true){
				B=false;
				break;
			}
			B=true;
		}
		else{
			if(!islower(s[i])){
				C=false;
			}
		}
	}
	if(A==true&&B==true&&C==true){
		cout << "AC" << endl;
	}
	else{
		cout << "WA" << endl;
	}

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

# include <bits/stdc++.h>
# define rep(i, n) for(int i=0, i##_len=(n); i<i##_len; ++i)
# define reps(i, n) for(int i=1, i##_len=(n); i<=i##_len; ++i)
# define rrep(i, n) for(int i=((int)(n)-1); i>=0; --i)
# define rreps(i, n) for(int i=((int)(n)); i>0; --i)
# define ALL(x) (x).begin(), (x).end()
# define SZ(x) ((int)(x).size())
# define pb push_back
# define ll long long
# define ln cout<<'\n'
# define optimize_cin() cin.tie(0); ios::sync_with_stdio(false)
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
 
ll lcm(ll m, ll n)
{
    if ((0 == m) || (0 == n))
        return 0;
    return ((m / gcd(m, n)) * n);
}

int factorial(int n)
{
    int x = 1; // 0! = 1

    for (int i = 1; i <= n; ++i)
        x *= i;

    return x;
}


using namespace std;

template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

int main(){
    string s;
    int cnt=0;
    cin >> s ;
    bool flag = true;
    if (s[0]!='A'){
        flag = false;
        cout << "WA"<<endl;
        exit(0);
    }

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

Compiler output:
a.cc: In function 'int main()':
a.cc:50:12: error: expected '(' before 'isupper'
   50 |         if isupper(s[i]){
      |            ^~~~~~~
      |            (
Language: C++

#include<iostream>
#include<string>

using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:14:58: error: expected ')' before '{' token
   14 |  }else if(i != 0 && i != 2 &&  (s[i] >= 'a' &&s[i] <='z'){
      |          ~                                               ^
      |                                                          )
a.cc:18:3: error: expected primary-expression before '}' token
   18 |   }
      |   ^
Language: C++

#include<iostream>
#include<string>

using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:14:33: error: 'a' was not declared in this scope
   14 |  }else if(i != 0 && i != 2 &&  (a[i] >= 'a' &&a[i] <='z'){
      |                                 ^
a.cc:14:58: error: expected ')' before '{' token
   14 |  }else if(i != 0 && i != 2 &&  (a[i] >= 'a' &&a[i] <='z'){
      |          ~                                               ^
      |                                                          )
a.cc:18:3: error: expected primary-expression before '}' token
   18 |   }
      |   ^
Language: C++

#include<iostream>
#include<string>

using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:14:33: error: 'a' was not declared in this scope
   14 |  }else if(i != 0 && i != 2 &&  (a[i] >= 'a' &&a[i) < ='z'){
      |                                 ^
a.cc:14:50: error: expected ']' before ')' token
   14 |  }else if(i != 0 && i != 2 &&  (a[i] >= 'a' &&a[i) < ='z'){
      |                                                  ^
      |                                                  ]
a.cc:14:54: error: expected primary-expression before '=' token
   14 |  }else if(i != 0 && i != 2 &&  (a[i] >= 'a' &&a[i) < ='z'){
      |                                                      ^
Language: C++

#include <iostream>
#include <string>
#include <sstream>
#include <iomanip> 
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <queue>
#include <stack>
#include <vector>
#include <map>
#include <set>
#include <functional>
#include <algorithm>
#include <unordered_map>
#include <unordered_set>
#include <bitset>

using namespace std;


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

	int n;
	cin >> n;
	if (n < 1200) cout << "ABC\n";
	else if (n < 2800) cout << "ARC\n";
	else cout << "AGC\n";


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

	int n = s.length(), i, j, k, ct = 0, c = 0;
	if (s[0] != 'A') valid = false;
	for (i = 2; i < n; i++) {
		if (s[i] == 'C') ct++;
	}
	if (ct != 1) valid = false;
	for (i = 0; i < n; i++) {
		if ((s[i] >= 'A') && (s[i] <= 'Z')) c++;
	}
	if (c != 2) valid = false;

	if (valid) cout << "AC\n";
	else cout << "WA\n";

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:38:13: error: redeclaration of 'int n'
   38 |         int n = s.length(), i, j, k, ct = 0, c = 0;
      |             ^
a.cc:27:13: note: 'int n' previously declared here
   27 |         int n;
      |             ^
Language: Java

import java.util.*;

public class Main {

  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    char[] c = new char[s.length()];
    int count1 = 0;
    int count2 = 0;

    if (s.length() >= 4 && s.length() <=10) {
      for (int i = 0; i < s.length(); i++) {
        c[i] = s.charAt(i);
      }

      if (c[0] != 'A') {
        System.out.println("WA");
        return;
      }

      for (int i = 2; i < c.length-1; i++) {
        if (c[i] == 'C') {
          count1++;
        }
        if (c[i] >= 'A' && c[i] <= 'Z'){
          count2++;
        }
      }

      if (count1 == 1 && count2 == 1s) {
        System.out.println("AC");
      } else {
        System.out.println("WA");
      }
    }
  }
}


Compiler output:
Main.java:31: error: ')' expected
      if (count1 == 1 && count2 == 1s) {
                                    ^
Main.java:31: error: ';' expected
      if (count1 == 1 && count2 == 1s) {
                                     ^
Main.java:33: error: 'else' without 'if'
      } else {
        ^
3 errors
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:44: error: 'a' was not declared in this scope
    7 |   if(s[0]=='A'&&s[2]=='C'&&'a'<=s[1]&&'z'>=a[1]){
      |                                            ^
Language: C++

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

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



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

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

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



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

@s = ("", split(//, <>));

$r = "AC";
$cnt = 0;
for $i (1 .. $#s){


	if($i == 1){
		if($s[$i] ne 'A'){
			$r = "WA";
			last;
		}
	}elsif(($i >= 3) and (($i <= $#s - 1))){
		if($s[$i] eq 'C'){
			if($cnt == 1){
				$r = "WA";
				last;
			}else{
				$cnt = 1;
			}
		}
		if($s[$i] !~ /[a-z]/i){
			$r = "WA";
			last;
		}
	}else{
		if(($s[$i] !~ /[a-z]/i) or ($s[$i]) eq 'C'){
			$r = "WA";
			last;
		}
	}
}

print "$r\n";


Compiler output:
a.cc:1:1: error: stray '@' in program
    1 | @s = ("", split(//, <>));
      | ^
a.cc:5:15: error: stray '#' in program
    5 | for $i (1 .. $#s){
      |               ^
a.cc:13:39: error: stray '#' in program
   13 |         }elsif(($i >= 3) and (($i <= $#s - 1))){
      |                                       ^
a.cc:1:2: error: 's' does not name a type
    1 | @s = ("", split(//, <>));
      |  ^
a.cc:4:1: error: '$cnt' does not name a type
    4 | $cnt = 0;
      | ^~~~
a.cc:5:1: error: expected unqualified-id before 'for'
    5 | for $i (1 .. $#s){
      | ^~~
a.cc:34:1: error: 'print' does not name a type; did you mean 'int'?
   34 | print "$r\n";
      | ^~~~~
      | int
Language: C++

#include <bits/stdc++.h>
using namespace std;
using vi = vector<int>;
using vb = vector<bool>;
using vc = vector<char>;
using vs = vector<string>;
using vvi = vector<vector<int>>;
using vvc = vector<vector<char>>;
using pii = pair<int, int>;
#define fix10 cout << fixed << setprecision(10);
#define rep(i,n) for(int i=0; i<(int)(n);i++)
#define MOD 1000000007

int main(){
  string s;
  cin >> s;
  int n = s.size();
  bool flag = true;
  int cnt = 0;
  if(cnt != 1) flag = false;
  rep(i,n){
    if(i == 0 && s.at(i) != 'A') flag = false; continue;
    if(2 <= i && i <= n-2 &&) cnt += (s.at(i) == 'C');
    if(s.at(i) == 'C') continue;
    int tmp = s.at(i) - 'a';
    if(tmp < 0 || tmp > 26) flag = false;
  }
  if(cnt != 1) flag = false;
  cout << (flag ? "AC" : "WA") << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:29: error: expected primary-expression before ')' token
   23 |     if(2 <= i && i <= n-2 &&) cnt += (s.at(i) == 'C');
      |                             ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
using vi = vector<int>;
using vb = vector<bool>;
using vc = vector<char>;
using vs = vector<string>;
using vvi = vector<vector<int>>;
using vvc = vector<vector<char>>;
using pii = pair<int, int>;
#define fix10 cout << fixed << setprecision(10);
#define rep(i,n) for(int i=0; i<(int)(n);i++)
#define MOD 1000000007

int main(){
  string s;
  cin >> s;
  int n = s.size();
  bool ans = true;
  int cnt = 0;
  if(cnt != 1) flag = false;
  rep(i,n){
    if(i == 0 && s.at(i) != 'A') flag = false; continue;
    if(2 <= i && i <= n-2 &&) cnt += (s.at(i) == 'C');
    if(s.at(i) == 'C') continue;
    int tmp = s.at(i) - 'a';
    if(tmp < 0 || tmp > 26) flag = false;
  }
  if(cnt != 1) flag = false;
  cout << (flag ? "AC" : "WA") << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:16: error: 'flag' was not declared in this scope
   20 |   if(cnt != 1) flag = false;
      |                ^~~~
a.cc:22:34: error: 'flag' was not declared in this scope
   22 |     if(i == 0 && s.at(i) != 'A') flag = false; continue;
      |                                  ^~~~
a.cc:23:29: error: expected primary-expression before ')' token
   23 |     if(2 <= i && i <= n-2 &&) cnt += (s.at(i) == 'C');
      |                             ^
a.cc:26:29: error: 'flag' was not declared in this scope
   26 |     if(tmp < 0 || tmp > 26) flag = false;
      |                             ^~~~
a.cc:28:16: error: 'flag' was not declared in this scope
   28 |   if(cnt != 1) flag = false;
      |                ^~~~
a.cc:29:12: error: 'flag' was not declared in this scope
   29 |   cout << (flag ? "AC" : "WA") << endl;
      |            ^~~~
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:9:22: error: expected ')' before '{' token
    9 |     if(S.at(0) != 'A' {
      |       ~              ^~
      |                      )
a.cc:21:21: error: 'i' was not declared in this scope
   21 |     for (int i = 3; i < b - 1; i++){
      |                     ^
Language: C++

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

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

Compiler output:
a.cc: In function 'bool check(std::string)':
a.cc:20:5: error: expected primary-expression before '}' token
   20 |     }
      |     ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:18:21: error: expected ')' before '{' token
   18 |     if(isupper(a[i]){
      |       ~             ^
      |                     )
a.cc:27:8: error: expected primary-expression before '}' token
   27 |        }
      |        ^
Language: C++

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

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


Compiler output:
a.cc:17:3: error: expected unqualified-id before 'for'
   17 |   for(int i =1; i<a.size();i++){
      |   ^~~
a.cc:17:17: error: 'i' does not name a type
   17 |   for(int i =1; i<a.size();i++){
      |                 ^
a.cc:17:28: error: 'i' does not name a type
   17 |   for(int i =1; i<a.size();i++){
      |                            ^
a.cc:28:6: error: 'cout' does not name a type
   28 |      cout << "AC" <<endl;
      |      ^~~~
a.cc:29:8: error: expected declaration before '}' token
   29 |        }
      |        ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'sttring' was not declared in this scope; did you mean 'stdin'?
    5 |   sttring a;
      |   ^~~~~~~
      |   stdin
a.cc:6:9: error: 'a' was not declared in this scope
    6 |   cin >>a;
      |         ^
a.cc: At global scope:
a.cc:17:3: error: expected unqualified-id before 'for'
   17 |   for(int i =1; i<a.size();i++){
      |   ^~~
a.cc:17:17: error: 'i' does not name a type
   17 |   for(int i =1; i<a.size();i++){
      |                 ^
a.cc:17:28: error: 'i' does not name a type
   17 |   for(int i =1; i<a.size();i++){
      |                            ^
a.cc:28:6: error: 'cout' does not name a type
   28 |      cout << "AC" <<endl;
      |      ^~~~
a.cc:29:8: error: expected declaration before '}' token
   29 |        }
      |        ^
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define repl(i,n) for(int64_t i=0;i<(int64_t)(n);i++)
#define MAX_N 10000000 //10^7
#define ll int64_t
#define all(v) (v).begin(),(v).end()
#define cout.N cout<<N<<endl;
using namespace std;

int main() {
    string s; cin>>s;
    if(s[0]!='A') {
        cout<<"WA"<<endl;
        return 0;
    }

    if(s[0]=='C' || s[1]=='C' || s[s.size()-1]=='C') {
        cout<<"WA"<<endl;
        return 0;
    }

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

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

    rep(i,s.size()) {
        if(s[i]<'A' || s[i]>'Z')
        cout<<"WA"<<endl;
        return  0;
        
    }
    
    cout<<"AC"<<endl;
    return 0;
}

Compiler output:
a.cc:7:9: warning: ISO C++11 requires whitespace after the macro name
    7 | #define cout.N cout<<N<<endl;
      |         ^~~~
a.cc: In function 'int main()':
a.cc:7:13: error: expected primary-expression before '.' token
    7 | #define cout.N cout<<N<<endl;
      |             ^
a.cc:13:9: note: in expansion of macro 'cout'
   13 |         cout<<"WA"<<endl;
      |         ^~~~
a.cc:13:13: error: expected primary-expression before '<<' token
   13 |         cout<<"WA"<<endl;
      |             ^~
a.cc:7:13: error: expected primary-expression before '.' token
    7 | #define cout.N cout<<N<<endl;
      |             ^
a.cc:18:9: note: in expansion of macro 'cout'
   18 |         cout<<"WA"<<endl;
      |         ^~~~
a.cc:18:13: error: expected primary-expression before '<<' token
   18 |         cout<<"WA"<<endl;
      |             ^~
a.cc:7:13: error: expected primary-expression before '.' token
    7 | #define cout.N cout<<N<<endl;
      |             ^
a.cc:28:9: note: in expansion of macro 'cout'
   28 |         cout<<"WA"<<endl;
      |         ^~~~
a.cc:28:13: error: expected primary-expression before '<<' token
   28 |         cout<<"WA"<<endl;
      |             ^~
a.cc:7:13: error: expected primary-expression before '.' token
    7 | #define cout.N cout<<N<<endl;
      |             ^
a.cc:34:9: note: in expansion of macro 'cout'
   34 |         cout<<"WA"<<endl;
      |         ^~~~
a.cc:34:13: error: expected primary-expression before '<<' token
   34 |         cout<<"WA"<<endl;
      |             ^~
a.cc:7:13: error: expected primary-expression before '.' token
    7 | #define cout.N cout<<N<<endl;
      |             ^
a.cc:39:5: note: in expansion of macro 'cout'
   39 |     cout<<"AC"<<endl;
      |     ^~~~
a.cc:39:9: error: expected primary-expression before '<<' token
   39 |     cout<<"AC"<<endl;
      |         ^~
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define repl(i,n) for(int64_t i=0;i<(int64_t)(n);i++)
#define MAX_N 10000000
#define ll int64_t
#define all(v) (v).begin(),(v).end()
using namespace std;

int main() {
    string s; cin>>s;
    if(s[0]!='A') {
        cout<<"WA"<<endl;
        return 0;
    }

    if(s[0]=="C" || s[1]=="C" || s[s.size()-1]=="C") {
        cout<<"WA"<<endl;
        return 0;
    }

    int count=0;
    for(int i=2;i<n-1;i++) {
        if(s[i]=="C") count++;
    }

    if(count!=1) {
        cout<<"WA"<<endl;
        return 0;
    }
    
    cout<<"AC"<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   16 |     if(s[0]=="C" || s[1]=="C" || s[s.size()-1]=="C") {
a.cc:16:25: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   16 |     if(s[0]=="C" || s[1]=="C" || s[s.size()-1]=="C") {
a.cc:16:47: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   16 |     if(s[0]=="C" || s[1]=="C" || s[s.size()-1]=="C") {
a.cc:22:19: error: 'n' was not declared in this scope
   22 |     for(int i=2;i<n-1;i++) {
      |                   ^
a.cc:23:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   23 |         if(s[i]=="C") count++;
Language: C++

#include <bits/stdc++.h>
using namespace std;
constexpr auto re = regex("^A[a-z]+C[a-z]+$");
int main(void) {
    string s;
    cin >> s;
    if (regex_search(s, re)) {
        cout << "AC\n";
    } else {
        cout << "WA\n";
    }
    return 0;
}


Compiler output:
a.cc:3:16: error: the type 'const std::__cxx11::basic_regex<char>' of 'constexpr' variable 're' is not literal
    3 | constexpr auto re = regex("^A[a-z]+C[a-z]+$");
      |                ^~
In file included from /usr/include/c++/14/regex:68,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181,
                 from a.cc:1:
/usr/include/c++/14/bits/regex.h:418:11: note: 'std::__cxx11::basic_regex<char>' is not literal because:
  418 |     class basic_regex
      |           ^~~~~~~~~~~
/usr/include/c++/14/bits/regex.h:418:11: note:   'std::__cxx11::basic_regex<char>' has a non-trivial destructor
Language: C++

#include <bits/stdc++.h>
using namespace std;
constexpr re = regex("^A[a-z]+C[a-z]+$");
int main(void) {
    string s;
    cin >> s;
    if (regex_search(s, re)) {
        cout << "AC\n";
    } else {
        cout << "WA\n";
    }
    return 0;
}


Compiler output:
a.cc:3:11: error: 're' does not name a type
    3 | constexpr re = regex("^A[a-z]+C[a-z]+$");
      |           ^~
a.cc: In function 'int main()':
a.cc:7:25: error: 're' was not declared in this scope
    7 |     if (regex_search(s, re)) {
      |                         ^~
Language: C++

#include <bits/stdc++.h>
#include <boost/regex.hpp>
using namespace std;
int main(void) {
    string s;
    cin >> s;
    boost::regex r("^A[a-z]+C[a-z]+$");
    boost::smatch m;
    if (boost::regex_search(s, m, r)) {
        cout << "AC\n";
    } else {
        cout << "WA\n";
    }
    return 0;
}


Compiler output:
a.cc:2:10: fatal error: boost/regex.hpp: No such file or directory
    2 | #include <boost/regex.hpp>
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<iostream>
#include<bits/stdc++.h>
#include<string>
using namespace std;
int main()
{
  string s ;
  cin >> s ;
  
     int count = 0 ;
  
  if(s.at(0)!='A'){
    cout << "WA" ;
    return 0 ;
  }else{
   for(int i=2;i<(s.size()-1);i++){
    if(s.at(i)=='C'){
        count++ ;
      }
    }
    
    int count2=0 ;
   if(count==1){
   for(int i=1;i<(s.size()-1);i++){
     if(isupper(s.at(i))){
       count++ ;
     }
    } 
   }else{
    cout << "WA" ;
    return 0 ;
   }
  
  if(count==1){
   cout << "AC" ;
    return 0 ;
  }else{
   cout << "WA" ;
    return 0 ;  
  }
    
}


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

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

int main(){
	string s;
	cin >> s;
	if(s[0] != 'A'){
		cout << "WA";
		return 0;
	}
	else{
		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'){
					cout << "WA";
					return 0;
				}
				++cnt;
			}
		}
	}
	if(cnt != 1) cout << "WA";
	else cout << "AC";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:12: error: 'cnt' was not declared in this scope; did you mean 'int'?
   23 |         if(cnt != 1) cout << "WA";
      |            ^~~
      |            int
Language: C++

//
//  main.cpp
//  ABC
//
//  Created by Amarsanaa Davaasuren on 2019/08/31.
//  Copyright © 2019 Amarsanaa Davaasuren. All rights reserved.
//
# include <algorithm>
#include <iostream>
#include <vector>
#include <map>
#include <cstdio>
#include <string>
#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,i0,n) for(int (i)=(i0);(i)<(n);(i)++)
#define rn return
typedef std::pair<int,int> P;

using namespace std;
using ll = long long;

int main(){
    string S; cin >> S;
    bool small = true;
    rep(i,S.size()){
        if (i!=0 && i!= 2 && islower(S[i]) == false) small = false;
    }
    bool existOnce = false;
    bool exist = false;
    FOR(i,2,S.size()-1){
        if (S[i] == 'C'){
            if (exist == false) {existOnce = true; exist = true}
            else existOnce = false;
        }
    }
    cout << (S[0]=='A'&& existOnce && small ? "AC" : "WA");
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:33:64: error: expected ';' before '}' token
   33 |             if (exist == false) {existOnce = true; exist = true}
      |                                                                ^
      |                                                                ;
Language: C++

#include <iostream>
#include <string>

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

    std::string ans = "AC";

    if (S[0] != 'A') ans = "WA";
    auto f = S.find('C');
    if (f == std::string::npos) ans = "WA";
    auto f2 = S.find('C', f+1);
    if (f2 != std::string::npos) ans = "WA";
    if (f < 2 || f == S.length()-1) ans = "WA";
    int up = 0;
    for(int i = 0; i < S.length(); i++) {
        if (S[i] >= 'A' && S[i] <= "Z") up++;
    }
    if (up != 2) ans = "WA";

    std::cout << ans << std::endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:33: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   19 |         if (S[i] >= 'A' && S[i] <= "Z") up++;
Language: C++

#include <iostream>
#include <string>

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

    std::string ans = "AC";
    if (S[0] != 'A') ans = "WA";
    auto f = S.find('C');
    if (f == std::string::npos) ans = "WA";
    auto f2 = S.find('C', f);
    if (f != f2) ans = "WA";
    if (f < 2 || f == s.length()) ans = "WA";

    std::cout << ans << std::endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:23: error: 's' was not declared in this scope
   15 |     if (f < 2 || f == s.length()) ans = "WA";
      |                       ^
Language: C++

#include "bits/stdc++.h"

using namespace std;

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

  string S;
  int count;

  regex re("a-z") ;
  bool flag=false;

  cin>>S;

  if(S[0]=='A'){
      for(int i=2;i<S.size()-1;i++){
          if(S[i]=='C'){
              count++;
          }else if(!regrex_match(S[i],re)){
              flag=true;
              break;
          }
      }
      if(count==1){
          cout<<"AC"<<endl;
      }else if(count==0 || count>=2 || flag){
          cout<<"WA"<<endl;
      }
  }else{
      cout<<"WA"<<endl;
  }
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:21: error: 'regrex_match' was not declared in this scope
   21 |           }else if(!regrex_match(S[i],re)){
      |                     ^~~~~~~~~~~~
Language: C++

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

int main() {
    string S;
    cin >> S;
    bool frag = true;
    if (S[0] != 'A') {
        cout << "WA" << endl;
    }
    else {
        int cntC = 0;

        for (int i = 2; i < S.size()-1; i++) {
            if (S[i] == 'C') {
                cntC++;
            }
            else if (S[i] >= 'A' && S[i] <= 'Z') {
                cout << "WA" << endl;
                frag = false;
                break;
            }
        }
        if (cntC != 1 && frag) {
            cout << "WA" << endl;
            frag = false;
        }
        else if (S[1] >= 'a' && S[1] <= 'z'and S[S.size()-1] >= 'a' && S[S.size()-1] <= 'z') {
            cout << "AC" << endl;
        }
        else{
            cout << "WA" << endl;
        }
    }
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:31:41: error: unable to find character literal operator 'operator""and' with 'char' argument
   31 |         else if (S[1] >= 'a' && S[1] <= 'z'and S[S.size()-1] >= 'a' && S[S.size()-1] <= 'z') {
      |                                         ^~~~~~
a.cc:31:47: error: expected ')' before 'S'
   31 |         else if (S[1] >= 'a' && S[1] <= 'z'and S[S.size()-1] >= 'a' && S[S.size()-1] <= 'z') {
      |                 ~                             ^~
      |                                               )
Language: C++

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

int main() {
    string S;
    cin >> S;
    bool frag = true
    if (S[0] != 'A') {
        cout << "WA" << endl;
    }
    else {
        int cntC = 0;

        for (int i = 2; i < S.size()-1; i++) {
            if (S[i] == 'C') {
                cntC++;
            }
            else if (S[i] >= 'A' && S[i] <= 'Z') {
                cout << "WA" << endl;
                frag = false;
                break;
            }
        }
        if (cntC != 1 && frag) {
            cout << "WA" << endl;
            frag = false;
        }
        else if (S[1] >= 'a' && S[1] <= 'z'and S[S.size()-1] >= 'a' && S[S.size()-1] <= 'z') {
            cout << "AC" << endl;
        }
        else{
            cout << "WA" << endl;
        }
    }
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: expected ',' or ';' before 'if'
   11 |     if (S[0] != 'A') {
      |     ^~
a.cc:14:5: error: 'else' without a previous 'if'
   14 |     else {
      |     ^~~~
a.cc:31:41: error: unable to find character literal operator 'operator""and' with 'char' argument
   31 |         else if (S[1] >= 'a' && S[1] <= 'z'and S[S.size()-1] >= 'a' && S[S.size()-1] <= 'z') {
      |                                         ^~~~~~
a.cc:31:47: error: expected ')' before 'S'
   31 |         else if (S[1] >= 'a' && S[1] <= 'z'and S[S.size()-1] >= 'a' && S[S.size()-1] <= 'z') {
      |                 ~                             ^~
      |                                               )
Language: C++

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


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

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

bool valid(string S_) {
  int len = S_.size();
  bool flag = false;
  for(int i=1; i<len; i++) {
    if(i != 1 && i < len && S_[i] == 'C' && flag == false) {
      flag = true;
    } else if (i != 1 && i < len && S_[i] == 'C' && flag == true) {
      return false;
    } else if((S_[i] < 'a') || (S_[i] > 'z')) {
      return false;
    }
  }
  return flag;
}

int main() {
  string S;
  cin >> S;
  
  if(S[0] == 'A' && val#include <iostream>
#include <string>
using namespace std;

bool valid(string S_) {
  int len = S_.size() -1;
  bool flag = false;
  for(int i=1; i<len; i++) {
    if(i != 1 && S_[i] == 'C' && flag == false) {
      flag = true;
    } else if (i != 1 && S_[i] == 'C' && flag == true) {
      return false;
    } else if((S_[i] < 'a') || (S_[i] > 'z')) {
      return false;
    }
  }
  
  if(S_[len+1] == 'C') {
    flag == false;
  }
  
  return flag;
}

int main() {
  string S;
  cin >> S;
  
  if(S[0] == 'A' && valid(S) == true) {
    cout << "AC" << endl;
  } else {
    cout << "WA" << endl;
  }
  return 0;
}id(S) == true) {
    cout << "AC" << endl;
  } else {
    cout << "WA" << endl;
  }
  return 0;
}

Compiler output:
a.cc:24:24: error: stray '#' in program
   24 |   if(S[0] == 'A' && val#include <iostream>
      |                        ^
a.cc: In function 'int main()':
a.cc:24:21: error: 'val' was not declared in this scope; did you mean 'valid'?
   24 |   if(S[0] == 'A' && val#include <iostream>
      |                     ^~~
      |                     valid
a.cc:28:6: error: condition declares a function
   28 | bool valid(string S_) {
      |      ^~~~~
Language: C++

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

int main(){
  string S;
  cin >>S;
  
  int len = S.size();
  bool flag = false;
  int C = 0;
  if(S[0]=='A' and S[len-1]=='C'){
    rep(i,0,N-1){
      if(S[i]=='C'){
        C++;
        C==1 ? flag = true : flag = false; 
      }else if('a'<=s[i] and s[i]<='z') flag = true;
      if(flag==false) break;
    } 
  } 
  
  string ans;
  if(flag) ans = "AC";
  else ans = "WA";
  cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:13: error: 'N' was not declared in this scope
   13 |     rep(i,0,N-1){
      |             ^
a.cc:2:34: note: in definition of macro 'rep'
    2 | #define rep(i,a,n) for(int i=a;i<n;i++)
      |                                  ^
a.cc:17:21: error: 's' was not declared in this scope
   17 |       }else if('a'<=s[i] and s[i]<='z') flag = true;
      |                     ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
	string S; cin >> S;
	bool J = false;
	if(S[0] == 'A'){
		if(S[1] != 'C' && S[S.size() - 1] != 'C'){
			SORT(S);
			if(S[1] == 'C' && S[2] >= 'a' && S[2] <= 'z') J = true;
		}
	}
	cout << ((J) ? "AC" :"WA") << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:25: error: 'SORT' was not declared in this scope
    8 |                         SORT(S);
      |                         ^~~~
Language: C

#include <stdio.h>
#include<string.h>
int main(){
  
   char str[10] ;
   scanf("%s",&str);

   int length = strlen(str);
   int count = 0 , i;
   
   for(i = 0 ; i<length ; i++){
       if(str[i]>=65 && <=90){
           count++;
       }
   }
   //printf("%d",size);
   int count2 = 0;
   if(str[0] = 'A' && count==2){
       for(i = 2 ; i<length ; i++){
           if(str[i]=='C'){
               count2++;
               break;
           }
       }
   }
   if(count2!=0){
       printf("AC");
   }else{
       printf("WA");
   }

}

Compiler output:
main.c: In function 'main':
main.c:12:25: error: expected expression before '<=' token
   12 |        if(str[i]>=65 && <=90){
      |                         ^~
Language: C

#include <stdio.h>
#include<string.h>
int main(){
  
   char str[10] ;
   scanf("%s",&str);

   int length = strlen(str);
   int count = 0 , i;
   
   for(i = 0 ; i<length ; i++){
       if(str[i]>97){
           count++;
       }
   }
   printf("%d",size);
   int count2 = 0;
   if(str[0] = 'A' && count==2){
       for(i = 2 ; i<length-1; i++){
           if(str[i]=='C'){
               count2++;
               break;
           }
       }
   }
   if(count2!=0){
       printf("AC");
   }else{
       printf("WA");
   }

}

Compiler output:
main.c: In function 'main':
main.c:16:16: error: 'size' undeclared (first use in this function); did you mean 'size_t'?
   16 |    printf("%d",size);
      |                ^~~~
      |                size_t
main.c:16:16: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

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

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

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.size()) {
    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 "../library/lib.hpp"

class BAcCepted {
public:
    string S;
    string ans = "AC";

    void solve(std::istream& in, std::ostream& out) {
        in >> S;
        if (S[0] != 'A') ans = "WA";
        ll cnt = 0;
        for (int i = 2; i <= S.length() - 2; i++) if (S[i] == 'C') cnt++;
        if (cnt != 1) ans = "WA";
        REP(i, S.length()) {
            if (isupper(S[i]) && i != 0 && S[i] != 'C') ans = "WA";
        }
        DUMP(ans);
    }
};


Compiler output:
a.cc:1:10: fatal error: ../library/lib.hpp: No such file or directory
    1 | #include "../library/lib.hpp"
      |          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

CVV#include <bits/stdc++.h>
#define int long long
#define rep(i,n) for(int i=0;i<n;++i)
#define all(a) a.begin(),a.end()
#define P pair<long long,long long>
#define double long double
using namespace std;
signed main(){
  string a;
  int b=0;
  cin>>a;
  if(a.at(0)=='A'&&islower(a.at(1))&&islower(a.at(a.size()-1))){
    for(int i=2;i<a.size()-1;i++){
      if(isupper(a.at(i))&&a.at(i)!='C'){
    cout<<"WA";
        break;
      }
  if(a.at(i)=='C')
    b++;
  if(b==2){
    cout<<"WA";
  break;
  }
    }
  if(b==0||b==2)
    cout<<"WA";
    else
      cout<<"AC";
    }
  else
    cout<<"WA";
}


Compiler output:
a.cc:1:4: error: stray '#' in program
    1 | CVV#include <bits/stdc++.h>
      |    ^
a.cc:1:1: error: 'CVV' does not name a type
    1 | CVV#include <bits/stdc++.h>
      | ^~~
a.cc: In function 'int main()':
a.cc:9:3: error: 'string' was not declared in this scope
    9 |   string a;
      |   ^~~~~~
a.cc:11:3: error: 'cin' was not declared in this scope
   11 |   cin>>a;
      |   ^~~
a.cc:11:8: error: 'a' was not declared in this scope
   11 |   cin>>a;
      |        ^
a.cc:12:20: error: 'islower' was not declared in this scope
   12 |   if(a.at(0)=='A'&&islower(a.at(1))&&islower(a.at(a.size()-1))){
      |                    ^~~~~~~
a.cc:14:10: error: 'isupper' was not declared in this scope
   14 |       if(isupper(a.at(i))&&a.at(i)!='C'){
      |          ^~~~~~~
a.cc:15:5: error: 'cout' was not declared in this scope
   15 |     cout<<"WA";
      |     ^~~~
a.cc:21:5: error: 'cout' was not declared in this scope
   21 |     cout<<"WA";
      |     ^~~~
a.cc:26:5: error: 'cout' was not declared in this scope
   26 |     cout<<"WA";
      |     ^~~~
a.cc:28:7: error: 'cout' was not declared in this scope
   28 |       cout<<"AC";
      |       ^~~~
a.cc:31:5: error: 'cout' was not declared in this scope
   31 |     cout<<"WA";
      |     ^~~~
Language: C++

#include <iostream>
using namespace std;
int main(int argc, const char * argv[]) {
    int x, y, f, m, a, b;
    bool b1 = true;
    bool b2 = false;
    bool b3 = false;
    bool b4;
    b4 = true;
    b1 = true;
    b2 = false;
    cin>> s;
    f = 0;
    m = 0;
    a = 0;
    b = 0;
    for (int i = 2; i<s.length() - 2; i++){
        if (s[i] == 'C'){
            f++;
        }
    }
    
    if (f == 1){
        b2 = true;
    }
    f = 0;
    for(int i = 0; i< s.length(); i++){
        f = 0;
        for (int j= 97;j<=122; j++){
            if (s[i] == j){
                f++;
            }
            else if (s[i] == 'A' || s[i] == 'C'){
                f++;
                if (s[i] =='A'){
                    a++;
                }
                if (s[i] =='C'){
                    b++;
                }
            }
        }
        
        if (!(f == 1 || f == 26)){
            cout <<i <<" "<< f<<" ";
            b1 = false;
        }
        if (a>1||b>1){
            b4 = false;
            break;
        }
        
    }
    
    
    if (s[0] == 'A'){
        if (b2 == true){
            if (b1 == true){
                if (b4 == true){
                    cout <<"AC";
                    b3 = true;
                }
            }
        }
    }
    if(b3 == false){
        cout << "WA";
    }
        
    return 0;
}

Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:12:11: error: 's' was not declared in this scope
   12 |     cin>> s;
      |           ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rep1(i,n) for(int i=1;i<(int)(n);i++)
#define fs first
#define sc second
typedef pair<ll, ll> l_l;
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
int main(){
  string s;
  cin>>s;
  bool f=false;
  int cnt=0;
  for(int i=2;i<s.size()-1;i++) if(s[i]=='C')cnt++;
  if(cnt==1)f=true;
  int c=0;
  bool q=false;
  for(int i=1;i<s.size();i++)if(s[i]>='a'&&s[i]<='z')c++;
  if(c==s.size()-2) q=true
  if(s[0]=='A'&&f&&q)
  cout <<"AC"<<endl;
  else cou<<"WA"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:27: error: expected ';' before 'if'
   22 |   if(c==s.size()-2) q=true
      |                           ^
      |                           ;
   23 |   if(s[0]=='A'&&f&&q)
      |   ~~                       
a.cc:25:8: error: 'cou' was not declared in this scope; did you mean 'cos'?
   25 |   else cou<<"WA"<<endl;
      |        ^~~
      |        cos
Language: C++

#include<bits/stdc++.h>
#include <iomanip>
#include <iostream>
using namespace std;
using ll = long long;
const long long INF = 1LL << 60;
 
template<class T> inline bool chmin(T& a, T b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;
}
template<class T> inline bool chmax(T& a, T b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}
 
ll min(ll a, ll b){
    if(a < b) return a;
    else return b;
}
 
int main(void){
    string S; cin >> S;
    bool OK = true;
    
    if(S[0] != 'A') OK = false;
    
    int count_C = 0;
    for(int i = 2; i < S.size() - 1; i++){
        if(S[i] == 'C') count_C++;
    }
    if(count_C != 1) OK = false;
    
    for(int i = 0; i < S.size(); i++){
        if(i == 0) continue;
        if(S[i] == 'C') continue;
        if( (S[i] >= 'A') && (s[i] <= "Z") ) OK = false;
    }
    
    if(OK) cout << "AC" << endl;
    else cout << "WA" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:43:31: error: 's' was not declared in this scope
   43 |         if( (S[i] >= 'A') && (s[i] <= "Z") ) OK = false;
      |                               ^
Language: C

/*
	submission # - User: herp_sy
	https://atcoder.jp/contests/
*/

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <stdbool.h>

#define _CRT_SECURE_NO_WARNINGS
#define TLong long long
#define TBMod 1000000007

int main(int argc, char const *argv[])
{
	int c_cnt = 0,isLarge = 0;
	char s[13];
	bool f1 = false,f2 = false,f3 = false;

	scanf("%s",s);
	if(s[0] == 'A')	f1 = true;
	for (int i = 2; i <= strlen(s) - 2; ++i)
	{
		if(s[i] == 'C')	++c_cnt;
	}
	if(Ccnt == 1)	f2 = true;
	for (int i = 0; i < strlen(s); ++i)
	{
		if(s[i] < 'a')	++isLarge;
	}
	if(isLarge <= 2)	f3 = true;
	if(f1 & f2 & f3)	puts("AC");
	else puts("WA");
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:28:12: error: 'Ccnt' undeclared (first use in this function)
   28 |         if(Ccnt == 1)   f2 = true;
      |            ^~~~
main.c:28:12: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    7 |   if(s[0]=="A" && s[2]=="C") {
a.cc:7:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    7 |   if(s[0]=="A" && s[2]=="C") {
a.cc:8:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |     if(s[1]!="A") {
a.cc:10:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |         if(s[i]!="A" && s[i]!="C") {
a.cc:10:29: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |         if(s[i]!="A" && s[i]!="C") {
a.cc:17:5: error: 'else' without a previous 'if'
   17 |     else{
      |     ^~~~
a.cc:22:5: error: expected '}' before 'else'
   22 |     else{
      |     ^~~~
a.cc:8:19: note: to match this '{'
    8 |     if(s[1]!="A") {
      |                   ^
a.cc:24:7: error: break statement not within loop or switch
   24 |       break;
      |       ^~~~~
a.cc:32:6: error: expected '}' at end of input
   32 |     }
      |      ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
    int A,B=1,C=1,D=0,F,G=0,H=0,I=0;
    string S;
    cin >> S;
    if(S[1]>96){
        A=S.size();
        for(int i=2;i<A-1;i++){
            if(S[i]=='C'&&D==1){
                H=1;
                break;
            }
            else if(S[i]=='C'){
                D++;
                F=i;
                H=2;
            }

        for(int i=2;i<A;i++){
            if(i==F)continue;
            if(S[i]<96){
                B=0;
                break;
            }
        }
        if(B==1&&H==2&&S[0]=='A'){
            cout << "AC" << endl;
            C=0;
        }
    }
    if(C||H==1)cout << "WA" << endl;
}

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

#include<bits/stdc++.h>
using namespace std;
int main(){
    int A,B=1,C=1,D=0,F,G=0,H=0,I=0;
    string S;
    cin >> S;
    if(S[1]>96){
        A=S.size();
        for(int i=2;i<A;i++){
            if(S[i]=='C'&&D==1){
                H=1;
                break;
            }
            else if(S[i]=='C'){
                D++;
                F=i;
            }

        for(int i=2;i<A;i++){
            if(i==F)continue;
            if(S[i]<96){
                B=0;
                break;
            }
        }
        if(B==1&&H==0&&S[0]=='A'){
            cout << "AC" << endl;
            C=0;
        }
    }
    if(C||H==1)cout << "WA" << endl;
}

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