Advertisement
Guest User

duvida

a guest
Apr 6th, 2020
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.38 KB | None | 0 0
  1. #include<iostream>
  2. #include<algorithm>
  3. #include<queue>
  4. #include<vector>
  5. using namespace std;
  6.  
  7. struct info{
  8.     int a;
  9.     long long int b;
  10.    
  11.     bool operator<(const info &i1, const info &i2) const{
  12.         return i1.a < i2.a;
  13.     }
  14. };
  15.  
  16. info cr(int a, long long int b){
  17.     info tmp;
  18.     tmp.a = a; tmp.b = b;
  19.     return tmp;
  20. }
  21. int main(){
  22.     priority_queue<info> q;
  23.     q.push(cr(1, 22));
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement