题目:给两个字符串S和T,判断T在S中出现的次数。
A subsequence of a string is a new string which is formed from the original string by deleting some (can be none) of the characters without disturbing the relative positions of the remaining characters. (ie, "ACE" is a subsequence...
分类:
其他好文 时间:
2014-10-19 17:09:51
阅读次数:
190
Language:
Default
Longest Ordered Subsequence
Time Limit: 2000MS
Memory Limit: 65536K
Total Submissions: 33986
Accepted: 14892
Description
A numeric sequence of a...
分类:
其他好文 时间:
2014-10-19 11:38:30
阅读次数:
249
New Distinct SubstringsTime Limit: 2000msMemory Limit: 262144KBThis problem will be judged onSPOJ. Original ID:SUBST164-bit integer IO format:%lld Jav...
分类:
其他好文 时间:
2014-10-18 23:41:43
阅读次数:
283
题意:求LCS
Sol:经典的 LCS。
if ( i==0 || j==0 ) dp [ i , j ] = 0 ;
else if ( X[ i ] == Y [ j ] ) dp [ i-1 , j-1 ] + 1;
else dp [ i, j ] = max ( dp[ i - 1 , j ] , dp [ i , j-1 ] )
#include
#i...
分类:
其他好文 时间:
2014-10-18 21:01:51
阅读次数:
203
Follow up for N-Queens problem.Now, instead outputting board configurations, return the total number of distinct solutions.Solution:N-Queens 问题的简化版。pu...
分类:
其他好文 时间:
2014-10-18 07:32:25
阅读次数:
159
一 查询语句
1 distinct关键字消除重复行
当查询的结果数据中出现重复数据时,在查询条件中加上distinct关键字消除重复行;
如:select distinct Sno from SC;
2 like匹配的通配符%和_
% :代表任意长度(包括0)的字符串,例如:like'a%b',表示以a开头,以b结尾的任意长度的字符串;
_ :代表任意单个字符,注意数据库的字符集为AS...
分类:
数据库 时间:
2014-10-17 23:26:29
阅读次数:
228
LeetCode:SubsetsGiven a set of distinct integers,S, return all possible subsets.Note:Elements in a subset must be in non-descending order.The solution...
分类:
其他好文 时间:
2014-10-17 10:27:24
阅读次数:
293
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
Common Subsequence
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 23923 Accepted Submission(s): 10567
Problem Description
A sub...
分类:
其他好文 时间:
2014-10-16 18:39:22
阅读次数:
231
要学的 太多了.学到的 都是有用的 即便你不会在比赛中遇到这个类型的 但是开拓了你的思维这2题 都是LCIS-Longest Common Increase Subsequence我是在这边学习的 传送这篇写的很好.我觉得对于4512要好好理解下啊 我想了好久 太白痴了....注意下 数组的对称性1...
分类:
其他好文 时间:
2014-10-16 18:26:32
阅读次数:
338