For this Question: Morgan was opening some boxes when she found one bearing a message “For Morgan, Dad loves you 3000". She wants to open the box but she needs to solve the question to open it. She asks Peter to do that. Help Peter and Morgan solve the question so that they can see what's inside the box.

Given two arrays Arr1 and Arr2 of size N1 and N2. Your task is to find the sum of all elements that are common to both arrays. If there are no common elements the output would be 0.

Note: The arrays may contain duplicate elements. However, you need to sum only unique elements that are common to both arrays.The first line of input contains N1 and N2 separated by a space. The second line contains N1 space separated elements of Arr1. The third line contains N2 space separated elements of Arr2.

Constraints:
1 <= N1, N2 <= 10<sup>6</sup>
1 <= Arr1[i], Arr2[i] <= 1000000000Print the sum of common elements.Sample Input:
5 6
1 2 3 4 5
2 3 4 5 6 7

Sample Output:
14

Explanation:- Common elements = 2, 3, 4 , 5
sum= 2 + 3 + 4 + 5 = 14

Sample Input:-
3 3
1 2 3
4 5 6

Sample Output:-
0, I have written this Solution Code: #include<bits/stdc++.h>
using namespace std;

#define pu push_back
#define fi first
#define se second
#define mp make_pair
#define int long long
#define pii pair<int,int>
#define mm (s+e)/2
#define all(x) x.begin(), x.end()
#define For(i, st, en) for(int 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 sz 200000
#define qw1 freopen("input1.txt", "r", stdin); freopen("output1.txt", "w", stdout);
#define qw2 freopen("input2.txt", "r", stdin); freopen("output2.txt", "w", stdout);
#define qw3 freopen("input3.txt", "r", stdin); freopen("output3.txt", "w", stdout);
#define qw4 freopen("input4.txt", "r", stdin); freopen("output4.txt", "w", stdout);
#define qw5 freopen("input5.txt", "r", stdin); freopen("output5.txt", "w", stdout);
#define qw6 freopen("input6.txt", "r", stdin); freopen("output6.txt", "w", stdout);
#define qw freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout);

signed main()
{
	
   int n,m;
   cin>>n>>m;

   set<int> ss,yy;
   for(int i=0;i<n;i++)
   {
   	int a;
   	cin>>a;
   	ss.insert(a);
   }
   for(int i=0;i<m;i++)
   {
   	int a;
   	cin>>a;
   	if(ss.find(a)!=ss.end()) yy.insert(a);
   }
   int sum=0;
   for(auto it:yy)
   {
   sum+=it;
   }

   cout<<sum<<endl;






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