- 博客(4)
- 收藏
- 关注
原创 fedora安装chrome
添加FZUG源 终端:进入到root 1.下载google-chrome.repo并保存 $wget http://repo.fdzh.org/chrome/google-chrome-mirrors.repo -P/etc/yum.repos.d/ 2.安装Chrome $ sudo dnf install google-chrome-stable
2016-04-07 10:50:02
295
原创 模拟银行家算法
模拟银行家算法,本程序只求出安全序列,并且没有验证输入正确性,所以需要保证数据正确 其中运用的递归-全排序思想,参考点击打开链接 #include #include #define N 3//定义有三种资源 #define P struct Process struct Process { int max[N]; int allocation[N]; int id;
2016-04-06 23:01:27
390
原创 全排列-递归
//例子:0到4,5个数的全排列,答案:5*4*3*2*1=120 //思路:f(int length,int first+1,int *a)//length是要排列序列的长度,从a[fast]开始没事fast+1到fast==length开始输出; #include #include int mm=0;//总共有多少序列 void swap(int *a,int *b) { i
2016-04-04 21:22:55
353
原创 求最长公共序列长度-递归
#include #include int max(int a,int b) { if(a>=b) return a; else return b; } int f(int *s1,int *s2)//返回s1,s2最大公共序列长度 { if(*s1==-1||*s2==-1)//判断是否结束 return 0; if(*s1==*s2) return f(s1+
2016-04-04 21:10:58
263
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅