For this Question: There are n boys and m toys. Your task is to distribute the toys so that as many boys as possible will get a toy.
Each boy has a desired toy size, and they will accept any toy whose size is close enough to the desired size.
So if the desired toy size of a particular boy is 'a' and a particular toy has size 'b', then boy will only accept the toy if |b-a| <= k.The first input line has three integers n, m, and k: the number of boys, the number of toys, and the maximum allowed difference.

The next line contains n integers a[1], a[2],…, a[n]: the desired toy size of each boy. If the desired toy size of a boy is x, he will accept any toy whose size is between x−k and x+k.

The last line contains m integers b[1], b[2],…, b[m]: the size of each toy.

<b>Constraints</b>
1 ≤ n,m ≤ 200000
0 ≤ k ≤ 10<sup>9</sup>
1 ≤ a[i],b[i] ≤ 10<sup>9</sup>Print one integer: the number of boys who will get a toy.Sample Input
4 3 5
60 45 80 60
30 60 75

Sample Output
2

Explanation: One possible way can give second toy to first boy and third toy to third boy.

Sample Input:
10 10 0
37 62 56 69 34 46 10 86 16 49
50 95 47 43 9 62 83 71 71 7

Sample Output:
1, I have written this Solution Code: 

#include <bits/stdc++.h>


using namespace std;

#define MEM(a, b) memset(a, (b), sizeof(a))

#define FOREACH(it, l) for (auto it = l.begin(); it != l.end(); it++)

#define IN(A, B, C) assert( B <= A && A <= C)

#define MP make_pair
#define FOR(i,a) for(int i=0;i<a;i++)

#define FOR1(i,j,a) for(int i=j;i<a;i++)

#define EB emplace_back

#define INF (int)1e9

#define EPS 1e-9

#define PI 3.1415926535897932384626433832795

#define MOD 1000000007
const int N = 3e5+5;

#define read(type) readInt<type>()
#define max1 200010
#define out(x) cout<<x<<'\n'
#define out1(x) cout<<x<<" "
#define END cout<<'\n'
const double pi=acos(-1.0);

typedef pair<int, int> PII;

typedef vector<int> VI;

typedef vector<string> VS;

typedef vector<PII> VII;

typedef vector<VI> VVI;

typedef map<int,int> MPII;

typedef set<int> SETI;

typedef multiset<int> MSETI;

typedef long int li;

typedef unsigned long int uli;

typedef long long int ll;

typedef unsigned long long int  ull;
const ll inf = 0x3f3f3f3f3f3f3f3f;
const ll mod = 998244353;

bool isPowerOfTwo (int x)
{
  /* First x in the below expression is
    for the case when x is 0 */
  return x && (!(x&(x-1)));
}
void fast(){
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
}
ll power(ll x, ll y, ll p)
{
    ll res = 1;      // Initialize result

    x = x % p;  // Update x if it is more than or
                // equal to p

    while (y > 0)
    {
        // If y is odd, multiply x with result
        if (y & 1)
            res = (res*x) % p;

        // y must be even now
        y = y>>1; // y = y/2
        x = (x*x) % p;
    }
    return res;
}

// Returns n^(-1) mod p
ll modInverse(ll n, ll p)
{
    return power(n, p-2, p);
}

// Returns nCr % p using Fermat's little
// theorem.
int c[max1];
int main()
{

int n,m;
cin>>n>>m;
ll k;
cin>>k;
ll a[n],b[m];
FOR(i,n){
cin>>a[i];
}
FOR(i,m){
cin>>b[i];}
sort(a,a+n);
sort(b,b+m);

int i=0,j=0;
int cnt=0;
while(i!=n && j!=m){
    if(abs(b[j]-a[i])<=k){cnt++;i++;j++;}
    else{
        if(b[j]>a[i]){i++;}
        else{j++;}
    }
}
out(cnt);

}

, In this Programming Language: C++, Now tell me if this Code is compilable or not?