this is the question
answer
#include <bits/stdc++.h>
#define ll long long
using namespace std;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int n, s, ans=0;
cin>>n;
unordered_map<int, int> mp;
for(int i=0; i<n; ++i)
{
int x, y;
cin>>x>>y;
mp[x+y]++;
}
cin>>s;
for(auto i:mp)
{
int z = i.first-s;
if(mp.find(z)!=mp.end())
ans+= (i.second * mp[z]);
}
cout<<ans<<endl;
}
explain me i am a beginner
map has stored all the x+y values but it has not stored the x+y-s then how can we find x+y-s
in map, if it is happening pls explaing about how can we use this if(mp.find(z)!=mp.end()) and it is giving the count;