Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bool operator < (const node &tmp) const {
- int p1 = 0, p2 = 0;
- if(cost > tmp.cost) {
- p1++;
- }
- else {
- p2++;
- }
- if(passed < tmp.passed) {
- p1++;
- }
- else {
- p2++;
- }
- return p1 < p2;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement