A. A Blend of Springtime

 

http://codeforces.com/contest/989/problem/A

 

很简单的模拟

 

 

 1     public static void main(String[] args) {
 2         IO io = new IO();
 3         String s=io.nextLine();
 4         if (s.length()<3)io.println("No");
 5         else {
 6             int[]b=new int[200];
 7             for (int i=2;i<s.length();i++){
 8                 b['.']=b['A']=b['B']=b['C']=0;
 9                 b[s.charAt(i-2)]=1;
10                 b[s.charAt(i-1)]=1;
11                 b[s.charAt(i)]=1;
12                 if (b['A']+b['B']+b['C']==3){io.println("Yes");return;}
13             }
14             io.println("No");
15         }
16     }

 

posted @ 2019-07-25 08:42  dodoBehind  阅读(180)  评论(0编辑  收藏  举报