4Clojure上的一道题:[4Clojure 最长上升子序列算法][1] 描述如下: > Given a vector of integers, find the longest consecutive sub-sequence of increasing numbers. If two sub-sequences have the same le...
分类:
编程语言 时间:
2014-10-18 09:55:22
阅读次数:
259
Write a function to find the longest common prefix string amongst an array of strings.这个很简单,看代码便知// LongestCommonPrefix.cpp : 定义控制台应用程序的入口点。//#include...
分类:
其他好文 时间:
2014-10-17 20:17:37
阅读次数:
202
#include #include #include #include #include #define WIN_WIDTH 1//1~10,选择小波基double *Ld = new double[2*WIN_WIDTH]; //分解尺度函数double *Hd = new double[2*WI...
分类:
其他好文 时间:
2014-10-17 13:27:45
阅读次数:
226
题目大意:
维护一棵初始有n个节点的有根树(根节点为1),树上节点编号为1-n,每个点有一个权值wi。
支持以下操作:
0 u x 询问以u为根的子树中,严格大于x的值的个数。(u^=lastans,x^=lastans)
1 u x 把u节点的权值改成x。(u^=lastans,x^=lastans)
2 u x 添...
分类:
其他好文 时间:
2014-10-17 10:19:42
阅读次数:
546
Longest Ordered Subsequence
Time Limit: 2000MS
Memory Limit: 65536K
Total Submissions: 33943
Accepted: 14871
Description
A numeric sequence of ai is ordered if a1 a2 ...
分类:
其他好文 时间:
2014-10-16 19:38:32
阅读次数:
209
js替换最后一次出现的匹配的字符串var v = "abbbabbbbab"; var pos = v.lastIndexOf("a"); var vv = v.substring(0, pos) + "c" + v.substring(pos+1, v.length);...
分类:
Web程序 时间:
2014-10-16 19:34:12
阅读次数:
212
要学的 太多了.学到的 都是有用的 即便你不会在比赛中遇到这个类型的 但是开拓了你的思维这2题 都是LCIS-Longest Common Increase Subsequence我是在这边学习的 传送这篇写的很好.我觉得对于4512要好好理解下啊 我想了好久 太白痴了....注意下 数组的对称性1...
分类:
其他好文 时间:
2014-10-16 18:26:32
阅读次数:
338
Apache是目前世界上使用最为广泛的一种Web Server,它以跨平台、高效和稳定而闻名。按照去年官方统计的数据,Apache服务器的装机量占该市场60%以上的份额。尤其是在 X(Unix/Linux)平台上,Apache是最常见的选择。其它的Web Server产品,比如IIS,只能运行在Wi...
分类:
Web程序 时间:
2014-10-16 13:28:42
阅读次数:
214
Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest le...
分类:
其他好文 时间:
2014-10-16 06:33:22
阅读次数:
238
Problems:Write a function to find the longest common prefix string amongst an array of strings.就是返回一个字符串数组的所有的公共前缀。不难。我是已第一个字符串为参考,然后依次遍历其他的字符串,一旦遇到不同...
分类:
其他好文 时间:
2014-10-16 02:35:11
阅读次数:
215