字符串
eazo
这个作者很懒,什么都没留下…
展开
-
野牛与狼(前缀和)
题目描述位于欧洲中部的赫希费尔登狩猎保护区生活着许多动物,雄壮的野牛和凶狠的狼群之间保持着一种平衡,当野牛的数量和狼群一样多时,它们彼此互不侵犯相安无事,但只要狼的数量多于野牛狼群就会攻击牛群,而野牛数量占多数时,它们会驱逐狼群到别的地方。当地的统计学家把牛群和狼群分布通过0和1表示为一个字符串S,S的字串可以表示一个区域内的牛和狼总数,请你根据这个统计字符串,判断出来这个保护区内能共存最多头...原创 2019-10-29 22:08:10 · 1055 阅读 · 0 评论 -
Super-palindrome
题目描述You are given a string that is consisted of lowercase English alphabet. You are supposed to change it into a super-palindrome string in minimum steps. You can change one character in string to an...原创 2019-04-05 20:06:25 · 131 阅读 · 0 评论 -
Parentheses(字符串模拟)
题目描述The correspondence among the operators and the operands can be clarified using parentheses. In a C program, for example, the expression a-b-c can be clarified as (a-b)-c since the minus operator ...转载 2019-04-12 10:50:33 · 511 阅读 · 0 评论 -
Progressive Scramble(字符串模拟)
题目描述You are a member of a naive spy agency. For secure communication,members of the agency use a very simple encryption algorithm – which changes each symbol in the message ‘progressively’, i.e., bas...原创 2019-04-15 23:03:24 · 136 阅读 · 0 评论 -
Hamming Distance(字符串模拟)
题目描述In information theory, the Hamming distance between two strings of equal length is the number of positions at which the corresponding symbols are different. In other words, it measures the minimu...原创 2019-05-04 00:13:33 · 508 阅读 · 1 评论 -
自动完成 APP
题目描述奶牛 Bessie 很喜欢用手机上网聊天,但她的蹄子太大,经常会按到好几个键造成不必要的麻烦(丢死人了,你下辈子还是不要当奶牛了)。于是 Farmer John 给她专门设计了一套「自动完成 APP」。这个 APP 能够连接到在线词典来获取词库(词库的来源是 Bessie 常用的 n 个单词),并且有着自动补全的功能。当 Bessie 想打出她的一个常用单词时,她只需输入这个单词的某个前...原创 2019-08-03 10:27:17 · 177 阅读 · 0 评论 -
String 2019
题目描述Tom has a string containing only lowercase letters. He wants to choose a subsequence of the string whose length is k and lexicographical order is the smallest. It’s simple and he solved it with e...转载 2019-07-28 10:51:54 · 125 阅读 · 0 评论 -
BAZINGA(upcoj)(字符串)
题目描述For n given strings S1 , S2 , … , Sn , labelled from 1 to n, you should find the largest i (1 ≤ i ≤ n) such that there exists an integer j (1 ≤ j < i) such that Sj is not a substring of Si . F...原创 2019-10-02 00:38:52 · 249 阅读 · 0 评论