For this Question: The coolness of the subarray of an array is the sum of elements in the subarray. The coolest subarray is the subarray having the maximum coolness, while the hottest subarray is the one having minimum coolness (obviously it can be negative). The coolest and the hottest subarrays are always <b>non-empty</b>.

Tono believes that cool and hot are happy together. The happiness of the array is the absolute difference between the coolness of its coolest and its hottest subarray. 

Given an array A consisting of N elements, find its happiness.The first line of the input contains an integer N.
The next line contains N singly spaced integers A[1], A[2],...A[N]

Constraints
1 <= N <= 200000
-1000000000 <= A[i] <= 1000000000Output a single integer, the happiness of the array.
(The output may not fit into 32 bit integer datatype, use long long integer datatype instead).Sample Input
5
-1 2 -3 1 -5

Sample Output
9

Explanation: Coolest subarray of the array is [2], while the hottest subarray of the array is [-3, 1, -5]. The happiness of the array is 2-(-7)=9., I have written this Solution Code: #include <bits/stdc++.h>
using namespace std;
#define sd(x) scanf("%d", &x)
#define sz(v) (int) v.size()
#define pr(v) For(i, 0, sz(v)) {cout<<v[i]<<" ";} cout<<endl;
#define slld(x) scanf("%lld", &x)
#define all(x) x.begin(), x.end()
#define For(i, st, en) for(ll i=st; i<en; i++)
#define tr(x) for(auto it=x.begin(); it!=x.end(); it++)
#define fast std::ios::sync_with_stdio(false);cin.tie(NULL);
#define pb push_back
#define ll long long
#define int long long
#define mp make_pair
#define F first
#define S second
typedef pair<int, int> pii;
typedef vector<int> vi;
#define MOD 1000000007
#define INF 1000000000000000007LL

const int N = 200005;
 
// it's swapnil07 ;)
 
#ifdef SWAPNIL07
#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
template <typename Arg1>
void __f(const char* name, Arg1&& arg1){
    cout << name << " : " << arg1 << endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args){
    const char* comma = strchr(names + 1, ',');cout.write(names, comma - names) << " : " << arg1<<" | ";__f(comma+1, args...);
}
int begtime = clock();
#define end_routine() cout << "\n\nTime elapsed: " << (clock() - begtime)*1000/CLOCKS_PER_SEC << " ms\n\n";
#else
#define endl '\n'
#define trace(...)
#define end_routine()
#endif

int arr[N];
int n;

int kadane(){
    int sum = 0;
    int mx = 0;
    For(i, 0, n){
        sum += arr[i];
        if(sum < 0){
            sum = 0;
        }
        mx = max(sum, mx);
    }
    if(mx > 0)
        return mx;
    // all elements negative
    mx = -10000000000LL;
    For(i, 0, n){
        mx = max(mx, arr[i]);
    }
    return mx;
}

signed main()
{
    fast
    #ifdef SWAPNIL07
        freopen("input.txt","r",stdin);
        freopen("output.txt","w",stdout);
    #endif
    cin>>n;
    For(i, 0, n){
        cin>>arr[i];
    }
    int v1 = kadane();
    For(i, 0, n){
        arr[i]=-1*arr[i];
    }
    int v2 = kadane();
    cout<<v1+v2;
    return 0;
}, In this Programming Language: C++, Now tell me if this Code is compilable or not?