Pair inside priority queue

前端 未结 2 1807
别跟我提以往
别跟我提以往 2021-01-30 14:00

I am trying to store pairs in priority queue and I am using a compare function that compares second value of each pair.

#include
#include

        
2条回答
  •  春和景丽
    2021-01-30 14:52

    priority_queue,vector>,CompareDist> pq;
    

    you need to provide second argument for the inbuilt template of priority_queue.

提交回复
热议问题