- 博客(5)
- 问答 (2)
- 收藏
- 关注
原创 【swust.oj_1066】有向图的邻接矩阵存储强连通判断
假设有向图G采用邻接矩阵存储,设计一个算法,判断图G是否是强连通图。若是则返回yes;否则返回no。 第一行为一个整数表示顶点的个数。接下来是为一个整数矩阵,表示图的邻接关系。 yes(强连通图)或no(非强连通图).。50 1 0 0 00 0 1 1 00 0 0 1 01 0 0 0 11 0 0 0 0--------------
2017-05-18 13:07:29 3233 1
原创 【swust.oj_0415】Digital Roots
Digital RootsThe digital root of a positive integer is found by summing the digits of the integer. If the resulting value is a single digit then that digit is the digital root. If the resulting
2017-05-18 12:43:12 368
原创 【数据结构_BFS_1069】图的深度优先录入
#include #include #include #include using namespace std;int n,maps[105][105],vis[1005]={0};char str[1005];queueq;void bfs(int tar){ cout<<q.front(); vis[tar]=1; for(int i=0;i<n;i++) { i
2017-05-14 09:23:26 430
原创 【数据结构_1015_堆排序】一趟堆排序后的结果
#include #include #include using namespace std;int n;void dui(int k,int a[]){ int i=k,j=i*2; int item=a[i]; while(j<=n) { if(ja[j+1]) { j++; } if(item>a[j]) { a[i]=a[j]; i
2017-05-13 19:47:13 5470
原创 【数据结构_哈希表_1012+1013】哈希表相关
2017.5.11补充:关于这个东西,如果直接交我的代码WA这锅我不背...本来已经是AC代码的后来不知道系统怎么了,我觉得是后台数据改了所以A不了。#include #include #include using namespace std;int main(){ int n,m; int a[1005]; int tar; cin>>n
2017-05-01 12:16:13 475
空空如也
一个计算机思维导论的题,求大神解答
2016-11-10
求大神帮忙看一道排序查找的题目
2016-10-25
TA创建的收藏夹 TA关注的收藏夹
TA关注的人