08 2016 档案

摘要:参考 http://www.cnblogs.com/Kiraa/p/5510757.html http://www.cnblogs.com/zhaopAC/p/5159950.html 根据题目说明中的这句话 reduce the total system cost by eliminating s 阅读全文
posted @ 2016-08-30 09:40 PatrickZhou 阅读(174) 评论(0) 推荐(0)
摘要:p400 页最后一段 When j >= i , we need to select a root kr from among ki ... kj and then make an optimal binary search tree with keys ki ... kr-1 as its lef 阅读全文
posted @ 2016-08-27 13:11 PatrickZhou 阅读(190) 评论(0) 推荐(0)
摘要:p275 d(i)是以Ai为结尾的最长上升子序列的长度 《算法竞赛入门经典-训练指南》p62 问题6 提供了一种优化到 O(nlogn)的方法。 文本中用g(i)表示d值为i的最小状态编号(数组下标),满足 g(1) <= g(2) <= g(3) <= ... <= g(n) 可以用反证法: 假设 阅读全文
posted @ 2016-08-22 17:48 PatrickZhou 阅读(177) 评论(0) 推荐(0)
摘要:背包9讲 http://cuitianyi.com/ https://github.com/tianyicui/pack 刘汝佳 9.3.2 01背包的两种递推公式都是基于对第i件物品的策略(放或不放) 第2种递推 用f(i,j)表示“把前i个物品装到容量为j的背包中的最大总重量”,其状态转移方程也 阅读全文
posted @ 2016-08-18 13:58 PatrickZhou 阅读(402) 评论(0) 推荐(0)
摘要:#define _CRT_SECURE_NO_WARNINGS #include #include #include using namespace std; // 参考 http://blog.csdn.net/u014800748/article/details/43735015 // 题目中的条件是 n 种, 而例题嵌套矩形中的条件是 n 个 // n 种 block 不限供... 阅读全文
posted @ 2016-08-16 19:27 PatrickZhou 阅读(157) 评论(0) 推荐(0)
摘要:www.tup.tsinghua.edu.cn/upload/books/yz/055687-01.doc bing搜索UVa437 搜到这个word版本的电子书第9章 阅读全文
posted @ 2016-08-15 10:12 PatrickZhou 阅读(170) 评论(0) 推荐(0)
摘要:#define _CRT_SECURE_NO_WARNINGS #include #include int min(int a, int b) { if (a = 1; j--) { // station N-1, N-2, ..., 1; j is the station number // start + t[j] is the time t... 阅读全文
posted @ 2016-08-12 11:03 PatrickZhou 阅读(128) 评论(0) 推荐(0)
摘要:int INF = -(1= V[j]) maxv[i] = max(maxv[i], dp(i-V[j]) + 1); return maxv[i]; } printf("%d\n", dp[S]); // 递推 maxv[0] = 0; for(int i = 1; i = V[j]) maxv[i] = max(maxv[i]... 阅读全文
posted @ 2016-08-10 17:32 PatrickZhou 阅读(135) 评论(0) 推荐(0)