SGU 407
407. Number of Paths in the Empire
Time limit per test: 0.75 second(s)
Memory limit: 65536 kilobytes
input: standard
output: standard
During the period of Tsam dynasty ruling...
                            
                            
                                分类:
编程语言   时间:
2014-08-04 17:46:17   
                                阅读次数:
294
                             
                    
                        
                            
                            
                                1、关闭集群 2、通过修改core-site.xml ??<property>
????<name>fs.checkpoint.period</name>
????<value>180</value><!--单位为秒-->
??</property>
??<property>
????<name>fs.checkpoint.d...
                            
                            
                                分类:
其他好文   时间:
2014-08-04 14:48:57   
                                阅读次数:
202
                             
                    
                        
                            
                            
                                题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1358题目大意:解释一下输出数据,第一组:2 2 表示的是第一个字母到第二字母,a出现了两次。3 3 表示的是第一个字母到第三个字母,a出现了3次。第二组:2 2表示的是第一个字母到第二个字母,a出现了两...
                            
                            
                                分类:
其他好文   时间:
2014-08-03 20:19:05   
                                阅读次数:
233
                             
                    
                        
                            
                            
                                UVA 1328 - Period
题目链接
题意:给定一个字符串,求出有几个位置的前缀串是由个数大于1的串循环得到的,求出位置和循环次数
思路:利用kmp的next数组的性质,i - next[i]就是循环长度,然后判断一下是不是正好是倍数即可
代码:
#include 
#include 
const int N = 1000005;
int n, next[...
                            
                            
                                分类:
其他好文   时间:
2014-08-01 13:49:11   
                                阅读次数:
171
                             
                    
                        
                            
                            
                                今天看了一段话觉得挺有道理的。内容如下:
You got a dream,you gotta protect it.People can't do something themselves,they wanna tell you can't do it .If you want something,got get it.Period. 
(如果你有梦想的话,就要去捍卫它。当别人做不到的...
                            
                            
                                分类:
其他好文   时间:
2014-07-29 18:01:53   
                                阅读次数:
246
                             
                    
                        
                            
                            
                                DescriptionFor each prefix with length P of a given string S,ifS[i]=S[i+P] for i in [0..SIZE(S)-p-1],then the prefix is a “period” of S. We want to al...
                            
                            
                                分类:
其他好文   时间:
2014-07-28 15:30:03   
                                阅读次数:
330
                             
                    
                        
                            
                            
                                Problem DescriptionFor each prefix with length P of a given string S,ifS[i]=S[i+P] for i in [0..SIZE(S)-p-1],then the prefix is a “period” of S. We wa...
                            
                            
                                分类:
其他好文   时间:
2014-07-27 22:27:09   
                                阅读次数:
249
                             
                    
                        
                            
                            
                                题意:给你一个字符串,求这个字符串首字符到第i个字符为止的子串的最大循环次数k(k>1),若存在,输出i和k.
比如aabaabaabaab,长度为12.
到第2个字符时,a出现2次,到第6个字符时,aab出现了2次,
到第9个字符时,aab出现3次,到第12个字符时,aab出现4次
分析:这个就是求给定字符串的前缀子串(包括整个串)的最大循环次数,根据next数组即可...
                            
                            
                                分类:
其他好文   时间:
2014-07-26 15:29:12   
                                阅读次数:
236
                             
                    
                        
                            
                            
                                Period
Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 2866    Accepted Submission(s): 1433
Problem Description
For each prefix of ...
                            
                            
                                分类:
其他好文   时间:
2014-07-23 17:07:01   
                                阅读次数:
234
                             
                    
                        
                            
                            
                                Description
During the Warring States Period of ancient China(476 BC to 221 BC), there were seven kingdoms in China -- they were Qi, Chu, Yan, Han, Zhao, Wei and Qin. Ying Zheng was the king of the...
                            
                            
                                分类:
其他好文   时间:
2014-07-21 23:27:49   
                                阅读次数:
437