Skip to content

Commit

Permalink
Update priority_queue.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
radicalparty authored Sep 6, 2024
1 parent c3d68ed commit 5deda10
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions data_structure/queue/priority_queue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,20 +87,3 @@ class pq {
return size == 0;
}
};

int main() {
cin.tie(0); cout.tie(0); ios_base::sync_with_stdio(false);
pq<int> test;
int n; cin >> n;
while (n--){
int x; cin >> x;
if (x) test.insert(x);
else{
if (test.empty()) cout << 0 << "\n";
else {
cout << test.top() << "\n"; test.pop();
}
}
}
return 0;
}

0 comments on commit 5deda10

Please sign in to comment.