1.substring(start,[ end ])--提取字符串中介于两个指定下标之间的字符说明:substring 方法返回的子串包括 start 处的字符,但不包括 end 处的字符。如果 start 与 end 相等,那么该方法返回的就是一个空串(即长度为 0 的字符串)。如果 start ...
分类:
Web程序 时间:
2015-01-21 22:19:25
阅读次数:
215
获取指定字符串中某个字符,用substring(intstart,intend)这个方法实验证明,无论中文英文数字,都是算一个长度输出结果:
分类:
移动开发 时间:
2015-01-20 18:34:53
阅读次数:
258
You are given a string, S, and a list of words, L, that are all of the same length. Find all starting indices of substring(s) in S that is a concatena...
分类:
其他好文 时间:
2015-01-20 17:24:35
阅读次数:
125
【题目】
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without
repeating letters for "abcabcbb" is "abc", which the length is...
分类:
其他好文 时间:
2015-01-20 15:42:24
阅读次数:
132
题解:正解是LCT+SAM。
但是出题人太神以至于不屑于卡你,所以只写个SAM然后暴力维护就好了。
这样虽然很不科学,但是可以比正解快三倍。
我是太困了吧,写挂了调了好久(发呆了好久然后秒调过,或者说半眯着眼睛睡了一会)
代码:
#include
#include
#include
#include
#define N 1601000
#define T 26
#...
分类:
其他好文 时间:
2015-01-20 12:03:42
阅读次数:
200
题目大意:给出一个字符串,支持在线在字符串后面加一个字符串,查询一个字符串在串中出现过几次。
思路:如果不想写正解的话,这个题就是后缀自动机的简单应用。正解其实是LCT+SAM,但是时间比暴力慢一倍。。。
暴力就很简单了,正序建立后缀自动机,每次查询的时候找到位置直接输出size的值。注意两点,一个是分裂节点的时候,size也要复制过去。查询的时候发现找不到要return 0;
...
分类:
其他好文 时间:
2015-01-19 21:08:55
阅读次数:
225
Sqlserver中经常要操作一些时间类型的字段转换,我又不太记得住,所以搜集了以下的一些SqlserverConvertDateTime相关的资料发表在自己的小站里,方便自己以后要用的时候寻找,望对大家也有帮助.将sqlserver中table表的[datetime]字段值‘2007-11-071...
分类:
数据库 时间:
2015-01-19 09:12:05
阅读次数:
634
https://oj.leetcode.com/problems/longest-substring-without-repeating-characters/Given a string, find the length of the longest substring without repea...
分类:
其他好文 时间:
2015-01-18 23:57:54
阅读次数:
264
问题描述:
Given a string s, partition s such that every substring of the partition is a palindrome.
Return all possible palindrome partitioning of s.
For example, given s = "aab",
Return
[...
分类:
其他好文 时间:
2015-01-18 18:36:06
阅读次数:
158
题目:
Given a string, find the length of the longest substring without repeating characters. For example,
the longest substring without repeating letters for "abcabcbb" is "abc", which the length is ...
分类:
编程语言 时间:
2015-01-17 18:10:44
阅读次数:
251