Advertisement
Josif_tepe

Untitled

Feb 27th, 2022
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. bool operator < (const node &tmp) const {
  2. int p1 = 0, p2 = 0;
  3. if(cost > tmp.cost) {
  4. p1++;
  5. }
  6. else {
  7. p2++;
  8. }
  9. if(passed < tmp.passed) {
  10. p1++;
  11. }
  12. else {
  13. p2++;
  14. }
  15. return p1 < p2;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement