Advertisement
Josif_tepe

Untitled

Apr 14th, 2025
667
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.54 KB | None | 0 0
  1. #include <iostream>
  2. #include <vector>
  3. #include <queue>
  4. using namespace std;
  5. struct node {
  6.     int idx, shortest_time, money;
  7.     node () {}
  8.     node(int _idx, int _shortest_time, int _money) {
  9.         idx = _idx;
  10.         shortest_time = _shortest_time;
  11.         money = _money;
  12.     }
  13.    
  14.     bool operator < (const node & tmp) const {
  15.         if(shortest_time == tmp.shortest_time) {
  16.             return money > tmp.money;
  17.         }
  18.         return shortest_time > tmp.shortest_time;
  19.     }
  20.    
  21. };
  22.  
  23. int main() {
  24.     return 0;
  25. }
  26.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement