1 #include 2 #include 3 #include 4 5 /* 6 _Check_return_ _Ret_maybenull_ 7 inline char* __CRTDECL strstr(_In_z_ char* const _String, _In_z_ char const... ...
分类:
其他好文 时间:
2018-03-11 14:37:45
阅读次数:
194
这个高精度没有使用两个char来模拟,而是用每个int保存大数的4位 ...
分类:
其他好文 时间:
2018-03-11 02:39:17
阅读次数:
213
#include<stdio.h>void trimspae(char *str,char *newstr){ char*p=str; int i,j,ncount; i=0; j=strlen(p)-1; if(str==NULL||newstr==NULL) { printf("func tri ...
分类:
其他好文 时间:
2018-03-07 16:29:21
阅读次数:
155
题目描述: 最大公共子串长度问题就是: 求两个串的所有子串中能够匹配上的最大长度是多少。比如:"abcdkkk" 和 "baabcdadabc",可以找到的最长的公共子串是"abcd",所以最大公共子串长度为4。下面的程序是采用矩阵法进行求解的,这对串的规模不大的情况还是比较有效的解法。请分析该解法 ...
分类:
其他好文 时间:
2018-03-06 20:19:05
阅读次数:
176
题目大意 ? 一个字符串$s$是$1$?回文串当且仅当这个串是回文串。 ? 一个串$s$是$k$?回文串$(k 1)$当且仅当$s$的前一半与后一半相同且$s$的前一半是非空$(k?1)$?回文串。 ? 一个串$s$的前一半是这个串的长度为$\lfloor\frac{|s|}{2}\rfloor$的 ...
分类:
其他好文 时间:
2018-03-05 18:10:26
阅读次数:
196
#include #include using namespace std; int main() { char str[1234]; int s,len,sum; while(cin>>str>>s) { len=strlen(str); sum=0; for(int i... ...
分类:
其他好文 时间:
2018-03-05 13:47:06
阅读次数:
115
http://172.20.6.3/Problem_Show.asp?id=1547 http://www.lydsy.com/JudgeOnline/problem.php?id=4566 似乎后缀自动机是正解,但是后缀数组+并查集也可以乱搞a掉,定义字符串大小的整型变量时候char siz导致r ...
分类:
编程语言 时间:
2018-03-05 12:51:19
阅读次数:
212
rtrim (PHP 4, PHP 5, PHP 7) rtrim — Strip whitespace (or other characters) from the end of a string rtrim — 删除字符串末端的空白字符(或者其他字符) Description Parameter ...
分类:
Web程序 时间:
2018-03-04 18:07:27
阅读次数:
195
具体原理可以参考这里:扩展KMP、扩展KMP算法(刘毅) 代码: ...
分类:
其他好文 时间:
2018-03-04 01:07:41
阅读次数:
138
题目: 输入数字n,按顺序打印出从1到最大的n位十进制数。比方输入3,则打印出1,2,3一直到最大的3位数即999。 解决问题须要表达一大数。最经常使用也是最easy的方法是用字符串或者数组表达大数。 在字符串上模拟数字加法的解法 Increment代码例如以下: bool Increment(ch ...
分类:
其他好文 时间:
2018-03-03 16:52:56
阅读次数:
158