传送门在这里。 大意: 给一堆字符串,询问每个字符串有多少子串在所有字符串中出现K次以上。 解题思路: 这种子串问题一定要见后缀自动机Parent树Dfs序统计出现次数都是套路了吧。 这道题统计子串个数,那么可以发现,若一个节点所对应的子串出现了K次,那么其贡献就是len,不需要考虑重复。 因为即使 ...
分类:
其他好文 时间:
2018-12-07 17:17:27
阅读次数:
221
Redis数据结构图: Strings型 <String key,String value>: keys * 查看所有key get 获取key的value值 append 向key对应的value追加内容 Exists 判断key是否存在,存在返回1,不存在返回0 Set 当key存在会把key原 ...
分类:
其他好文 时间:
2018-12-06 17:49:30
阅读次数:
144
Suppose Andy and Doris want to choose a restaurant for dinner, and they both have a list of favorite restaurants represented by strings. You need to h ...
分类:
其他好文 时间:
2018-12-05 23:21:52
阅读次数:
273
import("os""archive/zip""io""fmt""strings")//ZipFilescompressesoneormanyfilesintoasingleziparchivefile.//压缩多个文件到一个文件里面//Param1:输出的zip文件的名字//Param2:需要添加到zip文件里面的文件//Param3:由于file是绝对路径,打包后可能不是想要的目录,oldf
分类:
其他好文 时间:
2018-12-05 20:35:21
阅读次数:
207
Redis is an open source, BSD licensed, advanced key-value store. It is often referred to as a data structure server since keys can contain strings, ha ...
分类:
其他好文 时间:
2018-12-05 00:06:53
阅读次数:
206
Given two non negative integers num1 and num2 represented as string, return the sum of num1 and num2. Note: + The length of both num1 and num2 is =0; ...
分类:
其他好文 时间:
2018-12-04 22:38:04
阅读次数:
244
package main import ( "bufio" "fmt" "io" "os" "regexp" "strings" ) func main() { fileName := "log.log" file, err := os.OpenFile(fileName, os.O_RDWR, 0... ...
分类:
编程语言 时间:
2018-12-04 22:31:50
阅读次数:
416
Given two strings s and t which consist of only lowercase letters. String t is generated by random shuffling string s and then add one more letter at ...
分类:
其他好文 时间:
2018-12-03 22:56:29
阅读次数:
187
Given two strings s and t, determine if they are isomorphic. Two strings are isomorphic if the characters in s can be replaced to get t. All occurrenc ...
分类:
其他好文 时间:
2018-12-03 20:16:19
阅读次数:
204
package main // 当前包声明 func main() { // 程序的入口 // string // Go中的字符串是一个字节的切片,是Unicode兼容的,并且是UTF-8编码的. // 字符串是一些字节的集合,可以理解为一个字符的序列. // 每个字符都又固定的位置 // 定义字符... ...
分类:
编程语言 时间:
2018-12-03 12:49:36
阅读次数:
182