private void CreateDesktop() { string path = this.Context.Parameters["targetdir"]; path = path.Substring(0, path.LastIn...
分类:
其他好文 时间:
2015-01-22 12:29:11
阅读次数:
157
1、string var string = "this is mine" string.substring(); //截取函数 string.toLowerCase(); //换换小写 string.toUpperCase(); //转换大写 string.indexOf("is")...
分类:
Web程序 时间:
2015-01-22 10:48:26
阅读次数:
279
Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longes...
分类:
其他好文 时间:
2015-01-22 00:10:52
阅读次数:
142
题目意思是,给你提供两个数字 a 和 ba 可以不断的往上加, 直到b 为其子串问的是 a 最小加几?显而易见,a 的数据范围给了10 ^100非常大,直接模拟肯定不行那么就用 b 减去 a 来找,也算是一种模拟的方法举个例子, a = 1299, b = 3333 330 3300 ...
分类:
其他好文 时间:
2015-01-21 23:48:30
阅读次数:
197
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
原题地址1. 把所有元素都塞到集合里2. 遍历所有元素,对于每个元素,如果集合里没有,就算了,如果有的话,就向左向右拓展,找到最长的连续范围,同时在每次找的时候都把找到的删掉。这样做保证了同样的连续序列只会被遍历一次,从而保证时间复杂度。时间复杂度O(n)代码: 1 int longestConse...
分类:
其他好文 时间:
2015-01-20 17:29:55
阅读次数:
126
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