For this Question: You are given 2 arrays A and B, each of the size N. Each element of these arrays is either a positive integer or -1. The total number of -1's that can appear over these 2 arrays are &ge;1 and &le; 2.
Now, you need to find the number of ways in which we can replace each -1 with a non- negative integer, such that the sum of both of these arrays is equal.First line: An integer N.
Second line: N space- separated integers, where the of these denotes A[i].
Third line: N space- separated integers, where the i<sup>th</sup> of these denotes B[i]. 

<b>Constraints</b>
1 &le; N &le; 10<sup>5</sup>
-1 &le; A[i], B[i] &le; 10<sup>9</sup>
The -1's may spread out among both arrays, and their quantity is between 1 and 2 (both inclusive).If there exists a finite number X, then print it. If the answer is not a finite integer, then print 'Infinite'.Sample Input
4
1 2 -1 4
3 3 3 1
Sample Output
1
Explanation
We can replace the only -1 by 3, so that the sum of both of these arrays become 10., I have written this Solution Code: #include<bits/stdc++.h>

using namespace std;

typedef complex<double> base;
typedef long double ld;
typedef long long ll;

#define pb push_back
#define pii pair<int,int>
#define vi vector<int>

const int maxn=(int)(1e5+5);
const ll mod=(ll)(998244353);
int a[maxn],b[maxn];

int main()
{
    ios_base::sync_with_stdio(0);

    int n,ctr=0;cin>>n;

    ll sum1=0,sum2=0;

    bool a_q=false,b_q=false;

    for(int i=0;i<n;i++)
    {
        cin>>a[i];

        if(a[i]==-1)
        {
            a_q=true;

            ctr++;
        }

        else
        {
            sum1+=a[i];
        }
    }

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

        if(b[i]==-1)
        {
            ctr++;

            b_q=true;
        }

        else
        {
            sum2+=b[i];
        }
    }

//    cout<<a_q<<" "<<b_q<<" "<<ctr<<endl;

    if(ctr==1)
    {
        ll now=(a_q?(sum2-sum1):(sum1-sum2));

        if(now>=0)
        {
            cout<<1<<endl;
        }
        else
        {
            cout<<0<<endl;
        }
    }

    else
    {
        if(a_q && b_q)
        {
            cout<<"Infinite"<<endl;
        }

        else
        {
           ll now=(a_q?sum2-sum1:sum1-sum2);

           if(now>=0)
           {
               cout<<(now+1)<<endl;
           }

           else
           {
               cout<<0<<endl;
           }
        }
    }

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