For this Question: You are given two integer arrays A and B of sizes N and M respectively. You need to modify the elements of A so that B becomes its subarray. Modifying an element means change the element to any other value.

Find the minimum number of modifications to achieve this.The first line of the input contains two integers N and M.
The second line of the input contains N space separated integers, the elements of array A.
The third line of the input contains M space separated integers, the elements of array B.

Constraints
1 <= M <= N <= 500
1 <= A[i], B[i] <= 10Output a single integer, the minimum number of modifications in A to make B its subarray.Sample Input
6 3
3 1 2 1 3 3
1 2 3

Sample Output
1

Explanation: If you modify A[4] from 1 to 3. A[2]. A[4] represents the array B, so B is its subarray.

Sample Input
10 5
3 4 5 3 4 3 1 3 5 2 
1 4 4 4 3 

Sample Output
3, I have written this Solution Code: import java.io.*;
import java.util.*;



class Main {
	public static void main (String[] args)throws IOException {
        BufferedReader read = new BufferedReader(new InputStreamReader(System.in));
		String str[] = read.readLine().trim().split(" ");
		int n = Integer.parseInt(str[0]);
		int m = Integer.parseInt(str[1]);

		int listn[] = new int[n];
		int listm[] = new int[m];

		str = read.readLine().trim().split(" ");

		for(int i = 0; i < n; i++)
		  listn[i]=Integer.parseInt(str[i]);

		str = read.readLine().trim().split(" ");

		for(int i = 0; i < m; i++)
		  listm[i]=Integer.parseInt(str[i]);

		int ans =m;

		for(int i=0; i < n-m+1 ; i++){
			int ct=0;
			for(int j=0;j <m; j++){
				if(listn[i+j] != listm[j]){
					ct++;
				}
			}
			ans = Math.min(ans,ct);
		}
		System.out.println(ans);

	}
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?