[CF1538E] Funny Substrings (模拟)】的更多相关文章

题面 该场 Div. 3 最"难"的一道题:Funny Substrings O I D \tt OID OID 队长喜欢玩字符串,因为 " O n e I n D a r k " \tt "OneInDark" "OneInDark" 是一个望而生畏的字符串. O I D \tt OID OID 会进行 N \tt N N 次操作,每次操作形如以下两种之一: x := S : x 是变量名称,S 是一个具体的字符串,:= 符…
[题目链接]click here~~  [题目大意]:  You are given string s. Your task is to determine if the given string s contains two non-overlapping substrings "AB" and "BA" (the substrings can go in any order).  Input  The only line of input contains a…
题意:给定一个长度为n的串s,要求构造一个长度最小的使s出现了k次的串,可以重叠 n<=50,k<=50 思路:计算一下前后缀相同长度 #include<cstdio> #include<cstring> #include<string> #include<cmath> #include<iostream> #include<algorithm> #include<map> #include<set>…
http://poj.org/problem?id=3415 Common Substrings Time Limit: 5000MS   Memory Limit: 65536K Total Submissions: 5805   Accepted: 1911 Description A substring of a string T is defined as: T(i, k)=TiTi+1...Ti+k-1, 1≤i≤i+k-1≤|T|. Given two strings A, B an…
Advanced Fruits Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2052    Accepted Submission(s): 1053Special Judge Problem Description The company "21st Century Fruits" has specialized in cr…
D. Have You Ever Heard About the Word? time limit per test 6 seconds memory limit per test 256 megabytes input standard input output standard output A substring of a string is a contiguous subsequence of that string. So, string bca is substring of st…
HDU 5908 Abelian Period (BestCoder Round #88 模拟+暴力) 题目链接http://acm.hdu.edu.cn/showproblem.php?pid=5908 Description Let S be a number string, and occ(S,x) means the times that number x occurs in S. i.e. S=(1,2,2,1,3),occ(S,1)=2,occ(S,2)=2,occ(S,3)=1.…
A. Robot Sequence time limit per test:2 seconds memory limit per test:256 megabytes input:standard input output:standard output Calvin the robot lies in an infinite rectangular grid. Calvin's source code contains a list of n commands, each either 'U'…
传送门:http://codeforces.com/contest/1105/problem/B B. Zuhair and Strings time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Given a string ss of length nn and integer kk (1≤k≤n1≤k≤n). The string…
TIANKENG’s restaurant(Ⅱ) Time Limit: 16000/8000 MS (Java/Others)    Memory Limit: 130107/65536 K (Java/Others)Total Submission(s): 456    Accepted Submission(s): 149 Problem Description After improving the marketing strategy, TIANKENG has made a fort…