Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct node {
- int idx;
- int mood;
- int passed_nodes;
- node() {}
- node(int _idx, int _mood, int _passed_nodes) {
- idx = _idx;
- mood = _mood;
- passed_nodes = _passed_nodes;
- }
- bool operator < (const node &tmp) const {
- int score1 = 0, score2 = 0;
- if(mood > tmp.mood) {
- score1++;
- }
- else {
- score2++;
- }
- if(passed_nodes < tmp.passed_nodes) {
- score1++;
- }
- else {
- score2++;
- }
- return score1 < score2;
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement