For this Question: Triangle Land is a place where there are infinite countries. Each country is identified by two integers (x, y) where x >= 0 and y >= 0. Due to some mysterious event (maybe some people from earth teleporting to triangle land), some of the countries are getting infected with coronavirus. When a country (x, y) is infected with coronavirus immediately countries (x, y-1) and (x+1, y-1) get the infection too (if they exist) and they further propagate the coronavirus. Given a series of countries that got the virus due to the mysterious event find the number of new countries that got infected after propagation of current event ends.First line of input contains a single integer N, number of mysterious events.
N lines follow each containing two integers x, y denoting the country in which the event occured.

Constraints:
1 <= N <= 100000
0 <= x, y <= 1000000000For each event print the number of new countries that got infected after propagation of current event ends.Sample Input 
3
0 1
1 1
0 3

Sample Output
3
2
5

Explanation: 
After 1st event: (0,0) (1,0) (0,1) got infected.
After 2nd event: (1,1) (2,0) got infected while (1,0) was already infected
After 3rd event: (0,3) (0,2) (1,2) (2,1) (3,0) got infected while (0,0) (1,0) (0,1) (1,1) (2,0) were already infected., I have written this Solution Code: #include<bits/stdc++.h>
using namespace std;
#define VV vector
#define pb push_back
#define bitc  __builtin_popcountll
#define m_p make_pair
#define infi 1e18+1
#define eps 0.000000000001
#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL);
string char_to_str(char c){string tem(1,c);return tem;}
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
template<class T>//usage rand<long long>()
T rand() {
    return uniform_int_distribution<T>()(rng);
}
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
 
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> oset;
// string to integer stoi()
// string to long long stoll()
// string.substr(position,length);
// integer to string to_string();
 
//////////////
auto clk=clock();
#define all(x) x.begin(),x.end()
#define S second
#define F first
#define sz(x) ((long long)x.size())
#define int long long  
#define f80 __float128
#define pii pair<int,int>
/////////////

map<int, int> tr;
 
int getH(int x) {
    if (tr.size() == 0) {
        return 0;
    }
    map<int, int>::iterator it = tr.upper_bound(x);
    if (it  == tr.begin()) {
        return 0;
    }
    --it;
    return max(0ll, it->second - (x - it->first));
}
 
long long insert(int x, int y) {
    int h = getH(x);
    if (h >= y) {
        return 0;
    }
    long long ret = y - h;
    tr[x] = y;
    ++x, --y, h = max(h - 1, 0ll);
    while (y > 0) {
        map<int, int>::iterator it = tr.lower_bound(x);
        if (it == tr.end() || it->first - x >= y) {
            ret += (long long)y * (y + 1) / 2 - (long long)h * (h + 1) / 2;
            y = 0;
        } else {
            int d = it->first - x;
            ret += (long long)d * (y + y - d + 1) / 2;
            int dh = min(d, h);
            ret -= (long long)dh * (h + h - dh + 1) / 2;
            if (it->second >= y - (it->first - x)) {
                y = 0;
            } else {
                y = y - (it->first - x);
                x = it->first,
                h = it->second;
                tr.erase(it);
            }
        }
    }
    return ret;
}
 
signed main() {
	#ifdef ANIKET_GOYAL
		freopen("inputf.in","r",stdin);
		freopen("outputf.in","w",stdout);
	#endif
    int t;
    cin>>t;
    while (t--) {
        int x, y;
        cin>>x>>y;
        ++y;
        cout << insert(x, y) << endl;
    }
    return 0;
}, In this Programming Language: C++, Now tell me if this Code is compilable or not?