For this Question: You are given an array A of size N. Find the number of pairs of indices (i, j) in the array A such that i < j and A<sub>i</sub> - i = A<sub>j</sub> - j.The first line of the input contains a single integer N.
The second line of the input contains N space seperated integers.

Constraints:
1 <= N <= 10<sup>5</sup>
1 <= A<sub>i</sub> <= 10<sup>5</sup>Print the number of pairs of indices (i, j) in the given array A such that i < j and A<sub>i</sub> - i = A<sub>j</sub> - j.Sample Input:
4
1 3 3 4

Sample Output:
3

Explaination:
The three pairs of indices are:
(1, 3) -> A[1] - 1 = A[3] - 3 -> 1 - 1 = 3 - 3 -> 0 = 0
(1, 4) -> A[1] - 1 = A[4] - 4 -> 1 - 1 = 4 - 4 -> 0 = 0
(3, 4) -> A[3] - 3 = A[4] - 4 -> 3 - 3 = 4 - 4 -> 0 = 0, I have written this Solution Code: #include<bits/stdc++.h>
using namespace std;
#define int long long

signed main() {
    int n;
    cin >> n;
    map<int, int> mp;
    int ans = 0;
    for(int i = 1; i <= n; ++i){
        int x;
        cin >> x;
        mp[x - i]++;
    }
    for(auto i:mp)
        ans += i.second * (i.second - 1)/2;
    cout << ans;
}, In this Programming Language: C++, Now tell me if this Code is compilable or not?