模板题:POJ-2449
#include<iostream>
#include<cstdio>
#include<cstring>
#include<queue>
#include<algorithm>
#define maxm 2000000
#define maxn 10000
using namespace std;
struct edge{
int v,w;
int next;
}e[maxm], e2[maxm];
int cnt = 0, k;
int head[maxn],head2[maxn];
int dis[maxn], vis[maxn];
struct node{
int u, w, f;
bool operator <(const node a) const{
if(a.f==f)
return a.w < w;
return a.f < f;
}
};
void addedge(int u, int v, int w)
{
e[cnt]