随笔分类 - 字符串
摘要:Musical Theme Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 38494 Accepted: 12654 Description A musical melody is represented as a sequen
阅读全文
摘要: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
阅读全文
摘要:题意:给你一个字符串 现在要你找出一个长度为k的字典序最小的子序列 且要求每个字母出现的个数要满足要求 思路:我们可以贪心构造每一位字符 优先放置字典序更小的字符 判断是否合法即可
阅读全文
摘要:#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...
阅读全文
摘要: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
阅读全文
摘要:Problem Description 当太阳的光辉逐渐被月亮遮蔽,世界失去了光明,大地迎来最黑暗的时刻。。。。在这样的时刻,人们却异常兴奋——我们能在有生之年看到500年一遇的世界奇观,那是多么幸福的事儿啊~~但网路上总有那么些网站,开始借着民众的好奇心,打着介绍日食的旗号,大肆传播病毒。小t不幸
阅读全文
摘要:Problem Description 吉哥又想出了一个新的完美队形游戏! 假设有n个人按顺序站在他的面前,他们的身高分别是h[1], h[2] ... h[n],吉哥希望从中挑出一些人,让这些人形成一个新的队形,新的队形若满足以下三点要求,则就是新的完美队形: 1、挑出的人保持原队形的相对顺序不变
阅读全文
摘要:Problem Description One day, sailormoon girls are so delighted that they intend to research about palindromic strings. Operation contains two steps:Fi
阅读全文
摘要: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
阅读全文
摘要:Problem Description 给出一个只由小写英文字符a,b,c...y,z组成的字符串S,求S中最长回文串的长度.回文就是正反读都是一样的字符串,如aba, abba等 Input 输入有多组case,不超过120组,每组输入为一行小写英文字符a,b,c...y,z组成的字符串S两组ca
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要:Problem Description Beside other services, ACM helps companies to clearly state their “corporate identity”, which includes company logo but also other
阅读全文
摘要: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
阅读全文
摘要:Problem Description Clairewd is a member of FBI. After several years concealing in BUPT, she intercepted some important messages and she was preparing
阅读全文
摘要: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
阅读全文
摘要:Description The Genographic Project is a research partnership between IBM and The National Geographic Society that is analyzing DNA from hundreds of t
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文

浙公网安备 33010602011771号