自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

深海咸鱼

粘锅永世不得翻身的咸鱼。

  • 博客(7)
  • 收藏
  • 关注

原创 杭电2602

时隔半年才做出来基础01背包,蔡如苟。 #include #define maxn 1050 int value[maxn]; int valume[maxn]; int dp[maxn][maxn]; using namespace std; int main(){ int T,N,V; cin>>T; while(T--){ cin>>N>>V; for(i

2017-04-21 22:23:03 502

原创 最小生成树

#include using namespace std; const int INF = 1e9; const int VM = 103; int G[VM][VM]; void prim(int n){ int dis[VM]; bool visit[VM]; int i,ans=0; memset(visit,0,sizeof(visit)); for( i=1;i<=n

2017-04-13 21:15:24 415

原创 KMP算法

看KMP算法真的比看毛片还累 /* * Copyright (c) 2017 *安徽大学计算机科学与技术学院 * All rights reserved. */ #include #include #include #define maxn 1001 int next[maxn]; using namespace std; int KMP(string a,string b){ int

2017-04-11 17:02:26 328

原创 迷宫问题

/* * Copyright (c) 2017 *安徽大学计算机科学与技术学院 * All rights reserved. */ #include #include #include #include #include using namespace std; int dx[4]={0,-1,1,0};//方向 int dy[4]={-1,0,0,1};

2017-04-09 17:33:00 342

原创 素数打表

#include #include #include #include #define N 110000 using namespace std; int p[N]; int pn[N]; void prim_num() { int i,j,n; for(i=1; i<=N; i++) p[i]=true; n=(int)sqrt(N); for(i

2017-04-07 19:14:32 791

原创 队列

顺序队列 #include #include #include #define MAXLEN 10 //定义队列的最大容量 typedef int Datatype; //数据类型 typedef struct{ Datatype data[MAXLEN]; int front,rear; //定义对头与队尾指针 }SeQueue; SeQueue Init

2017-04-06 22:10:44 492

原创 栈的基本操作

顺序栈 /* * Copyright (c) 2017 * 安徽大学计算机科学与技术学院 * All rights reserved. */ #include #include #include #include using namespace std; #define StackInitSize 20 typedef struct{ int *base; int *top;

2017-04-06 20:32:00 351

空空如也

空空如也

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

TA关注的人

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