自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 《深入理解Java虚拟机》第六章 类文件结构 — 读书笔记

1. 概述计算机只认识0和1,我们编写的程序需要经编译器翻译为由0和1构成的二进制文件才能被计算机执行。伴随着虚拟机和大量建立在虚拟机上程序语言的出现,将程序编译为本地字节码文件已不再是唯一的选择,越来越多的程序语言选择了与操作系统无关的,平台中立的格式作为程序编译后的存储格式。2. 无关性虚拟机提供商发布了许多可以运行在各种不同平台上的虚拟机,这些虚拟机都可以载入和执行同一种平台无关...

2018-08-06 22:54:59 589

原创 linux安装jdk,tomcat,mysql

1.安装jdk    ①使用sftp协议连接linux    ②put windons上安装包绝对路径,或,put 直接将安装包拖进Xshellz中        如:put D:\BaiduNetdiskDownload\software\jdk-7u65-linux-i586.tar.gz    ③将安装包解压到安装目录        如:tar -zxvf jdk-7u65-linux-i5...

2018-07-13 19:12:22 824

原创 0-1背包问题

1.动态规划#include #define N 20using namespace std;int main() { freopen("0-1.in", "r", stdin); int i, j, n, c; int v[N], w[N], m[N][N] = {0}; cin>>n>>c; for(i = 0; i < n; i++) cin>>v[i]; for(

2018-01-06 15:09:23 166

原创 《算法导论》优先队列

1.最大优先队列#include #define N 100using namespace std;int parent(int i) { return i / 2;}int left(int i) { return 2 * i;}int right(int i) { return 2 * i + 1;}void maxHeapify(int *p, int i, in

2017-12-17 13:25:32 284

原创 《算法导论》最长子序列问题

1.借助b[][]数组实现#include #include #define N 100using namespace std;int c[N + 1][N + 1];int b[N + 1][N + 1];void lcsLength(char *x, char *y, int xLength, int yLength) { int i, j; for(i = 1; i <

2017-12-15 20:32:48 225

原创 《算法导论》矩阵链乘法问题

1.自底向上法#include #define N 100#define MAXVALUE 1000000000using namespace std;int m[N][N], s[N][N];void matrixChainOrder(int *p, int n) { int i, j, l, k, temp; for(i = 1; i < n; i++) m[i][i]

2017-12-13 21:34:26 430

原创 《算法导论》动态规划钢条切割问题

1.自顶向下的递归实现#include #define N 33using namespace std;int s[N + 1];int p[N + 1] = {0, 1, 5, 8, 9, 10, 17, 17, 20, 24, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47

2017-12-12 15:09:22 210

原创 《算法导论》排序算法

1.堆排序#include #define N 100using namespace std;int parent(int i) { return i / 2;}int left(int i) { return 2 * i;} int right(int i) { return 2 * i + 1;}void maxHeapify(int array[], int i,

2017-12-12 13:03:52 173

原创 《算法导论》最大子数组和

1.暴力枚举#include #define N 100using namespace std;int main() { int array[N]; int i, j, n, sum; int start, end, maxSum=-99999; cin>>n; for(i = 0; i < n; i++) cin>>array[i]; for(i = 0; i < n;

2017-11-30 13:13:23 239

空空如也

空空如也

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

TA关注的人

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