@@ -0,0 +1,657 @@
+package DynamicProgramming;%0A%0Aimport java.util.Scanner;%0A%0A/**%0A * Created by Yogurt on 6/24/16.%0A */%0Apublic class %E6%9C%80%E9%95%BF%E5%85%AC%E5%85%B1%E5%AD%90%E5%BA%8F%E5%88%97 %7B%0A    public static void main(String%5B%5D args)%7B%0A        Scanner sc=new Scanner(System.in);%0A        int n=sc.nextInt();%0A        int m=sc.nextInt();%0A        String s=sc.next();%0A        String t=sc.next();%0A        int%5B%5D%5B%5D dp=new int%5Bn+1%5D%5Bm+1%5D;%0A        for(int i=0;i%3Cn;i++)%0A            for(int j=0;j%3Cn;j++)%7B%0A                if(s.charAt(i)==t.charAt(j))%0A                    dp%5Bi+1%5D%5Bj+1%5D=dp%5Bi%5D%5Bj%5D+1;%0A                else%0A                    dp%5Bi+1%5D%5Bj+1%5D=Math.max(dp%5Bi+1%5D%5Bj%5D,dp%5Bi%5D%5Bj+1%5D);%0A            %7D%0A        System.out.println(dp%5Bn%5D%5Bm%5D);%0A    %7D%0A%7D%0A

finished the longest common sub sequence problem