Substring时间限制:1000 ms | 内存限制:65535 KB难度:1描述You 
are given a string input. You are to find the longest substring of input such 
that the reversal of the ...
                            
                            
                                分类:
其他好文   时间:
2014-05-10 06:20:56   
                                阅读次数:
257
                             
                    
                        
                            
                            
                                题目连接:check here~
题意是说给一个字符串,包含'(',')','[',']'四种字符,判断至少需要添加几个字符使所给字符串括号匹配。
区间型动态规划,设dp[i][j]表示在字符串s中i位置到j位置所需要添加的最少的字符(i 
有两种情况:
1、dp[i][j] = dp[i+1][j] + 1; 
表示:在i到j之间没有与s[i]相匹配的括号,则必须添加一个字符来与之匹配...
                            
                            
                                分类:
其他好文   时间:
2014-05-09 14:07:36   
                                阅读次数:
230
                             
                    
                        
                            
                            
                                经典迷宫问题。。。STL~queue+BFS实现,给正在学习使用queue和BFS的童鞋提供一个比较好理解的模板~=w=~...
                            
                            
                                分类:
其他好文   时间:
2014-05-09 06:05:13   
                                阅读次数:
353
                             
                    
                        
                            
                            
                                NYOJ 654 喜欢玩warcraft的ltl...
                            
                            
                                分类:
其他好文   时间:
2014-05-08 01:40:10   
                                阅读次数:
234