Language: C++

#include<bits/stdc++.h>
using namespace std;
bool cmp(pair<int,long long int >a,pair<int,long long int >b){
    return a.second>b.second;
}
bool shit(long long int a, long long int b){
    return a>b;
}

struct node{
    int av;
    int bv;
    int cv;
};
class cmp{
    public:
    bool operator()(pair<node,long long int> a,pair<node,long long int>b){
        return a.second<b.second;
    }
};
int main(){
    map<node,bool >mp;
	int x,y,z;
  cin>>x>>y>>z;
  int k;
  cin>>k;
  long long int a[x],b[y],c[z];
  for(int i=0;i<x;i++)cin>>a[i];
  for(int i=0;i<y;i++)cin>>b[i];
  for(int i=0;i<z;i++)cin>>c[i];
  int pa=0,pb=0,pc=0;
  sort(a,a+x);sort(b,b+x);sort(c,c+x);
    node temp;
    temp.av=x-1;
    temp.bv=y-1;
    temp.cv=z-1;
    priority_queue<pair<node,long long int>,vector<pair<node,long long int> > ,cmp> dik;
  dik.push(make_pair(temp,a[x-1]+b[y-1]+c[z-1]));
  while(k--){
      temp=dik.top().first;
      long long int value=dik.top().second;
      dik.top();
     if(mp[temp]){
         continue;
     }mp[temp]=true;
      cout<<value<<endl;
      temp.av--;
      dik.push(make_pair(temp,a[temp.av]+b[temp.bv]+c[temp.cv]));
      temp.av++;
      temp.bv--;
      dik.push(make_pair(temp,a[temp.av]+b[temp.bv]+c[temp.cv]));
      temp.bv++;
      temp.cv--;
      dik.push(make_pair(temp,a[temp.av]+b[temp.bv]+c[temp.cv]));
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:37:83: error: type/value mismatch at argument 3 in template parameter list for 'template<class _Tp, class _Sequence, class _Compare> class std::priority_queue'
   37 |     priority_queue<pair<node,long long int>,vector<pair<node,long long int> > ,cmp> dik;
      |                                                                                   ^
a.cc:37:83: note:   expected a type, got 'cmp'
a.cc:38:7: error: request for member 'push' in 'dik', which is of non-class type 'int'
   38 |   dik.push(make_pair(temp,a[x-1]+b[y-1]+c[z-1]));
      |       ^~~~
a.cc:40:16: error: request for member 'top' in 'dik', which is of non-class type 'int'
   40 |       temp=dik.top().first;
      |                ^~~
a.cc:41:31: error: request for member 'top' in 'dik', which is of non-class type 'int'
   41 |       long long int value=dik.top().second;
      |                               ^~~
a.cc:42:11: error: request for member 'top' in 'dik', which is of non-class type 'int'
   42 |       dik.top();
      |           ^~~
a.cc:48:11: error: request for member 'push' in 'dik', which is of non-class type 'int'
   48 |       dik.push(make_pair(temp,a[temp.av]+b[temp.bv]+c[temp.cv]));
      |           ^~~~
a.cc:51:11: error: request for member 'push' in 'dik', which is of non-class type 'int'
   51 |       dik.push(make_pair(temp,a[temp.av]+b[temp.bv]+c[temp.cv]));
      |           ^~~~
a.cc:54:11: error: request for member 'push' in 'dik', which is of non-class type 'int'
   54 |       dik.push(make_pair(temp,a[temp.av]+b[temp.bv]+c[temp.cv]));
      |           ^~~~
In file included from /usr/include/c++/14/string:49,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_function.h: In instantiation of 'constexpr bool std::less<_Tp>::operator()(const _Tp&, const _Tp&) const [with _Tp = node]':
/usr/include/c++/14/bits/stl_map.h:511:32:   required from 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const key_type&) [with _Key = node; _Tp = bool; _Compare = std::less<node>; _Alloc = std::allocator<std::pair<const node, bool> >; mapped_type = bool; key_type = node]'
  511 |         if (__i == end() || key_comp()(__k, (*__i).first))
      |                             ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
a.cc:43:16:   required from here
   43 |      if(mp[temp]){
      |                ^
/usr/include/c++/14/bits/stl_function.h:405:20: error: no match for 'operator<' (operand types are 'const node' and 'const node')
  405 |       { return __x < __y; }
      |                ~~~~^~~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
                 from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/bits/stl_pair.h:1045:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator<(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
 1045 |     operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
      |     ^~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1045:5: note:   template argument deduction/substitution failed:
/usr/include/c++/14/bits/stl_function.h:405:20: note:   'const node' is not derived from 'const std::pair<_T1, _T2>'
  405 |       { return __x < __y; }
      |                ~~~~^~~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:67:
/usr/include/c++/14/bits/stl_iterator.h:448:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
  448 |     operator<(const reverse_iterator<_Iterator>& __x,
      |     ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:448:5: note:   template argument deduction/substitution failed:
/usr/include/c++/14/bits/stl_function.h:405:20: note:   'const node' is not derived from 'const std::reverse_iterator<_Iterator>'
  405 |       { return __x < __y; }
      |                ~~~~^~~~~
/usr/include/c++/14/bits/stl_iterator.h:493:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
  493 |     operator<(const reverse_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:493:5: note:   template argument deduction/substitution failed:
/usr/include/c++/14/bits/stl_function.h:405:20: note:   'const node' is not derived from 'const std::reverse_iterator<_Iterator>'
  405 |       { return __x < __y; }
      |                ~~~~^~~~~
/usr/include/c++/14/bits/stl_iterator.h:1694:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
 1694 |     operator<(const move_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1694:5: note:   template argument deduction/substitution failed:
/usr/include/c++/14/bits/stl_function.h:405:20: note:   'const node' is not derived from 'const std::move_iterator<_IteratorL>'
  405 |       { return __x < __y; }
      |                ~~~~^~~~~
/usr/include/c++/14/bits/stl_iterator.h:1760:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
 1760 |     operator<(const move_iterator<_Iterator>& __x,
      |     ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1760:5: note:   template argument deduction/substitution failed:
/usr/include/c++/14/bits/stl_function.h:405:20: note:   'const node' is not derived from 'const std::move_iterator<_IteratorL>'
  405 |       { return __x < __y; }
      |                ~~~~^~~~~