Given a stringSand a stringT, count the number of distinct subsequences ofTinS.A subsequence of a string is a new string which is formed from the orig...
                            
                            
                                分类:
其他好文   时间:
2015-04-10 15:29:31   
                                阅读次数:
161
                             
                         
                    
                        
                            
                            
                                Given a sequence of K integers { N1, N2, ..., NK }. A continuous subsequence is defined to be { Ni, Ni+1, ..., Nj } where 1 =0)25 {26 ...
                            
                            
                                分类:
其他好文   时间:
2015-04-07 22:58:11   
                                阅读次数:
214
                             
                         
                    
                        
                            
                            
                                poj 1458 Common Subsequence http://poj.org/problem?id=1458问题分析:这个题是求两个序列的最长公共最序列长度,在这里要弄清楚两个问题1:本题中所有的子序列并没有要求是连续子序列,所以在求2:哪部分子序列才是最长的 对于给定的X =...
                            
                            
                                分类:
其他好文   时间:
2015-04-07 00:40:57   
                                阅读次数:
107
                             
                         
                    
                        
                            
                            
                                题目地址:http://acm.csu.edu.cn/OnlineJudge/problem.php?id=1553
给定n的数的序列,求最长连续区间满足区间内的数最大值与最小值的差
(尺取法)
const int maxn=10010;
int num[maxn];
int n,k;
int MIN,MAX;
int main()
{
    while(scanf("%d%d",&n,&...
                            
                            
                                分类:
其他好文   时间:
2015-04-05 20:30:41   
                                阅读次数:
259
                             
                         
                    
                        
                            
                            
                                Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 9595Accepted Submission(s): 3923Problem Descriptio...
                            
                            
                                分类:
其他好文   时间:
2015-04-05 06:22:32   
                                阅读次数:
158
                             
                         
                    
                        
                            
                            
                                Common Subsequence
Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 25791    Accepted Submission(s): 11432
Problem Description
A sub...
                            
                            
                                分类:
其他好文   时间:
2015-04-02 18:56:12   
                                阅读次数:
137
                             
                         
                    
                        
                            
                            
                                Given a string S and a string T, count the number of distinct subsequences of T in S.
A subsequence of a string is a new string which is formed from the original string by deleting some (can be none)...
                            
                            
                                分类:
其他好文   时间:
2015-03-31 14:42:13   
                                阅读次数:
138
                             
                         
                    
                        
                            
                            
                                最长公共子序列时间限制:3000ms | 内存限制:65535KB难度:3描述咱们就不拐弯抹角了,如题,需要你做的就是写一个程序,得出最长公共子序列。tip:最长公共子序列也称作最长公共子串(不要求连续),英文缩写为LCS(Longest Common Subsequence)。其定义是,一个序列 ...
                            
                            
                                分类:
其他好文   时间:
2015-03-31 00:53:00   
                                阅读次数:
102
                             
                         
                    
                        
                            
                            
                                1551: LongestIncreasingSubsequence AgainTime Limit:2 SecMemory Limit:256 MBSubmit:75Solved:52DescriptionGive you a numeric sequence. If you can demoli...
                            
                            
                                分类:
其他好文   时间:
2015-03-30 21:01:19   
                                阅读次数:
147
                             
                         
                    
                        
                            
                            
                                今天回顾WOJ1398,发现了这个当时没有理解透彻的算法。看了好久好久,现在终于想明白了。试着把它写下来,让自己更明白。最长递增子序列,Longest Increasing Subsequence 下面我们简记为 LIS。排序+LCS算法 以及 DP算法就忽略了,这两个太容易理解了。假设存在一个序列...
                            
                            
                                分类:
其他好文   时间:
2015-03-30 18:08:38   
                                阅读次数:
127