上一页 1 ··· 5 6 7 8 9 10 11 12 13 下一页
摘要: Js 变量的作用域: 全局变量 和局部变量 阅读全文
posted @ 2015-08-05 17:33 HuberyQian 阅读(106) 评论(0) 推荐(0) 编辑
摘要: http://acm.sdut.edu.cn/sdutoj/problem.php?action=seach小P的故事——神奇的Dota#include #include #include int V; int f[100001]; int c[3] = {0,150,200,350... 阅读全文
posted @ 2014-08-29 09:32 HuberyQian 阅读(196) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std;const int N = 3;//物品个数const int V = 5;//背包最大容量int weight[N + 1] = {0,3,2,2};//物品重量int value[N + 1] = {0,5,10,20};//物品价值in... 阅读全文
posted @ 2014-08-28 19:31 HuberyQian 阅读(203) 评论(0) 推荐(0) 编辑
摘要: 重要概念有向边,无向边,序偶,零图(仅有孤立节点组成的图),平凡图(仅有一个节点组成的图),环(自回路)(关联于同一节点的边)度数,入度,出度,度数和边数的关系,度数为奇数的节点必定为偶数个。入度和出度的关系多重图(含有平行边)简单图(不包含平行边和环)完全图的边数 e = 1/2 *n*(n-1)... 阅读全文
posted @ 2014-08-26 16:57 HuberyQian 阅读(253) 评论(0) 推荐(0) 编辑
摘要: 最短路问题是一种常见的问题,她一般被描述为包含n个点和m,主要分为两类:(1)(单源最短路径)求解从起点s到终点e的最短路径(2)(多源最短路径)求解图中任意两点的最短路径。常用的解题算法有四种:Dijkstra,bellman-ford,spfa,Floyd 阅读全文
posted @ 2014-08-23 10:09 HuberyQian 阅读(230) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #define INF 0x3f3f3f3fusing namespace std;struct node{ int u,v,w,next;}edge[150001];int head[30001],dis[30001],... 阅读全文
posted @ 2014-08-23 09:21 HuberyQian 阅读(265) 评论(0) 推荐(0) 编辑
摘要: http://www.cnblogs.com/khbcsu/p/3877659.html 阅读全文
posted @ 2014-08-22 09:10 HuberyQian 阅读(111) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #includeusing namespace std;const int N=300;const int MAXE=200000;const int inf=10&&d[u]+edge[j].w#include #include #includ... 阅读全文
posted @ 2014-08-20 14:43 HuberyQian 阅读(166) 评论(0) 推荐(0) 编辑
摘要: //连续最短路径算法//消圈算法//先求最大流, 再在Gf中寻找负费用圈并沿它增广//KM算法//二分图的最优匹配 短距离图优势很大//ZKW算法//KM+SAP(Shortest Augmenting Path最短增广路)//原始对偶(Primal-Dual)算法//S 源点 T汇点 n点的个... 阅读全文
posted @ 2014-08-20 14:06 HuberyQian 阅读(190) 评论(0) 推荐(0) 编辑
摘要: #include#include#define N 111char str[N][N];int a,b;int dir[8][2]= {1,1,1,-1,-1,1,-1,-1,0,1,0,-1,1,0,-1,0}; //因为是上下左右和斜对角,所以是八个方向。void fbs(int x,int y... 阅读全文
posted @ 2014-08-19 19:28 HuberyQian 阅读(144) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 下一页