一、原理用户查看上,点击查看评价,能够看到该商品的评价根据评价信息,我们确定comments包含id,gid,uname,comment,add_time(评价id,商品id,发表者,评价信息,添加时间)1、数据库建立comments表2、设计Comment.java(Bean)3、设计商品评价DAO(commentDAO.java)(1)lis..
分类:
其他好文 时间:
2015-04-23 11:09:12
阅读次数:
116
废话不说,直接上代码
List转成数组
List nameList = new ArrayList<>();
nameList .add("123');
nameList .add("123');
nameList .add("123');
//转成数组
String[] arr = nameList.toArray(new String[nameList.size()]);
数组转成Lis...
分类:
编程语言 时间:
2015-04-23 11:01:34
阅读次数:
189
题目跟poj2533一样,改一下数组大小完美A过。
#include
const int N = 100001;
int a[N], f[N], d[N]; // d[i]用于记录a[0...i]的最大长度
int bsearch(const int *f, int size, const int &a) {
int l=0, r=size-1;
while( l <=...
分类:
其他好文 时间:
2015-04-22 20:47:11
阅读次数:
136
events.js:72 throw er; // Unhandled 'error' event ^Error: listen EADDRINUSE at errnoException (net.js:901:11) at Server._lis...
分类:
Web程序 时间:
2015-04-22 10:52:17
阅读次数:
461
1425: LCS与LIS
Time Limit: 1 Sec Memory Limit: 128 MB
Submit: 55 Solved: 25
SubmitStatusWeb Board
Description
LCS(最长公共子序列)是单身,LIS(最长上升子序列)也是单身,于是他们在一起了,变成了LCIS(最长公共上升子序列)o(╯□╰)o。你的任务是求给定两个序列...
分类:
其他好文 时间:
2015-04-21 09:50:48
阅读次数:
152
题意:输出最长递增子序列的长度思路:直接裸LIS,
#include
const int N = 1001;
int a[N], f[N], d[N]; // d[i]用于记录a[0...i]的最大长度
int bsearch(const int *f, int size, const int &a) {
int l=0, r=size-1;
while( l <= r ){...
分类:
其他好文 时间:
2015-04-20 17:03:26
阅读次数:
156
时间复杂度为 n*logn的LIS算法是用一个stack维护一个最长递增子序列如果存在 x a[y],那么我们可以用a[y]去替换a[x]因为a[y]比较小,具有更大的潜力,使得后面的元素和它成为更长的递增序列如例子: a[] = {1,4,8,3,6};我们用一个stack st保存当前的最长递....
分类:
编程语言 时间:
2015-04-17 20:15:27
阅读次数:
168
A -Longest Ordered SubsequenceTime Limit:2000MSMemory Limit:65536KB64bit IO Format:%I64d & %I64uSubmitStatusPracticePOJ 2533DescriptionA numeric seque...
分类:
其他好文 时间:
2015-04-16 01:25:20
阅读次数:
169
基础: 1.LCS 2.LIS 3.最短编辑距离 4.最优二叉搜索树 5.最优三角剖分 6.Bellman-ford算法 7.0-1背包 8.各种扩展的背包 9.最大子段和难: 1.树形dp 2.先排序后dp 3.基于强连通分量的dp---插头dp 4.dp加速---四边形...
分类:
其他好文 时间:
2015-04-15 21:26:29
阅读次数:
121
找出最长递增序列 O(NlogN)(不一定连续!)参考 http://www.felix021.com/blog/read.php?1587%E5%8F%AF%E6%98%AF%E8%BF%9E%E6%95%B0%E7%BB%84%E9%83%BD%E6%B2%A1%E7%BB%99%E5%87%B...
分类:
编程语言 时间:
2015-04-10 23:59:54
阅读次数:
314