码迷,mamicode.com
首页 >  
搜索关键字:highways    ( 182个结果
1030 Travel Plan (30分)
A traveler's map gives the distances between cities along the highways, together with the cost of each highway. Now you are supposed to write a progra ...
分类:其他好文   时间:2021-02-02 11:30:56    阅读次数:0
1033 To Fill or Not to Fill
With highways available, driving a car from Hangzhou to any other city is easy. But since the tank capacity of a car is limited, we have to find gas s ...
分类:其他好文   时间:2020-06-14 01:10:06    阅读次数:71
PAT 1030 Travel Plan (30分) Dijstra +Dfs
题目 A traveler's map gives the distances between cities along the highways, together with the cost of each highway. Now you are supposed to write a pro ...
分类:Web程序   时间:2020-05-27 18:35:42    阅读次数:73
PAT Advanced 1013 Battle Over Cities (25分)
It is vitally important to have all the cities connected by highways in a war. If a city is occupied by the enemy, all the highways from/toward that c ...
分类:其他好文   时间:2020-02-01 01:04:58    阅读次数:91
Highways POJ - 1751
#include<iostream> #include<cstdio> #include<cmath> #include<algorithm> using namespace std; const int maxn=800; int n,m,tot,u,v; int pre[maxn]; //存点 ...
分类:其他好文   时间:2020-01-29 15:48:00    阅读次数:51
Poj 2485 Highways
因为这个图比较稠密,所以用prim算法 每次选到最小边的时候判断,保存最小边里面最大的边 注意要用scanf不然会超时 #include<iostream> #include<cstdio> #include<cstring> #include<string> using namespace std ...
分类:其他好文   时间:2020-01-26 22:18:55    阅读次数:59
1013 Battle Over Cities (25分) DFS | 并查集
1013 Battle Over Cities (25分) It is vitally important to have all the cities connected by highways in a war. If a city is occupied by the enemy, all t ...
分类:其他好文   时间:2020-01-04 22:16:29    阅读次数:119
poj2485prim
Highways Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 40303 Accepted: 17615 Description The island nation of Flatopia is perfectly flat. ...
分类:其他好文   时间:2019-11-24 19:35:55    阅读次数:70
poj2485kruskal
Highways Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 40303 Accepted: 17615 Description The island nation of Flatopia is perfectly flat. ...
分类:其他好文   时间:2019-11-24 19:30:40    阅读次数:52
Highways POJ - 1751
题目链接:https://vjudge.net/problem/POJ-1751 思路: 最小生成树板子,只需要多记录每个dis[x]的权值是从哪个点到x这个点的。 1 #include <stdio.h> 2 #include <iostream> 3 #include <queue> 4 #in ...
分类:其他好文   时间:2019-11-08 21:07:56    阅读次数:90
182条   1 2 3 4 ... 19 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!