
最短路
风中那朵云
2333333
展开
-
HDU2544 最短路
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2544 最短路裸题,点数小,可以直接用Floyd求解 贴代码 #include #include using namespace std; int g[105][105]; int main(){ // freopen("2544.in","r",stdin); // freopen("2原创 2017-07-24 22:19:19 · 241 阅读 · 0 评论 -
HDU1874 畅通工程续
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1874 最短路裸题,点很小,可以用Floyd 而且是单源最短路,也可以用Dijkstra(见下) 贴代码 #include #include using namespace std; const int maxn=205; int g[maxn][maxn],d[maxn]; boo原创 2017-07-24 22:58:19 · 165 阅读 · 0 评论 -
HDU2066 一个人的旅行
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2066 把与家相邻的地方与N+1相连,边长为0 把想到的地方与N+2相连,边长为0 N为所出现的数字的Max 刷N+1到N+2的最短路,单源最短路刷Dijkstra 贴代码 #include #include using namespace std; const int原创 2017-07-24 23:34:28 · 247 阅读 · 0 评论