- 博客(10)
- 资源 (2)
- 收藏
- 关注
原创 图知识小结6-十字链表的数组实现与应用
十字链表是一种高效存储稀疏图并可以显著提高查找效率的一种存储结构,解决了图的遍历过程中邻接表空间消耗大而邻接矩阵求一个点入度又需要遍历全部表的问题,下面给出其数组实现://十字链表的数组实现 #include <bits/stdc++.h>using namespace std;const int MAX_EDGE = 10000;const int MAX_VER...
2018-12-11 12:19:12 316
原创 【HTML5】解决视屏自动播放的video标签设置
<video muted controls = "controls" autoplay = "autoplay" width = "800" height = "600"> <source src="testing.mp4" type = "video/mp4"/> </video>今天在网站里放视屏,但是我想让用户进来就看到我们的宣传视频,所以就...
2018-12-10 23:28:07 1632
原创 图知识小结6-DFS应用【CCF201709-4通信网络】
#include <bits/stdc++.h>using namespace std;const int MAX_EDGE = 10005;const int MAX_VERTICES = 1005;int conn[MAX_VERTICES][MAX_VERTICES]; //记录两个点之间的连通性质 struct Edge{ int v, last;} edge[...
2018-12-09 23:38:46 399
原创 图论知识小结1-使用数组模拟实现邻接表
//普通一维数组模拟实现const int MAX_N = 100;const int MAX_M = 10000;//建立MAX_N条边 struct edge{ int v; //当前边的终点 int last_eid; //上一条相同起点的边的编号 }edge[MAX_M]; int latest_eid_of_u[MAX_N], temp_eid; void ini...
2018-12-09 23:35:24 297
原创 图知识小结5-kruskal算法的数组模拟实现与应用
#include <bits/stdc++.h>using namespace std;const int MAX_EDGE = 100000;const int MAX_VERTICES = 100;struct Edge{ int len, u, v;} edge[MAX_VERTICES];int fa[MAX_VERTICES], nv, ne;bool cm...
2018-12-08 17:15:06 164
原创 【C++】CCF 201703-4 地铁修建 【从80分到100分的优化过程】
#include <bits/stdc++.h>using namespace std;const int MAX_EDGE = 200005;const int MAX_VERTICES = 100005;struct Edge{ int v, len, last;} edge[2 * MAX_EDGE]; //开始是80分,后来改了一下就对了,原因是无向图的边集上限...
2018-12-07 18:07:57 386
原创 排序知识点小结1-手写堆排序及STL实现
首先是造轮子:// maximum heap based on integer type#include <bits/stdc++.h>using namespace std;const int MAX_SIZE = 100000;int heap[MAX_SIZE], result[MAX_SIZE];int size;void init(){ memset(h...
2018-12-07 18:03:47 277
原创 图论知识小结4-Dijkstra的数组模拟实现
#include <bits/stdc++.h>using namespace std;const int MAX_EDGE = 10000;const int MAX_VERTICES = 100;struct Edge{ int len, v, last;} edgem[MAX_EDGE];int latest_edge_of_u[MAX_VERTICES];in...
2018-12-06 19:27:36 202
原创 图论知识小结3-BFS的数组模拟实现
#include <bits/stdc++.h>using namespace std;const int MAX_EDGE = 10000;const int MAX_VERTICES = 100;struct Edge{ int len, v, last;} edge[MAX_EDGE];int eid;bool vst[MAX_VERTICES];int la...
2018-12-06 17:48:28 220
原创 图论知识小结2-DFS的数组模拟实现
#include <bits/stdc++.h>using namespace std;const int MAX_EDGE = 10000;const int MAX_VERTICES = 100;struct Edge{ int len, v, last;} edge[MAX_EDGE];bool vst[MAX_VERTICES];int latest_edge...
2018-12-06 17:32:31 227
setuponenotefreeretail.x64_x86.zh-cn.zip
2020-05-30
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人