会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
知难不难
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
7
···
9
下一页
2019年11月12日
3345=数据结构实验之二叉树六:哈夫曼编码
摘要: 1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <string.h> 4 char s[2000]; 5 int num[2000],queue[2000]; 6 void so(int s[],int l,int r) 7 { 8 if(
阅读全文
posted @ 2019-11-12 21:46 念文丶
阅读(164)
评论(0)
推荐(0)
2019年11月11日
3341=数据结构实验之二叉树二:遍历二叉树
摘要: 1 #include <stdio.h> 2 #include <stdlib.h> 3 char s[1000]; 4 int top; 5 struct node 6 { 7 char c; 8 struct node *left, *right; 9 }; 10 struct node * c
阅读全文
posted @ 2019-11-11 21:51 念文丶
阅读(175)
评论(0)
推荐(0)
3340=数据结构实验之二叉树一:树的同构
摘要: 1 #include <stdio.h> 2 #include <stdlib.h> 3 int n,m; 4 struct node 5 { 6 char date; 7 int left,right; 8 } tree1[12],tree2[12]; 9 void creat(struct no
阅读全文
posted @ 2019-11-11 21:30 念文丶
阅读(179)
评论(0)
推荐(0)
2019年11月10日
3362=数据结构实验之图论六:村村通公路
摘要: 1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <string.h> 4 #define INF 99999999 5 int map[1000][1000],dis[1000],visited[10000]; 6 int sum; 7 v
阅读全文
posted @ 2019-11-10 19:05 念文丶
阅读(187)
评论(0)
推荐(0)
2019年11月9日
2138=数据结构实验之图论三:判断可达性
摘要: 1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <string.h> 4 #define INF 0x3f3f3f3f 5 int map[1000][1000],visited[1000]; 6 int n,m; 7 int flag;
阅读全文
posted @ 2019-11-09 22:27 念文丶
阅读(146)
评论(0)
推荐(0)
3363=数据结构实验之图论七:驴友计划
摘要: 1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <string.h> 4 #define INF 0x3f3f3f3f 5 int map[1000][1000],map2[1000][1000]; 6 int n; 7 void floy
阅读全文
posted @ 2019-11-09 22:04 念文丶
阅读(273)
评论(0)
推荐(0)
2019年11月8日
1916=字符串扩展(JAVA)
摘要: 1 import java.util.Scanner; 2 3 public class Main { 4 public static void main(String[] args) { 5 // TODO Auto-generated method stub 6 Scanner input =
阅读全文
posted @ 2019-11-08 16:34 念文丶
阅读(197)
评论(0)
推荐(0)
2019年11月2日
2140=数据结构实验之图论十:判断给定图是否存在合法拓扑序列
摘要: 1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <string.h> 4 int map[100][100],visited[100],du[100],flag,n,m,i,j,k; 5 int main() 6 { 7 while(~sc
阅读全文
posted @ 2019-11-02 18:45 念文丶
阅读(147)
评论(0)
推荐(0)
3364=数据结构实验之图论八:欧拉回路
摘要: 1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <string.h> 4 //这个题可以无视题目,只需要注意(如果无向图连通并且所有结点的度都是偶数,则存在欧拉回路,否则不存在。 ) 5 int map[1000][1000],visite
阅读全文
posted @ 2019-11-02 17:49 念文丶
阅读(231)
评论(0)
推荐(0)
2019年10月27日
2138=数据结构实验之图论三:判断可达性
摘要: 1 #include <stdio.h> 2 #include <string.h> 3 int map[1000][1000]; 4 int visit[1000]; 5 int n; 6 int max;//利用max来标记是否达到隘口1,如达到则max=1; 7 void DFS(int t) 8 { 9 visit[t]=1; 10 int i; 11 for(i=n; i>=0; i--
阅读全文
posted @ 2019-10-27 22:33 念文丶
阅读(160)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
···
9
下一页
公告