自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(18)
  • 收藏
  • 关注

转载 kmp之next功能

int getNext(char T[],int j) { int k; //next[j]的返回值 if(j==0) return -1; if(j==1) return 0; char S[j],M[j]; for(k=j-1;k>=1;k--)// 利...

2017-06-11 17:33:00 107

转载 字符串匹配之朴素模式匹配

#include <iostream>//两种方法 思路大概一致 一种是书上的一种是自己的 using namespace std; int BFS(char S[],char T[]) { int i=0,j=0; while((S[i]!='\0')&amp...

2017-06-10 19:53:00 121

转载 分配排序之桶式排序

#include <iostream> using namespace std; struct Node { int key; int next; }; struct QueueNode { int front; int rear; }; void...

2017-06-10 19:51:00 136

转载 归并排序

#include <iostream> using namespace std; void Merge(int r[],int r1[],int s,int m,int t) { int i=s,j=m+1,k=s; while(i<=m&&...

2017-06-06 21:46:00 105

转载 选择排序之堆排序

#include <iostream> using namespace std; void Sift(int a[],int k,int m) { int i=k,j=2*i,temp; while(j<=m) { if(j<m...

2017-06-05 10:17:00 80

转载 交换排序之快速排序

#include <iostream> using namespace std; int part(int a[],int first,int ending)//将第一个位置得值作为轴值 { int i=first,j=ending,temp; while(i&l...

2017-06-05 09:49:00 78

转载 交换排序之起泡排序

#include <iostream> using namespace std; void bubble_sort(int a[],int n) { int exchange=n; while(exchange!=0) { int i, b...

2017-06-04 15:29:00 121

转载 直接插入

#include <iostream> using namespace std; void insert_sort(int a[],int n) { int i,j; for(i=2;i<=n;i++) { a[0]=a[i];//设...

2017-06-04 15:28:00 163

转载 百钱百鸡问题

#include <iostream> using namespace std; int main() { int x,y,z; for(x=0;x<20;x++) { for(y=0;y<=33;y++) {...

2017-06-03 22:34:00 68

转载 #【原理】进程调度

#【原理】进程调度 需要进程调度的理由很简单,即充分利用计算机系统中的CPU资源,让计算机系统能够多快好省地完成我们让它做的各种任务。为此,可在内存中可存放数目远大于计算机系统内CPU个数的进程,让这些进程在操作系统的进程调度器的调度下,能够让进程高效(高的吞吐量...

2017-06-02 16:22:00 501

转载 选择排序

#include<iostream> using namespace std; void select_sort(int a[],int n) { int i,j,min,t; for(i=0;i<n-1;i++) { min=i; /...

2017-06-01 15:18:00 66

转载 猴子分桃问题

#include<iostream> //倒推法 using namespace std; int main() { int i,x,y; for(int y=16;;y+=4) { if((y-1)%5!=0)// X必须是4的倍数 x...

2017-06-01 15:01:00 93

转载 最大子段和问题

#include<iostream> using namespace std; int max_sum(int a[],int n,int*best_i,int *best_j) { int i,j,k,this_sum; int sum=0; *best_...

2017-06-01 08:28:00 65

转载 火柴棒问题

#include<iostream> using namespace std; int a[10]={6,2,5,5,4,5,6,3,7,6}; int count=0; int cnt(int x) { int ans=0,ret; if(x==0) return 6; ...

2017-05-31 13:32:00 178

转载 最优服务次序

#include<iostream> using namespace std; #include<vector> #include<algorithm> double greddy(vector<double> x) { int leng...

2017-05-31 12:33:00 109

转载 最优装载

#include <iostream> using namespace std; #include<vector> #include<algorithm> void Loading(vector<int>x,int c,bool A[]) { ...

2017-05-30 17:19:00 98

转载 活动安排问题 贪心算法

#include <iostream> using namespace std; void greddyselector(int s[],int f[],int n,bool A[]) { A[0]=true; int j=0; for(int i=1;i...

2017-05-30 16:13:00 136

转载 最简真分数

#include <iostream> using namespace std; int main() { int i,j,u,count,a,b,t; double s=0.0; cout<<"请输入区间范围:"<<endl; ...

2017-05-29 12:27:00 547

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除