摘要: 图结构练习——最短路径Time Limit: 1000 msMemory Limit: 65536 KiBProblem Description 给定一个带权无向图,求节点1到节点n的最短路径。 Inpu... 阅读全文
posted @ 2018-07-13 15:55 hum0r0 阅读(13) 评论(0) 推荐(0)
摘要: 数据结构实验之图论一:基于邻接矩阵的广度优先搜索遍历Time Limit: 1000 msMemory Limit: 65536 KiBProblem Description给定一个无向连通图,顶点编号从0到n-... 阅读全文
posted @ 2018-06-12 21:31 hum0r0 阅读(13) 评论(0) 推荐(0)
摘要: #include #include #include using namespace std;int vis[105]//邻接矩阵表示图struct ENode{ int V1,V2; int wei... 阅读全文
posted @ 2018-06-12 21:07 hum0r0 阅读(8) 评论(0) 推荐(0)
摘要: Guns and Roses (1)Time Limit: 1000 msMemory Limit: 65536 KiBProblem DescriptionGuns和Roses是两个好朋友,这一天他们比赛吃葡萄... 阅读全文
posted @ 2018-06-11 21:07 hum0r0 阅读(12) 评论(0) 推荐(0)
摘要: 关灯计划Time Limit: 500 msMemory Limit: 65536 KiBSpecial Judge Problem Description在某次活动上,某组织打算控制一栋宿舍楼的灯光来进行... 阅读全文
posted @ 2018-06-11 21:04 hum0r0 阅读(8) 评论(0) 推荐(0)
摘要: #include #include using namespace std;#define mindata -12345//哨兵元素的值#define maxsize 112345int num[123456];... 阅读全文
posted @ 2018-06-06 17:22 hum0r0 阅读(13) 评论(0) 推荐(0)
摘要: #include #include int a[112345],t;void qs(int a[],int l,int r){ int key=a[l],i=l,j=r; if(l>=r) ... 阅读全文
posted @ 2018-05-27 11:13 hum0r0 阅读(14) 评论(0) 推荐(0)
摘要: //归并排序#include #include //两个有序数组归并void Merge(int sourceArr[],int tempArr[], int startIndex, int midIndex, ... 阅读全文
posted @ 2018-02-03 09:09 hum0r0 阅读(5) 评论(0) 推荐(0)