For this Question: You are given an array <b>A</b> of size <b>N</b>. You need to find the integer not present in this array that is closest to <b>K</b>. The closeness between two numbers A[i] and A[j] is defined as <b>abs(A[i] - A[j])</b>. 

For Example:
For given array A = [1,2,5,6,13]
For given K = 12
Output: 12

Explanation: numbers missing 3, 4, 7,8, 9, 10, 11, 12, 14, 15....
and K = 12, so distance from each missing number is (3,9), (4,8), ....
where every pair denotes (missing number, distance) hence 12 is answer.The first line of the input contains two integers N and K.

Constraints
1 <= N <= 1000
1 <= A[i] <= 10000
1 <= K <= 10000

(The array may not contain all distinct numbers)Output the required closest number.Sample Input
5 6
4 7 10 6 5

Sample Output
8

Explanation: Closeness of 8 is 2. There is no such number that has closeness lesser than this and is not a part of array.

Sample Input
5 10
4 7 10 6 5

Sample Output
9, I have written this Solution Code: #include <bits/stdc++.h>
using namespace std;
#define sd(x) scanf("%d", &x)
#define sz(v) (int) v.size()
#define pr(v) For(i, 0, sz(v)) {cout<<v[i]<<" ";} cout<<endl;
#define slld(x) scanf("%lld", &x)
#define all(x) x.begin(), x.end()
#define For(i, st, en) for(ll i=st; i<en; i++)
#define tr(x) for(auto it=x.begin(); it!=x.end(); it++)
#define fast std::ios::sync_with_stdio(false);cin.tie(NULL);
#define pb push_back
#define ll long long
#define ld long double
#define int long long
#define double long double
#define mp make_pair
#define F first
#define S second
typedef pair<int, int> pii;
typedef vector<int> vi;
#define pi 3.141592653589793238
const int MOD = 1e9+7;
const int INF = 1LL<<60;


const int N = 2e5+5;

// it's swapnil07 ;)
 
#ifdef SWAPNIL07
#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
template <typename Arg1>
void __f(const char* name, Arg1&& arg1){
    cout << name << " : " << arg1 << endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args){
    const char* comma = strchr(names + 1, ',');cout.write(names, comma - names) << " : " << arg1<<" | ";__f(comma+1, args...);
}
int begtime = clock();
#define end_routine() cout << "\n\nTime elapsed: " << (clock() - begtime)*1000/CLOCKS_PER_SEC << " ms\n\n";
#else
#define endl '\n'
#define trace(...)
#define end_routine()
#endif


void solve(){
    int x, n; cin>>n>>x;
    set<int> s;
    For(i, 0, n){
        int a; cin>>a;
        s.insert(a);
    }
    int v = INF;
    int cur = -INF;
    For(i, -1, 20001){
        if(s.find(i)!=s.end())
            continue;
        if(abs(i-x)<v){
            cur = i;
            v = abs(i-x);
        }
    }
    cout<<cur;
}


signed main()
{
    fast
    #ifdef SWAPNIL07
        freopen("input.txt","r",stdin);
        freopen("output.txt","w",stdout);
    #endif
    int t=1; 
    // cin>>t;
    while(t--){
        solve();
        cout<<"\n";
    }
    return 0;
}

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