hiho week 239 register

Ended

Participants:101

Verdict:Accepted
Score:100 / 100
Submitted:2019-01-31 20:44:03

Lang:G++

Edit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include<iostream>
#include<string.h>
using namespace std;
char s[105];
int main()
{
    int t;
    cin>>t;
    while(t--)
    {
        int f1=0,f2=0;
        cin>>s;
        int l=strlen(s);
        int a=0;
        for(int i=0;i<l;i++)
        {
            if(s[i]=='A')
            a++;
        }
        if(a>=2)
        f1=1;
        if(strstr(s,"LLL"))
        f2=1;
        if(f1||f2)
        cout<<"NO"<<endl;
        else cout<<"YES"<<endl; 
    }
    return 0;
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX