自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

关于IT 学习的专栏

欢迎指正批评。

  • 博客(6)
  • 资源 (1)
  • 收藏
  • 关注

转载 背包问题--代码

背包问题(空间优化)经典代码题目<br />有N件物品和一个容量为V的背包。第i件物品的费用是c[i],价值是w[i]。求解将哪些物品装入背包可使价值总和最大。基本思路<br />这是最基础的背包问题,特点是:每种物品仅有一件,可以选择放或不放。<br />用子问题定义状态:即f[i][v]表示前i件物品恰放入一个容量为v的背包可以获得的最大价值。则其状态转移方程便是:<br />f[i][v]=max{f[i-1][v],f[i-1][v-c[i]]+w[i]}<br />这个方程非常重要,基本上所有跟背

2011-05-20 17:39:00 296

转载 背包问题--代码

背包问题(空间优化)经典代码题目<br />有N件物品和一个容量为V的背包。第i件物品的费用是c[i],价值是w[i]。求解将哪些物品装入背包可使价值总和最大。基本思路<br />这是最基础的背包问题,特点是:每种物品仅有一件,可以选择放或不放。<br />用子问题定义状态:即f[i][v]表示前i件物品恰放入一个容量为v的背包可以获得的最大价值。则其状态转移方程便是:<br />f[i][v]=max{f[i-1][v],f[i-1][v-c[i]]+w[i]}<br />这个方程非常重要,基本上所有跟背

2011-05-20 17:38:00 334

原创 bwt

<br />#include <stdio.h>#include <stdlib.h>#include <string.h>#include <unistd.h>#include <malloc.h>#include <sys/stat.h>#include <sys/types.h>#include <errno.h>#include <fcntl.h>/*xiaolai 2011-5-09 I pay 8 hours to write ,so bad ...

2011-05-13 21:53:00 444

原创 bwt

<br />#include <stdio.h>#include <stdlib.h>#include <string.h>#include <unistd.h>#include <malloc.h>#include <sys/stat.h>#include <sys/types.h>#include <errno.h>#include <fcntl.h>/*xiaolai 2011-5-09 I pay 8 hours to write ,so bad ...

2011-05-13 21:53:00 307

原创 深入探究二叉树(c)--(2)

<br />文件tree.c<br />//tree.c xiaolai 2011-5-13#include <string.h>#include <stdio.h>#include <stdlib.h>#include "Tree.h"typedef struct pair { Node * parent; Node * child; } Pair;static Node * MakeNode( const Item * pi);static bool ToLef

2011-05-13 21:48:00 354

原创 深入探究二叉树(c)--(1)

<br />#ifndef _TREE_H_#define _TREE_H_//文件头,#include <stdbool.h>typedef struct item{ char petname[20]; char petkind[20];}Item;#define MAXITEM 10typedef struct node { Item item; struct node *left; struct node * r

2011-05-13 21:44:00 189

统一建模语言------大学一门课程

统一建模语言,大家看看,是大学的一门课程,。。。。。。。。。。。。。。。。。。。。。

2011-05-13

空空如也

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

TA关注的人

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