Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters fo...
分类:
其他好文 时间:
2015-09-11 10:41:08
阅读次数:
144
用把失配边也加到正常边以后AC自动机,状态是长度递减的DAG,每个选一个不会匹配字符的转移。dp[u][L]表示当前在tire树上u结点长度还剩L时候不匹配的概率,根据全概率公式跑记忆化搜索。#includeusing namespace std;typedef double ld;const in...
分类:
其他好文 时间:
2015-09-10 17:17:26
阅读次数:
190
Problem:Given a string, find the length of the longest substring T that contains at most 2 distinct characters.For example, Given s =“eceba”,T is "ece...
分类:
其他好文 时间:
2015-09-10 12:47:29
阅读次数:
210
由于在项目中有需要对字符串进行截取,然后手残使用了IDE自动提示的substr,没想那么多以为substr和substring没多大区别。然而并不是,且听我一一道来。1. substr(index, length)从起始索引号提取字符串中指定数目的字符。 substr方法可以传入两个参数 index...
分类:
编程语言 时间:
2015-09-10 00:12:20
阅读次数:
232
try{ int t = 1; int i = 5 / --t;}catch (Exception ee){ int i = ee.StackTrace.IndexOf("行号"); string s = ee.StackTrace.Substring(i + 3); ...
表Axm xk张三 语文,历史,音乐李四 体育,语文现在想查询得到xm xk张三 语文张三 历史张三 音乐李四 体育李四 语文1 Select2 a.xm,xk=substring(a.xk,b...
分类:
数据库 时间:
2015-09-09 17:29:46
阅读次数:
247
【题目描述】Given a string, find the length of the longest substring without repeating characters.For example, the longest substring without repeating lette...
分类:
其他好文 时间:
2015-09-08 12:20:24
阅读次数:
94
题目来源:https://leetcode.com/problems/longest-palindromic-substring/题意分析: 这道题目是输入一段不超过1000的字符串,输出最长的回文子字符串,输入的字符串有一个唯一的最长回文子字符串(个人觉得这个没什么用,还限制了一些输入,比如长度为...
分类:
编程语言 时间:
2015-09-08 12:20:13
阅读次数:
195
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters fo...
分类:
其他好文 时间:
2015-09-07 22:50:00
阅读次数:
213