Alex_tz307

Min_Heap

Sep 11th, 2020
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.40 KB | None | 0 0
  1. struct nod {
  2.     int x , y, c;
  3.     bool operator < (const nod &A) const {
  4.         return c > A.c;
  5.     }
  6. }xx;
  7.  
  8. priority_queue < nod > Q;
  9. ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  10. struct fcmp {
  11.     bool operator () (int x, int y) {
  12.         return D[x] > D[y];
  13.     }
  14. };
  15.  
  16. priority_queue < int, vector < int >, fcmp > Q;
Advertisement
Add Comment
Please, Sign In to add comment