Company: Zeta
Difficulty: medium
Pair Hunting You are given two 1-indexed integer arrays A and B, each of size N, and an integer K. A good pair (i, j) (where 1 Add K to A[i]. Now let X = A[i] - A[j], Y = B[i] - B[j]. Then X Add K to B[i]. Now let X = A[i] - A[j], Y = B[i] - B[j]. Then X Return the number of good pairs. Input Format The first line contains two integers N and K. The second line contains N integers A[1], A[2], ..., A[N]. The third line contains N integers B[1], B[2], ..., B[N]. Output Format Print the number of good pairs. Constraints 2 ≤ N ≤ 10 5 -10 4 ≤ K ≤ 10 4 -10 4 ≤ A[i], B[i] ≤ 10 4 Examples Input: 4 2 1 2 3 4 5 6 7 8 Output: 6 Explanation: The good pairs are (1, 2), (1, 3), (1, 4), (2, 3), (2, 4), (3, 4). Code Template #include <bits/stdc++.h> using namespace std; class Solution { public: long long goodPairHunting(vector<int> &A, vector<int> &B, int K) { // Write your code here } }; int main() { int N, K; cin >> N >> K; vector<int> A(N); for(int i = 0; i > A[i]; } vector&l