import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.util.Arrays; import java.util.NoSuchElementException; import java.util.Scanner; public class Main { public static void main(String[] args) throws FileNotFoundException { long t = System.currentTimeMillis(); new Main().run(); System.err.println(System.currentTimeMillis() - t); } void run() { Scanner sc = new Scanner(System.in); int n=sc.nextInt(); int m=sc.nextInt(); char[] S=sc.next().toCharArray(); char[] T=sc.next().toCharArray(); int[][] dp=new int[n+1][m+1]; int INF=Integer.MAX_VALUE/3; for(int i=0;i<=n;++i)for(int j=0;j<=m;++j)dp[i][j]=INF; dp[0][0]=0; for(int i=0;i