A string is finite sequence of characters over a non empty finite set Σ. In this problem, Σ is the set of lowercase letters. Substring, also called fa ...
分类:
其他好文 时间:
2018-05-28 17:24:28
阅读次数:
161
题目:矩阵单词搜索 难度:Medium 题目内容: Given a 2D board and a word, find if the word exists in the grid. The word can be constructed from letters of sequentially a ...
分类:
编程语言 时间:
2018-05-26 01:16:01
阅读次数:
310
Ransom Note Given an arbitrary ransom note string and another string containing letters from all the magazines, write a function that will return true ...
分类:
其他好文 时间:
2018-05-23 22:15:05
阅读次数:
178
#!/usr/bin/python # -*- coding: UTF-8 -*- import string s = raw_input('请输入一个字符串:\n') letters = 0 space = 0 digit = 0 others = 0 for c in s: if c.isalp... ...
分类:
其他好文 时间:
2018-05-23 19:04:31
阅读次数:
141
假如两个区间的26的字母出现的位置集合分别是 A1,B1,A2,B2,....., 我们再能找到一个排列p[] 使得 A[i] = B[p[i]] ,那么就可以成功映射了。 显然集合可以直接hash,排序一下hash值就可以判断是否匹配了。。。。 虽然不知道为什么要卡19260817,但反正我是坚决 ...
分类:
其他好文 时间:
2018-05-22 14:54:15
阅读次数:
261
传送门 题目 You are given a string s. Among the different substrings of s, print the K-th lexicographically smallest one. A substring of s is a string obta ...
分类:
其他好文 时间:
2018-05-21 19:49:35
阅读次数:
167
In a string S of lowercase letters, these letters form consecutive groups of the same character. For example, a string like S = "abbxxxxzyy" has the g ...
分类:
其他好文 时间:
2018-05-21 10:36:58
阅读次数:
179
李阳疯狂英语: 长元音:国际音标准中后面带点的 双元音:成对成对出现的,字母组合。前一个音滑动到后面一个音的, 短元音:就是国际音标里没有两个点的元音,急促有力。 st Mike likes to write letters to his girlfriend by the moonnight at ...
分类:
其他好文 时间:
2018-05-21 00:00:49
阅读次数:
160
BZOJ_2580_[Usaco2012 Jan]Video Game_AC自动机+DP Description Bessie is playing a video game! In the game, the three letters 'A', 'B', and 'C' are the only ...
分类:
其他好文 时间:
2018-05-20 14:11:35
阅读次数:
201
Goat Latin A sentence S is given, composed of words separated by spaces. Each word consists of lowercase and uppercase letters only. We would like to ...
分类:
其他好文 时间:
2018-05-20 10:39:54
阅读次数:
184