For this Question: Saurabh has a paper of size N*M and some horizontal and vertical lines in the form of arrays. Saurabh wants to know the maximum area which is trapped inside the lines.

Note:- Consider the boundary of the paper to be vertical and horizontal lines. Also consider 0 indexingThe first line of input contains 4 space separated integers depicting N, M, size of array contains horizontal lines(H), size of array containing vertical lines(V). The second line contains H space separated integers depicting horizontal lines. Last lines contains V space separated integers depicting vertical lines.

Constraints:-
1 <= N, M <= 10<sup>9</sup>
1 <= H, V <= 100000
0 <= horizontal lines <= N
0 <= vertical lines <= MPrint the maximum area trapped between the lines.
<b>Note:</b>Area to be printed might be large print area as (area%(10<sup>9</sup> +7)).Sample Input:-
5 4 3 2
1 2 4
1 3

Sample Output:-
4

Explanation:-
The area is- (2,1), (2,3) (4,1) (4,3)

Sample Input:-
5 4 2 1
3 1
1

Sample Output:-
6, I have written this Solution Code: #include <bits/stdc++.h>


using namespace std;

#define MEM(a, b) memset(a, (b), sizeof(a))

#define FOREACH(it, l) for (auto it = l.begin(); it != l.end(); it++)

#define IN(A, B, C) assert( B <= A && A <= C)

#define MP make_pair
#define FOR(i,a) for(int i=0;i<a;i++)

#define FOR1(i,j,a) for(int i=j;i<a;i++)

#define EB emplace_back

#define INF (int)1e9

#define EPS 1e-9

#define PI 3.1415926535897932384626433832795
#define max1 101
#define MOD 1000000007

#define read(type) readInt<type>()

#define out(x) cout<<x<<'\n'
#define out1(x) cout<<x<<" "
#define END cout<<'\n'
#define int long long
#define sz(v) ((int)(v).size())
#define all(v) (v).begin(), (v).end()
void fast(){
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);

}

int solve(int ha, int w, vector<int>h, vector<int> v){
 sort(h.begin(),h.end());
        sort(v.begin(),v.end());
        h.push_back(ha);
        v.push_back(w);
        long long hh=h[0],vv=v[0];;
        for(int i=1;i<h.size();i++){
            hh=max(hh,(1LL)*(h[i]-h[i-1]));
        }
        for(int i=1;i<v.size();i++){
            vv=max(vv,(1LL)*(v[i]-v[i-1]));


    }

        return (hh*vv*1LL)%(1000000007);

}
signed main(){
fast();
    int n;
    cin>>n;
    int m;
    cin>>m;
    int x,y;
    cin>>x>>y;
    vector<int> h(x),v(y);
    FOR(i,x){
    cin>>h[i];}
    FOR(i,y){
    cin>>v[i];}
    cout<<solve(n,m,h,v);
}


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