#include #include #include #include using namespace std; #define inf 1000000000 struct edge { int to,cost,next; int T, mod; }e[32000]; struct node { int x,y,z; node(int _x=0, int _y=0, int _z=0):x(_x),y(_y),z(_z){} bool operator<(const node& a)const { return y>a.y; } }; priority_queue que; bool visit[4000]; int dis[4000][2]; int pre[4000]; int next[8000]; int n,m,num; int a[40][40]; void addedge(int from, int to, int cost, int T, int mod) { e[num].to=to;e[num].cost=cost; e[num].T=T;e[num].mod=mod; e[num].next=pre[from]; pre[from]=num; num++; } void make_map() { num=1; memset(pre, 0, sizeof(pre)); for (int i=0; i