@@ -0,0 +1,718 @@
+import java.util.*;%0Aimport java.io.*;%0A%0Aclass Abbreviation %7B%0A%0A%09static boolean isUpperCase(char c) %7B%0A%09%09return (c %3E= 'A' && c %3C= 'Z');%0A%09%7D%0A%0A%09static char upperCase(char c) %7B%0A%09%09if(isUpperCase(c)) return c;%0A%09%09return (char)(c + 32);%0A%09%7D%0A%0A%09boolean dp%5B%5D%5B%5D;%0A%0A%09public static void main(String args%5B%5D) %7B%0A%09%09Scanner sc = new Scanner(System.in);%0A%09%09int queries = Integer.parseInt(sc.nextLine());%0A%09%09dp = new int%5B1011%5D%5B1011%5D;%0A%09%09while(queries--!=0)%7B%0A%09%09%09String a = sc.nextLine();%0A%09%09%09String b = sc.nextLine();%0A%09%09%09for(int i=0;i%3C=a.length();i++)%7B%0A%09%09%09%09for(int j=0;j%3C=b.length();j++)%7B%0A%09%09%09%09%09dp%5Bi%5D%5Bj%5D = false;%0A%09%09%09%09%7D%0A%09%09%09%7D%0A%09%09%09dp%5B0%5D%5B0%5D = true;%0A%09%09%09for(int i=0;i%3Ca.length();i++)%7B%0A%09%09%09%09for(int j=0;j%3C=b.length();j++)%7B%0A%09%09%09%09%09if(dp%5Bi%5D%5Bj%5D)%0A%09%09%09%09%7D%0A%09%09%09%7D%0A%09%09%7D%0A%09%7D%0A%7D

Add solution of 1 DP problem