Skip to content

Instantly share code, notes, and snippets.

@Bloofer
Last active November 19, 2021 08:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Bloofer/d8661f502be59301357677e948a9a807 to your computer and use it in GitHub Desktop.
Save Bloofer/d8661f502be59301357677e948a9a807 to your computer and use it in GitHub Desktop.
pq
struct Data{int idx; int value;};
Data db[MAX_N];
int pri[MAX_N];
priority_queue<pair<int, Data*>> PQ;
void find(){
while(!PQ.empty()){
int pri = PQ.top().first;
Data *p = PQ.top().second;
PQ.pop();
if(pri[p->idx]!=p->pri) continue;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment