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: 

// #pragma GCC optimize("Ofast")
// #pragma GCC target("avx,avx2,fma")
#include<bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
#define pi 3.141592653589793238
#define int long long
#define ll long long
#define ld long double
using namespace __gnu_pbds;
using namespace std;
template <typename T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
mt19937 rnd(chrono::high_resolution_clock::now().time_since_epoch().count());


long long powm(long long a, long long b,long long mod) {
long long res = 1;
while (b > 0) {
    if (b & 1)
        res = res * a %mod;
    a = a * a %mod;
    b >>= 1;
}

return res;
}

ll gcd(ll a, ll b)
{
if (b == 0)
    return a;
return gcd(b, a % b);      
}


int find_ans(int x,int y)
{   
    int ans=0;
    ans=max(x,ans);
    ans=max(ans,y);
    ans=max(ans,x+y-x*y);
    return ans;
}



signed main()
{

ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(0);


#ifndef ONLINE_JUDGE
if(fopen("input.txt","r"))
{
freopen("input.txt","r",stdin);
freopen("output.txt","w",stdout);
}
#endif
    
    
  
      int n;
      cin>>n;
      int a[n];
      
      for(int i=0;i<n;i++)
        cin>>a[i];

    int b[n];
    for(int i=0;i<n;i++)
        cin>>b[i];
    int ans=0;

    for(int i=0;i<n;i++)
        ans+=find_ans(a[i],b[i]);

    cout<<ans;

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