题目描述: Given a string which consists of lowercase or uppercase letters, find the length of the longest palindromes that can be built with those letters ...
分类:
其他好文 时间:
2018-06-07 19:18:44
阅读次数:
170
We are to write the letters of a given string S, from left to right into lines. Each line has maximum width 100 units, and if writing a letter would c ...
分类:
其他好文 时间:
2018-06-07 10:24:18
阅读次数:
160
name = 'The Apple'print(name.capitalize()) #把字符串首字母大写print(name.center(100,'-')) #把字符串居中的print(name.index('p'))#找不到下标的时候会报错print(name.isalnum()) #只能有英 ...
分类:
其他好文 时间:
2018-06-06 21:48:50
阅读次数:
111
F. k-substrings time limit per test 4 seconds memory limit per test 256 megabytes input standard input output standard output F. k-substrings time lim ...
分类:
其他好文 时间:
2018-06-06 21:47:20
阅读次数:
147
一、字符串操作:name = 'aabc,dddd,a'name1 = 'q '# print(name[3]) #字符串也可以取下标# print(name.capitalize()) #把字符串首字母大写# print(name.center(11,'*')) #把name放中间,字符串少于11 ...
分类:
编程语言 时间:
2018-06-03 23:27:36
阅读次数:
295
题目描述: Given an arbitrary ransom note string and another string containing letters from all the magazines, write a function that will return true if th ...
分类:
其他好文 时间:
2018-06-02 14:56:23
阅读次数:
199
【链接】: " CF978C " 【分析】:在前缀和数组种二分找到 =询问数的位置,根据位置就好操作了 【代码】: include using namespace std; const int INF = 0x3f3f3f3f; define ll long long define ms(a,b) ...
分类:
其他好文 时间:
2018-06-02 11:32:38
阅读次数:
161
题目:解码方法数 难度:Medium 题目内容: A message containing letters from A-Z is being encoded to numbers using the following mapping: 'A' -> 1 'B' -> 2 ... 'Z' -> 2 ...
分类:
编程语言 时间:
2018-05-30 01:24:09
阅读次数:
327
题目描述 There is a string s of length 3 or greater. No two neighboring characters in s are equal.Takahashi and Aoki will play a game against each other. ...
分类:
其他好文 时间:
2018-05-29 20:41:11
阅读次数:
243
原题网址:https://www.lintcode.com/problem/sort-letters-by-case/description 描述 给定一个只包含字母的字符串,按照先小写字母后大写字母的顺序进行排序。 描述 描述 给定一个只包含字母的字符串,按照先小写字母后大写字母的顺序进行排序。 ...
分类:
编程语言 时间:
2018-05-28 21:48:20
阅读次数:
217