Created
January 8, 2019 11:03
-
-
Save Taohid0/cd78cb7e6755fe4a16f96c0f5a9bd6c5 to your computer and use it in GitHub Desktop.
c++ proirity_queue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bits/stdc++.h> | |
using namespace std; | |
int main() | |
{ | |
int value; | |
priority_queue<int>pq; | |
pq.push(1); | |
pq.push(2); | |
pq.push(3); | |
while(!pq.empty()) | |
{ | |
value = pq.top(); | |
pq.pop(); | |
cout<<value<< " "; | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment