Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- /*
- Sorry for the fail, I put the paste in pastebin wheter check that i loggued in
- my account, sorry for the inconvenence and enjoy for the code!
- Greeatings!
- */
- public class AllinAll {
- public static void main(String[] args) {
- Scanner x = new Scanner(System.in);
- String key;
- String enc;
- int ci=0;
- do{
- key = x.next();
- enc = x.next();
- int lop=0, trip=0;
- while(lop<key.length()){
- if(enc.contains(key.substring(lop, lop+1))){
- enc = enc.substring(enc.indexOf(key.charAt(lop)));
- trip++;
- }
- lop++;
- }
- if(trip == key.length()){
- System.out.println("Yes");
- }else{
- System.out.println("No");
- }
- ci++;
- }while(ci<20);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement