Common Subsequence
Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 25566    Accepted Submission(s): 11361
Problem Description
A sub...
                            
                            
                                分类:
其他好文   时间:
2015-03-21 09:50:55   
                                阅读次数:
98
                             
                         
                    
                        
                            
                            
                                Longest Ordered Subsequence
Time Limit: 2000MS
 
Memory Limit: 65536K
Total Submissions: 36159
 
Accepted: 15882
Description
A numeric sequence of ai is ordered if a1 a2 ...
                            
                            
                                分类:
其他好文   时间:
2015-03-21 09:49:34   
                                阅读次数:
118
                             
                         
                    
                        
                            
                            
                                题意:给你一个字符串,问你含有 k个字符集合 长度最短的不是字符串子序列的种类数和长度。解题思路:DP.很难想 site[i] 表示以i 开头的使得 串不再字符串中的最小长度 ,dp[i] 表示种类数。 状态转移方程在代码里面。解题代码: 1 // File Name: j.4.cpp 2 //.....
                            
                            
                                分类:
其他好文   时间:
2015-03-20 21:37:58   
                                阅读次数:
138
                             
                         
                    
                        
                            
                            
                                Kinda similar with another palindrome DP from LeetCode. Feel it, it is a bottom-up DP - palindrome subsequence.str = input()slen = len(str)dp = [[0 fo...
                            
                            
                                分类:
其他好文   时间:
2015-03-20 06:45:44   
                                阅读次数:
107
                             
                         
                    
                        
                            
                            
                                Given a sequence of K integers { N1, N2, ..., NK}. A continuous subsequence is defined to be { Ni, Ni+1, ..., Nj} where 1 //using namespace std;//cons...
                            
                            
                                分类:
其他好文   时间:
2015-03-19 16:16:34   
                                阅读次数:
163
                             
                         
                    
                        
                            
                            
                                Given a sequence of K integers { N1, N2, ..., NK}. A continuous subsequence is defined to be { Ni, Ni+1, ..., Nj} where 1 5 #include 6 #include 7 #...
                            
                            
                                分类:
其他好文   时间:
2015-03-16 19:10:05   
                                阅读次数:
109
                             
                         
                    
                        
                            
                            
                                Longest Common Subsequence in disguise.Python impl. has TLE in one case. And C++ is fine.#include #include #include #include #include #include #includ...
                            
                            
                                分类:
其他好文   时间:
2015-03-16 16:05:11   
                                阅读次数:
204
                             
                         
                    
                        
                            
                            
                                题目大意:给出n个数,从中选取k个,使得乘积最大,并且尽量使和最大分析:首先按照数的绝对值大小排序。然后就要分三大类情况讨论:(1)前k个中选到0:如果选到0的话,乘积一定是0,所以尽量选大的数,让和变大。(2)前k个中选到负数的个数为偶数:这样的话直接输出答案(一定为最优解)(3)前k个中选到的负...
                            
                            
                                分类:
其他好文   时间:
2015-03-15 16:30:30   
                                阅读次数:
103
                             
                         
                    
                        
                            
                            
                                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 non...
                            
                            
                                分类:
编程语言   时间:
2015-03-13 10:57:15   
                                阅读次数:
188
                             
                         
                    
                        
                            
                            
                                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-03-13 00:20:24   
                                阅读次数:
178