gate 一年前做的. 求一个字符串由多少个循环节构成. KMP. 结论:若$n % (n-next[n]) \not= 0$则不是由循环节构成的. 否则,答案为$n/(n-next[n])$. code #include<cstdio> #include<iostream> #include<cm ...
                            
                            
                                分类:
其他好文   时间:
2020-07-01 09:51:14   
                                阅读次数:
65
                             
                    
                        
                            
                            
                                    int prime[maxn], prime_tot; int is_prime[maxn]; int mu[maxn]; void pre_calc(int lim) { mu[1] = 1; for (int i = 2; i <= lim; i++) { if (!is_prime[i]) { ...
                            
                            
                                分类:
其他好文   时间:
2020-06-30 20:43:31   
                                阅读次数:
49
                             
                    
                        
                            
                            
                                A few weeks ago we introduced the first demonstration of “P4 Runtime”. We invite all members of the networking community to join with us, so that toge ...
                            
                            
                                分类:
其他好文   时间:
2020-06-30 13:01:44   
                                阅读次数:
51
                             
                    
                        
                            
                            
                                1.使用SQL参照 JSP新闻列表显示 2.新增web项目,项目名称为ssmNewsList 基本项目结构如下: 3.分别创建applicationContext-dao.xml、applicationContext-service.xml、applicationContext-transactio ...
                            
                            
                                分类:
其他好文   时间:
2020-06-27 13:34:52   
                                阅读次数:
96
                             
                    
                        
                            
                            
                                    蓝牙mesh网络技术的亮点 The highlights of Bluetooth mesh networking technology 导言 蓝牙是当今最主要的低功耗无线技术之一,对无线设备用户和开发人员非常熟悉。蓝牙网络类型仅限于两个设备(信标或单个集线器)和几个只能与该集线器(星型网络)通信的 ...
                            
                            
                                分类:
其他好文   时间:
2020-06-27 12:00:36   
                                阅读次数:
83
                             
                    
                        
                            
                            
                                题目: 给你n个数字v(1),v(2),...,v(n-1),v(n),每次你可以取出最左端的数字或者取出最右端的数字,一共取n次取完。假设你第i次取的数字是x,你可以获得i*x的价值。你需要规划取数顺序,使获得的总价值之和最大。Input第一行一个数字n(1<=n<=2000)。下面n行每行一个数 ...
                            
                            
                                分类:
其他好文   时间:
2020-06-26 18:00:32   
                                阅读次数:
42
                             
                    
                        
                            
                            
                                    【题目描述】 法国作家乔治·佩雷克(Georges Perec,1936-1982)曾经写过一本书,《敏感字母》(La disparition),全篇没有一个字母‘e’。他是乌力波小组(Oulipo Group)的一员。下面是他书中的一段话: Tout avait Pair normal, mais ...
                            
                            
                                分类:
其他好文   时间:
2020-06-24 21:52:32   
                                阅读次数:
48
                             
                    
                        
                            
                            
                                    Power Strings Time Limit: 3000MS Memory Limit: 65536KB 64bit IO Format: %I64d & %I64u Submit Status Description Given two strings a and b we define a* ...
                            
                            
                                分类:
其他好文   时间:
2020-06-24 21:40:19   
                                阅读次数:
63
                             
                    
                        
                            
                            
                                原题连接 : http://poj.org/problem?id=1149 题目大意:有m个养猪场,n个顾客,每个顾客都有若干把养猪场的钥匙,最开始养猪场是全部锁上的,每个顾客来的时候可以用钥匙打开固定的养猪场并进行购买,每个顾客都有一个购买上限; 购买完后可以把打开的猪场里的猪任意的调整到别的打开 ...
                            
                            
                                分类:
其他好文   时间:
2020-06-23 15:19:59   
                                阅读次数:
49
                             
                    
                        
                            
                            
                                    错误:job for network.service failed because the control process exited with error code.see "" fordetails failed to start lsb bring up/down networking 解决 ...
                            
                            
                                分类:
其他好文   时间:
2020-06-22 18:54:09   
                                阅读次数:
112