A. A Blend of Springtime

 

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

 

Very simple simulation

 

 

 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     }

 

Guess you like

Origin www.cnblogs.com/towerbird/p/11242032.html