For this Question: Given an array A of size N and an integer K, find and print the number of pairs of indices i, j (1 <= i < j <= N) such that A<sub>i</sub> * A<sub>j</sub> > K.First line of the input contains two integers N and K.
The second line of the input contains N space seperated integers.

Constraints:
1 <= N <= 10<sup>5</sup>
1 <= K <= 10<sup>12</sup>
1 <= A<sub>i</sub> <= 10<sup>6</sup>Print the number of pairs of indices i, j (1 <= i < j <= N) such that A<sub>i</sub> * A<sub>j</sub> > K.Sample Input:
7 20
5 7 2 3 2 9 1

Sample Output:
5

Explanation:
The following pairs of indices satisfy the condition (1-based indexing)
(1, 2) -> 5 * 7 = 35
(1, 6) -> 5 * 9 = 45
(2, 4) -> 7 * 3 = 21
(2, 6) -> 7 * 9 = 63
(4, 6) -> 3 * 9 = 27
All these products are greater than K (= 20)., I have written this Solution Code: #include<bits/stdc++.h>
using namespace std;

#define fast ios_base::sync_with_stdio(false); cin.tie(NULL);
#define int long long
#define pb push_back
#define ff first
#define ss second
#define endl '\n'
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()

using T = pair<int, int>;

typedef long long ll;
const int mod = 1e9 + 7;
const int INF = 1e9;

void solve(){
	int n, k;
    cin >> n >> k;
    vector<int> a(n);
    for(auto &i : a) cin >> i;
    sort(all(a));
    int ans = 0;
    for(int i = 0; i < n; i++){
        int x = k/a[i];
        if(x * a[i] < k) x++;
        int l = i + 1, r = n - 1, ind = n;
        while(l <= r){
            int m = (l + r)/2;
            if(a[m] >= x){
                r = m - 1;
                ind = m;
            }
            else l = m + 1;
        }
        ans += n - ind;
    }
    cout << ans;
}

signed main(){
    fast
    int t = 1;
    // cin >> t;
    for(int i = 1; i <= t; i++){
        solve();
        if(i != t) cout << endl;
    }
}, In this Programming Language: C++, Now tell me if this Code is compilable or not?