vector的sort属于小根堆。
而priority_queue默认是大根堆,因此在struct内部重载<要注意方向。
#include<cstdio>
#include<vector>
#include<queue>
#include<algorithm>
using namespace std;
struct edge{
int weight;
int u,v;
edge(int a,int b,int c):weight(c),u(a),v(b){
}
bool operator < (