码迷,mamicode.com
首页 >  
搜索关键字:edge    ( 2375个结果
无向图求割点
using namespace std; const int MAXE = 300010; const int MAXP = 1010; struct N { int v,next; }edge[MAXE*2]; int head[MAXP]; int Top; int high[MAXP]; int low[MAXP]; int subnet[MAXP]; int dfsClock;...
分类:其他好文   时间:2015-05-15 15:33:42    阅读次数:136
有向图的强联通分量 tarjan
多与DAG上的DP之类的问题一起出现。 using namespace std; const int MAXE = 300010; const int MAXP = 100010; struct N { int v,next; }edge[MAXE]; int head[MAXP]; int Top; int ty[MAXP]; int high[MAXP]; int low...
分类:移动开发   时间:2015-05-15 12:10:51    阅读次数:172
sicily 1024 Magic Island
深搜中与记录长度有关的题目,都差不多是这样的!还有邻接表的写法,不够熟! 1 #include 2 3 using namespace std; 4 5 int ans; 6 7 bool vis[10005]; 8 9 struct edge {10 int u;11 i...
分类:其他好文   时间:2015-05-15 06:35:30    阅读次数:133
POJ 3678 Katu Puzzle (2-sat基础)
题意:每个数只有0,1两种可能,给出两两之间的AND,OR,XOR的值,判断有没有解 裸题。 #include #include #include #include using namespace std; const int N = 2010; struct Edge { int v,next; }es[N*N]; int head[N]; int n,m; int tmp[N],...
分类:其他好文   时间:2015-05-13 16:51:19    阅读次数:150
网络流模板
#include using namespace std; #define INF 0x7ffffff #define maxn 100000 struct Edge { int from, to, cap, flow; Edge(int u, int v, int c, int f):from(u), to(v), cap(c), flow(f){} }; int n, ...
分类:其他好文   时间:2015-05-12 11:32:19    阅读次数:89
【数据结构】拓扑排序、最短路径算法、Dijkstra算法、无环图等等
图的定义图(graph)G = (V,E)由顶点(vertex)的集V和边(Edge)的集E组成。有时也把边称作弧(arc),如果点对(v,w)是有序的,那么图就叫做有向的图(有向图)。顶点v和w邻接(adjacent)当且仅当(v,w)属于E。如果无向图中从每一个顶点到其他每个顶点都存在一条路径,则称该无向图是连通的(connected)。具有这样性质的有向图称为是强连通的(strongly co...
分类:编程语言   时间:2015-05-12 09:33:55    阅读次数:853
POJ 3255 Roadblocks Dijkstra 算法变形
#include #include #include using namespace std; const int INF = 1000000; const int maxn = 5005; struct edge{ int y,w; edge(int cy,int ww){ y = cy; w = ww; } }; vector vec[maxn]; int n,m; s...
分类:数据库   时间:2015-05-11 21:56:44    阅读次数:119
IOS开发常用第三方插件
Reachability 检测网络连接 用来检查网络连接是否可用:包括WIFI和WWAN(3G/EDGE/CDMA等)两种工作模式。 可以从Apple网站下载到:http://developer.apple.com/library/ios/#samplecode/Reachability/History/Histo...
分类:移动开发   时间:2015-05-11 18:22:09    阅读次数:276
对于Microsoft Edge的开发者视角
Microsoft Edge一开始是作为IE的补充,但后来为了试图打破过去和遗留的互联网技术就被考虑为单独发展。微软表示他们想通过提升性能、安全性、可靠性以及减少代码复杂性获得比其他现代浏览器更好的互操作性。Edge将通过不同的形式因素、输入类型、鼠标、触摸以及触控笔运行在所有Windows设备上。虽然为了旧版软件微软决定在Windows 10中保留IE,但主要的浏览器依旧是Edge。微软建议开发者...
分类:其他好文   时间:2015-05-11 12:58:54    阅读次数:129
hdu 1285 比赛排名 【拓扑排序】
拓扑排序模版题 #include #include #include #include #include using namespace std; const int maxe=250000+10; const int maxh=500+10; typedef struct Edge {     int to,next; }; Edge E[maxe]; int hea...
分类:编程语言   时间:2015-05-07 08:56:50    阅读次数:151
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!