For this Question: Given an array of integers, and an integer ‘K’, find the count of pairs of elements in the array whose sum is equal to 'K'.The first line of the input contains 2 space separated integers N and K denoting the size of array and the sum respectively.
The second line of the input contains N space separated integers denoting the elements of the array.

Constraints:
1 <= N <= 100000
1 <= K <= 100000
1 <= A[i] <= 100000Print the count of pairs of elements in the array whose sum is equal to the K.Sample Input:
4 6
1 5 7 1

Sample Output:
2, I have written this Solution Code: 
// author-Shivam gupta

#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

#define read(type) readInt<type>()
#define max1 1000008
#define out(x) cout<<x<<'\n'
#define out1(x) cout<<x<<" "
#define END cout<<'\n'
typedef long int li;

typedef unsigned long int uli;

typedef long long int ll;

typedef unsigned long long int  ull;


void fast(){
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
}

    ull cnt[max1];
int main(){

 int n,k;
 cin>>n>>k;
 int a[n];
 unordered_map<int,int> m;
 ll ans=0;
 for(int i=0;i<n;i++){
    cin>>a[i];
  if(m.find(k-a[i])!=m.end()){ans+=m[k-a[i]];}
  m[a[i]]++;
 }
 cout<<ans<<endl;
}

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