class Solution {
public:
vector<vector> kSmallestPairs(vector& nums1, vector& nums2, int k) {
vector<vector>v;
int s1 = nums1.size();
int s2 = nums2.size();
priority_queue<pair<int, pair<int,int>>>max_heap;
for(int i= 0 ; i<s1 ;i++){
for(int j =0; j<s2; j++){
int sum = nums1[i]+nums2[j];
max_heap.push(sum,(nums1[i],nums2[j]));
if(max_heap.size()>k){
max_heap.pop();
}
}
}
while(max_heap.size()>0){
v.push_back(max_heap.top().second);
}
return v;
}
};
//Please help me and please tell me how to make pair and when to take vector while declaring priority_queue.