Language: C++

#pragma GCC optimize ("O3")
///#include<bits/stdc++.h>
#include <iterator>
#include<algorithm>
#include<vector>
#include<complex>
#include<cmath>
#include<cstdio>
#include<string>
#include<cstring>
#include<algorithm>
#include<set>
#include<math.h>
#include<map>
#include<stack>
#include<sstream>
#include<queue>
#include<list>
#include<iomanip>
#include<bitset>
#include<limits.h>
#include <iostream>
#include<cstdio>
#include<string>
#include<cstring>
#include<vector>
#include<algorithm>
#include<set>
#include<math.h>
#include<map>
#include<stack>
#include<sstream>
#include<queue>
#include<list>
#include<iomanip>
#include<bitset>
#include<limits.h>
#include<map>
#include<sstream>
using namespace std;



/// Info.
///****************************************************************************************************************************************///
/// Coder               : BAHAA El_DEEN OSAMA SAYED.
/// Problem name        : D - AcCepted
/// Method              : IM
/// Date                : 4/3/2020
///****************************************************************************************************************************************///


#define rep0(i,x)         for(int i=0; i<x ;++i)
#define all(v)           ((v.begin()),((v.end())
#define mm(v,d)          memset(v,d,sizeof(v))
#define lp(i,v)          for(int i=0;i<sizeof(v);++i)
#define lpi(i,j,n)       for(int i=(j);i>=(int)n;++i)
#define lpd(i,j,n)       for(int i=(j);i>=(int)n;--i)
#define MP               make_pair
#define SZ(v)            ((int) ( (v).size() ) )
#define ull              unsigned long long
#define ll               long long
#define pi               3.1415926536
#define oo               1e9
#define OO               1e18
#define Fx(n)            fixed<<setprecision(n)
#define FasterIO           std::ios_base::sync_with_stdio(false),cin.tie(0),cout.tie(0)
#define RE0              return 0
#define RE1              return 1
#define mp(a,b)          make_pair(a,b)
#define X                first
#define Y                second
#define pii              pair(int a, int b)
#define rep1(i,x)        for(int i=1;i<=x;++i)
#define rep2(i,x)        for(int i=2;i<x;++i)
#define RE               return
//#define LD               long double
#define all(v) ((v).begin()),((v).end())


const  int  N   = (int) 1e5+100;
const  int  M   = (int) 1e4+4;
const  int  INF = (int) 0x3f3f3f3f;
///const double ESP = 1e-7;
///const ll MOD=1e8+9;


int cnt=0,cnt_C=0;
string s;

void GalhO0O0O0O0O0M()
{

cin>>s;

rep0(i,s.length())
{
    if(s[i]=='C')
       {
           ++cnt_C;
       }
    if(islower(s[i]))
    {
       ++cnt;
    }
}

if(s[0]=='A' && s[2]=='C' && cnt==s.length()-2 && cnt_C==1)
{
    cout <<   "AC";
    RE0;
}
cout<< "WA";



}




int main()
{
FasterIO;
GalhO0O0O0O0O0M();
RE0;}


Compiler output:
a.cc:78:9: warning: "all" redefined
   78 | #define all(v) ((v).begin()),((v).end())
      |         ^~~
a.cc:54:9: note: this is the location of the previous definition
   54 | #define all(v)           ((v.begin()),((v.end())
      |         ^~~
a.cc: In function 'void GalhO0O0O0O0O0M()':
a.cc:68:33: error: return-statement with a value, in function returning 'void' [-fpermissive]
   68 | #define RE0              return 0
      |                                 ^
a.cc:111:5: note: in expansion of macro 'RE0'
  111 |     RE0;
      |     ^~~