摘要: 大致题意:给出源点和始点,求花费小于coin的条件下的最短路。采用优先队列搜索加cost[i]+cost[i->v]<=coin的进队条件(i->v为i的邻接点)。#include<iostream>#include<queue>#include<cstring>#include<functional>using namespace std;#define MAX_INT 1234567890struct node{ int v; int length; int value; int next;};node edge[10001 阅读全文
posted @ 2011-08-16 12:38 书山有路,学海无涯 阅读(396) 评论(0) 推荐(0) 编辑