枚举所有相邻城市,作为起点,多次spfa,然后每次在想去的城市中找出spfa后的距离起点最短的花费时间
#include
#include
#include
using namespace std;
#define MAX 1005
#define INF 1<<30
int T,S,D;
struct Edge{
int to,time,next;
}edge[MAX*2...
分类:
其他好文 时间:
2014-07-30 12:19:03
阅读次数:
215
这个英文资料有它的非常直观明了的介绍,强烈推荐。http://computing.dcu.ie/~humphrys/Notes/Neural/sigmoid.html------------------------------------------Sigmoid函数是一个S型函数. Sigmoid...
分类:
其他好文 时间:
2014-07-30 00:27:12
阅读次数:
590
费用流即最小费用最大流先贴上粉书上的模板:struct Edge{ int from,to,cap,flow,cost; Edge(int u,int v,int c,int f,int w): from(u),to(v),cap(c),flow(f),co...
分类:
其他好文 时间:
2014-07-30 00:27:02
阅读次数:
289
解法:对u->v的边 add_edge(u,v,0)增加一条u->v反向边 add_edge(v,u,1)求一遍1->n的最短路#include #include #include using namespace std;#define M 20010 //用了几次 10010 R...
分类:
其他好文 时间:
2014-07-29 16:57:32
阅读次数:
220
EK算法:
int fir[maxn];
int u[maxm],v[maxm],cap[maxm],flow[maxm],nex[maxm];
int e_max;
int p[maxn],q[maxn],d[maxn];
void add_edge(int _u,int _v,int _w)
{
int e;
e=e_max++;
u[e]=_u;v[e]=_v;c...
分类:
其他好文 时间:
2014-07-29 14:20:08
阅读次数:
232
吴韧认为,从这个意义讲, 也许所谓的“雾计算”(fog computing),是一个更加贴切的表述,意指由身边设备完成计算。他强调称,,云和雾是相辅相成, 云端无所不能,雾则无处不在,两者间的信息交换不是原始数据而是智能。 把任何数据都放入云端进行处理,需要非常大的带宽和存储支持和非常小的延时,很多...
分类:
其他好文 时间:
2014-07-28 21:22:44
阅读次数:
297
第一道Kruskal算法题#include #include #include using namespace std;#define max 505int f[max],maxw;struct edge{ int st,en,w;}ed[max*max/2];int find(int k){ if...
分类:
其他好文 时间:
2014-07-28 15:39:43
阅读次数:
181
The present invention allocates resources in a multi-operating system computing system, thereby avoiding bottlenecks and other degradations that resul...
分类:
其他好文 时间:
2014-07-28 11:25:00
阅读次数:
302
点击打开链接
二分图匹配,hopcroft-karp
#include
#include
#include
#include
using namespace std;
const int MAXN = 5010;
const int MAXM = 50010;
struct Edge{
int to, next;
}edge[ MAXM ];
int head[ MAXN ], to...
分类:
其他好文 时间:
2014-07-27 11:45:03
阅读次数:
225
内部也是相交#include #include #include #include using namespace std;struct point{ int x,y;};struct edge{ point start,end;}line[4],the;void swaped(int &x,int...
分类:
其他好文 时间:
2014-07-26 14:31:00
阅读次数:
272