随笔分类 -  字符串

摘要:Musical Theme Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 38494 Accepted: 12654 Description A musical melody is represented as a sequen 阅读全文
posted @ 2019-08-28 20:15 WAKBGAN 阅读(156) 评论(0) 推荐(0)
摘要:Problem Description You are given a string S consisting of only lowercase english letters and some queries.For each query (l,r,k), please output the s 阅读全文
posted @ 2019-08-28 16:43 WAKBGAN 阅读(162) 评论(0) 推荐(0)
摘要:题意:给你一个字符串 现在要你找出一个长度为k的字典序最小的子序列 且要求每个字母出现的个数要满足要求 思路:我们可以贪心构造每一位字符 优先放置字典序更小的字符 判断是否合法即可 阅读全文
posted @ 2019-08-16 14:19 WAKBGAN 阅读(182) 评论(0) 推荐(0)
摘要:#include #define ll long long #define ull unsigned long long const int inf = 0x3f3f3f3f; const int N = 4e5+7; const ll mod = 998244353; using namespace std; ull hash1=13331; ull ha[N],pp[N]; ull geth... 阅读全文
posted @ 2019-07-26 19:48 WAKBGAN 阅读(105) 评论(0) 推荐(0)
摘要:Problem Description You are given a string S=s1s2..s|S| containing only lowercase English letters. For each integer i∈[1,|S|] , please output how many 阅读全文
posted @ 2019-07-26 19:31 WAKBGAN 阅读(164) 评论(0) 推荐(0)
摘要:Problem Description 当太阳的光辉逐渐被月亮遮蔽,世界失去了光明,大地迎来最黑暗的时刻。。。。在这样的时刻,人们却异常兴奋——我们能在有生之年看到500年一遇的世界奇观,那是多么幸福的事儿啊~~但网路上总有那么些网站,开始借着民众的好奇心,打着介绍日食的旗号,大肆传播病毒。小t不幸 阅读全文
posted @ 2019-05-08 21:34 WAKBGAN 阅读(133) 评论(0) 推荐(0)
摘要:Problem Description 吉哥又想出了一个新的完美队形游戏! 假设有n个人按顺序站在他的面前,他们的身高分别是h[1], h[2] ... h[n],吉哥希望从中挑出一些人,让这些人形成一个新的队形,新的队形若满足以下三点要求,则就是新的完美队形: 1、挑出的人保持原队形的相对顺序不变 阅读全文
posted @ 2019-03-26 15:45 WAKBGAN 阅读(161) 评论(0) 推荐(0)
摘要:Problem Description One day, sailormoon girls are so delighted that they intend to research about palindromic strings. Operation contains two steps:Fi 阅读全文
posted @ 2019-03-26 14:55 WAKBGAN 阅读(219) 评论(0) 推荐(0)
摘要:Problem Description For each prefix with length P of a given string S,if S[i]=S[i+P] for i in [0..SIZE(S)-p-1], then the prefix is a “period” of S. We 阅读全文
posted @ 2019-03-26 13:30 WAKBGAN 阅读(157) 评论(0) 推荐(0)
摘要:Problem Description 给出一个只由小写英文字符a,b,c...y,z组成的字符串S,求S中最长回文串的长度.回文就是正反读都是一样的字符串,如aba, abba等 Input 输入有多组case,不超过120组,每组输入为一行小写英文字符a,b,c...y,z组成的字符串S两组ca 阅读全文
posted @ 2019-03-17 19:30 WAKBGAN 阅读(154) 评论(0) 推荐(0)
摘要:Problem Description Give you n ( n < 10000) necklaces ,the length of necklace will not large than 100,tell meHow many kinds of necklaces total have.(i 阅读全文
posted @ 2019-03-12 14:47 WAKBGAN 阅读(205) 评论(0) 推荐(0)
摘要:Problem Description Give you a string with length N, you can generate N strings by left shifts. For example let consider the string “SKYLONG”, we can 阅读全文
posted @ 2019-03-12 14:31 WAKBGAN 阅读(167) 评论(0) 推荐(0)
摘要:Problem Description Beside other services, ACM helps companies to clearly state their “corporate identity”, which includes company logo but also other 阅读全文
posted @ 2019-03-10 12:46 WAKBGAN 阅读(236) 评论(0) 推荐(0)
摘要:Problem Description You are given a number of case-sensitive strings of alphabetic characters, find the largest string X, such that either X, or its i 阅读全文
posted @ 2019-03-09 20:44 WAKBGAN 阅读(146) 评论(0) 推荐(0)
摘要:Problem Description Clairewd is a member of FBI. After several years concealing in BUPT, she intercepted some important messages and she was preparing 阅读全文
posted @ 2019-03-09 17:27 WAKBGAN 阅读(374) 评论(0) 推荐(0)
摘要:Problem Description It is well known that AekdyCoin is good at string problems as well as number theory problems. When given a string s, we can write 阅读全文
posted @ 2019-03-09 14:43 WAKBGAN 阅读(140) 评论(0) 推荐(0)
摘要:Description The Genographic Project is a research partnership between IBM and The National Geographic Society that is analyzing DNA from hundreds of t 阅读全文
posted @ 2019-03-09 12:59 WAKBGAN 阅读(127) 评论(0) 推荐(0)
摘要:Description The little cat is so famous, that many couples tramp over hill and dale to Byteland, and asked the little cat to give names to their newly 阅读全文
posted @ 2019-03-08 16:31 WAKBGAN 阅读(132) 评论(0) 推荐(0)
摘要:Description Given two strings a and b we define a*b to be their concatenation. For example, if a = "abc" and b = "def" then a*b = "abcdef". If we thin 阅读全文
posted @ 2019-03-08 16:17 WAKBGAN 阅读(150) 评论(0) 推荐(0)
摘要:Problem Description Homer: Marge, I just figured out a way to discover some of the talents we weren’t aware we had.Marge: Yeah, what is it?Homer: Take 阅读全文
posted @ 2019-02-24 00:59 WAKBGAN 阅读(174) 评论(0) 推荐(0)