class Solution {
public:
bool checkRecord(string s) {
int ans = 0;
for(int i = 0;i<s.size();i++)
{
if(s[i] == 'A') ans++;
}
return ans<=1&&s.find("LLL")==string::npos;
}
};
class Solution {
public:
bool checkRecord(string s) {
int ans = 0;
for(int i = 0;i<s.size();i++)
{
if(s[i] == 'A') ans++;
}
return ans<=1&&s.find("LLL")==string::npos;
}
};