For this Question: You are given two arrays A and B of n elements, each element is either 0 or 1.

You can make operations of 2 kinds:

Pick an index i and change A[i] to 1−A[i].
Rearrange the array A however you want.

Find the minimum number of operations required to make a equal to b.First line contains n.
Next line contains n space separated integers denoting Array A.
Next line contains n space separated integers denoting Array B.

<b>Constraints</b>
1 <= n <= 10<sup>5</sup>
0 <= A[i], B[i] <= 1A single integer denoting required operations.Input:
3
1 0 1
0 0 1

Output:
1

Explanation : 
change A[0].

Input:
4
1 1 0 0
0 1 1 1

Output:
2

Explanation : 
change A[2] and then rearrange., I have written this Solution Code: import java.io.*;
import java.util.*;


public class Main {
    
   
    
    
    public static void main(String[] args) {
        
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        
        int n=Integer.parseInt(in.next());
        
        int a[] = new int[n];
        int b[] = new int[n];
        int x=0,y=0,z=0;
        for(int i=0;i<n;i++){
            a[i] = Integer.parseInt(in.next());
            x+=a[i];
        }
        for(int i=0;i<n;i++){
            b[i] = Integer.parseInt(in.next());
            y+=b[i];
            if(a[i] != b[i])z++;
        }
        int ans=Math.abs(x-y) + 1;
        ans=Math.min(ans,z);
        
        out.print(ans);
        out.close();
    }

    
    static class InputReader {
        BufferedReader reader;
        StringTokenizer tokenizer;
        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void print(Object... objects) {
            for (int i = 0; i < objects.length; i++) {
                if (i != 0) {
                    writer.print(' ');
                }
                writer.print(objects[i]);
            }
        }

        public void println(Object... objects) {
            print(objects);
            writer.println();
        }

        public void close() {
            writer.close();
        }

        public void println(int i) {
            writer.println(i);
        }

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