摘要:        
动规优化里面也要大量使用二分查找,我觉得这道题对二分查找考察的很好我的做法是在字典序中查找不小于输入字串的最小字串,对于它及它之后的字串判断是否以输入字串为前缀。由于题目中说有重复的字串,我给重复的字串加了个标记。//By YY_More#include<cstdio>#include<cstring>#include<algorithm>using namespace std;struct node{	char st[30];};	node f[10010];bool nok[10010];int n,k,p,q;char str[30];bool com    阅读全文
        
            posted @ 2011-06-21 23:53
YY_More
阅读(317)
评论(0)
推荐(1)
        
    
                    
                
浙公网安备 33010602011771号