题目地址:http://codeforces.com/contest/978/problem/C 题解:有n个宿舍,每个宿舍人不一样多,有m封信,每封信送给对应的第m间房间,问这封信是给第几个宿舍,第几间房的。 方法:做题目的时候没有看到信的编号是不断升高的,把题目想复杂了,wa了两次。这题把寝室的 ...
分类:
其他好文 时间:
2018-05-15 17:27:35
阅读次数:
178
C. Letters 题目大意: 分析: code: ...
分类:
其他好文 时间:
2018-05-14 22:57:06
阅读次数:
266
描述 The D-pairs of a string of letters are the ordered pairs of letters that are distance D from each other. A string is D-unique if all of its D-pairs ...
分类:
其他好文 时间:
2018-05-14 13:19:15
阅读次数:
186
Find And Replace in String To some string S, we will perform some replacement operations that replace groups of letters with new ones (not necessarily ...
分类:
其他好文 时间:
2018-05-14 00:08:19
阅读次数:
181
D. String D. String You are given a string s. Each pair of numbers l and r that fulfill the condition 1?≤?l?≤?r?≤?|s|, correspond to a substring of th ...
分类:
编程语言 时间:
2018-05-13 19:03:40
阅读次数:
220
随机密码定向生成加盐直接复制importstringimportrandomcount=8str_from=string.ascii_letters+string.digits"".join([random.choice(str_from)for_inrange(count)])‘NLlZXbh9‘importstringimportrandomdefrandom_passwd(count):"生
分类:
其他好文 时间:
2018-05-12 00:06:20
阅读次数:
160
Description Nikolay has decided to become the best programmer in the world! Now he regularly takes part in various programming contests, attentively l ...
分类:
其他好文 时间:
2018-05-11 20:37:36
阅读次数:
143
1.向列表增加元素 使用append() 2.列表分片(slicing) print letters[1:4] 取回三项(索引数之差) 3.扩展列表 extend()在末尾增加多个元素extend.extend(['p','a','v']) 4.插入元素insert() letters.insert ...
分类:
编程语言 时间:
2018-05-09 19:41:43
阅读次数:
177
Positions of Large Groups In a string S of lowercase letters, these letters form consecutive groups of the same character. For example, a string like ...
分类:
其他好文 时间:
2018-05-07 00:43:14
阅读次数:
233
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-06 13:42:31
阅读次数:
408