Submission #2952438


Source Code Expand

Copy
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;

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

Submission Info

Submission Time
Task A - Rated for Me
User titanium
Language C++14 (GCC 5.4.1)
Score 0
Code Size 418 Byte
Status
Exec Time 1 ms
Memory 256 KB

Test Cases

Set Name Score / Max Score Test Cases
Sample 0 / 0 a01, a02, a03
All 0 / 100 a01, a02, a03, b04, b05, b06, b07, b08, b09
Case Name Status Exec Time Memory
a01 1 ms 256 KB
a02 1 ms 256 KB
a03 1 ms 256 KB
b04 1 ms 256 KB
b05 1 ms 256 KB
b06 1 ms 256 KB
b07 1 ms 256 KB
b08 1 ms 256 KB
b09 1 ms 256 KB