Created
October 28, 2017 06:33
-
-
Save suenagasuenaga7/6cda4c55053d455887ead0b016e5172a to your computer and use it in GitHub Desktop.
ARC022
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.*; | |
class Main{ | |
public static void main(String[] args){ | |
Scanner sc = new Scanner(System.in); | |
String S = sc.next(); | |
boolean iflag = false; | |
boolean cflag = false; | |
boolean tflag = false; | |
for(int i = 0;i < S.length();i++){ | |
if(S.charAt(i) == 'I' || S.charAt(i) == 'i'){ | |
iflag = true; | |
continue; | |
} | |
if(iflag && (S.charAt(i) == 'C' || S.charAt(i) == 'c')){ | |
cflag = true; | |
continue; | |
} | |
if(cflag && (S.charAt(i) == 'T' || S.charAt(i) == 't')){ | |
tflag = true; | |
continue; | |
} | |
} | |
if(iflag && cflag && tflag){ | |
System.out.println("YES"); | |
}else{ | |
System.out.println("NO"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment