For this Question: You are given two arrays A and B, both of length N. Let P and Q be two subsets(possibly empty) of the set {1, 2, 3, ... N}. You should choose P and Q in such a way that the quantity:

<big>Σ<sub>i ∈ P</sub> A<sub>i</sub>   &nbsp; +    &nbsp;  Σ<sub>i ∈ Q</sub> B<sub>i</sub>    &nbsp;    –   &nbsp;   Σ<sub>i ∈ P∩Q </sub>A<sub>i</sub>B<sub>i</sub> </big>

is maximized. Print this maximum value.The first line contains a single integer N – the size of the arrays A and B.
The second line contains N space-separated integers – A<sub>1</sub>, A<sub>2</sub> ... , A<sub>N</sub>.
The third line contains N space-separated integers – B<sub>1</sub>, B<sub>2</sub> ... , B<sub>N</sub>.

<b>Constraints:</b>
1 ≤ N ≤ 10<sup>5</sup>
-10<sup>4</sup> ≤ A<sub>i</sub>, B<sub>i</sub> ≤ 10<sup>4</sup>Print a single integer – the maximum possible value of the given quantity.Sample Input 1:
3
2 2 -2
2 -2 0

Sample Output 1:
6

Sample Explanation 1:
Here, it will be optimal to choose P = {1,2} and Q = {2}. Thus, answer will be (2 + 2) + (-2) - (2*(-2)) = 6.

Sample Input 2:
7
-5 -3 4 1 -2 3 -1
-5 -5 -3 1 -3 0 0

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



class Main {
    public static void main (String[] args) {

                      FastReader read=new FastReader();
                      int n = read.nextInt();
                      int a[] = new int[n];
                      int b[] = new int[n];

                      for(int i=0;i<n;i++)
                      {
                          a[i] = read.nextInt();

                      }
                      long ans = 0;
                      for(int i=0;i<n;i++)
                      {
                          b[i] = read.nextInt();

                          int max = Math.max(a[i],b[i]);
                          max = Math.max(max,a[i]+b[i]-(a[i]*b[i]));
                          ans+=Math.max(0,max);
                      }
                      System.out.println(ans);
    }
    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        public FastReader()
        {
            br = new BufferedReader(
                new InputStreamReader(System.in));
        }

        String next()
        {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

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

        long nextLong() { return Long.parseLong(next()); }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine()
        {
            String str = "";
            try {
                str = br.readLine();
            }
            catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?