1 static int wing=[]()
 2 {
 3     std::ios::sync_with_stdio(false);
 4     cin.tie(NULL);
 5     return 0;
 6 }();
 7 
 8 class Solution 
 9 {
10 public:
11     bool checkRecord(string s) 
12     {
13         int countA=0;
14         int len=s.length();
15         for(int i=0;i<len;i++)
16         {
17             if(s[i]=='A')
18                 countA++;
19             if(s[i]=='L')
20             {
21                 if(i+2<len&&s[i+1]=='L'&&s[i+2]=='L')
22                     return false;
23             }
24         }
25         return countA>1? false:true;
26     }
27 };

简单,问题不大

posted on 2018-06-05 09:38  高数考了59  阅读(118)  评论(0)    收藏  举报