oracle数据库:为了使ID自增,建了序列后,创建触发器:create or replace TRIGGER TRIG_INSERT_TRADE_RECODE BEFORE INSERT ON TRADE_RECODE FOR EACH ROW BEGIN :NEW.ID:=SEQ_TRADE_R...
分类:
其他好文 时间:
2014-09-11 16:51:32
阅读次数:
373
链接:http://poj.org/problem?id=1699
题意:给出n个字符串,求他们相连的最小长度,如果首尾字母相同则可以共用相同部分,比如两个串ABCDEF和DEFGHI,他们相连为ABCDEFGHI,最小长度为9,中间的DEF部分共用了。
思路:由于数据量较小,首先对每两个字符串a,b用扩展KMP求出a连在b之后可以共用的长度,用数组B[i][j]表示第j个字符串连接在...
分类:
其他好文 时间:
2014-09-11 02:19:21
阅读次数:
210
Sequence
Time Limit: 6000MS
Memory Limit: 65536K
Total Submissions: 7447
Accepted: 2451
Description
Given m sequences, each contains n non-negative integer. Now we ma...
分类:
其他好文 时间:
2014-09-10 21:08:11
阅读次数:
200
Oracle expdp/impdp导出导入命令及数据库备份 使用EXPDP和IMPDP时应该注意的事项:EXP和IMP是客户端工具程序,它们既可以在客户端使用,也可以在服务端使用。EXPDP和IMPDP是服务端的工具程序,他们只能在ORACLE服务端使用,不能在客户端使用。IMP只适用于EXP导出...
分类:
数据库 时间:
2014-09-10 17:09:50
阅读次数:
219
Word Break
Total Accepted: 22281 Total
Submissions: 105657My Submissions
Given a string s and a dictionary of words dict, determine if s can be segmented into a space-separated sequence o...
分类:
其他好文 时间:
2014-09-09 21:39:29
阅读次数:
335
Longest Consecutive Sequence
Total Accepted: 19169 Total
Submissions: 68303My Submissions
Given an unsorted array of integers, find the length of the longest consecutive elements sequence...
分类:
其他好文 时间:
2014-09-07 21:12:55
阅读次数:
294
See LCS again时间限制:1000 ms | 内存限制:65535 KB难度:3描述There are A, B two sequences, the number of elements in the sequence is n、m;Each element in the seque.....
分类:
其他好文 时间:
2014-09-07 21:01:55
阅读次数:
286
Count and Say
Total Accepted: 14508 Total
Submissions: 53213My Submissions
The count-and-say sequence is the sequence of integers beginning as follows:
1, 11, 21, 1211, 111221, ...
1 is...
分类:
其他好文 时间:
2014-09-07 19:49:55
阅读次数:
199
PAT 1085 Perfect Sequence 题目:Given a sequence of positive integers and another positive integer p. The sequence is said to be a "perfect sequence" if ...
分类:
其他好文 时间:
2014-09-07 11:01:24
阅读次数:
245
这题一看10000的数据量就知道必须用nlog(n)的时间复杂度。
所以特意去看了最长上升子序列的nlog(n)的算法。
如果有2个位置,该位置上的元素为A[i]和A[j],并且他们满足以下条件:
1.dp[i] = dp[j] (dp[x]代表以x结尾的最长上升子序列长度)
2.A[i]
3.i
那么毫无疑问,选择dp[i] 一定优于选择dp[j]
那么我们可以利用g[i...
分类:
其他好文 时间:
2014-09-06 22:34:24
阅读次数:
286