E. Little Elephant and Strings time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output The Little Elephant loves strings very much. He has an array a from n strings, consisting of lowercase Englis…
You are given n strings ti. Each string has cost ci. Let's define the function of string , where ps, i is the number of occurrences of s in ti, |s| is the length of the string s. Find the maximal value of function f(s) over all strings. Note that the…
A musical melody is represented as a sequence of N (1<=N<=20000)notes that are integers in the range 1..88, each representing a key on the piano. It is unfortunate but true that this representation of melodies ignores the notion of musical timing; b…
C. Cyclical Quest time limit per test:3 seconds memory limit per test:512 megabytes input:standard input output: standard output Some days ago, WJMZBMR learned how to answer the query "how many times does a string x occur in a string s" quickly…
Reincarnation Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 131072/65536 K (Java/Others)Total Submission(s): 843 Accepted Submission(s): 283 Problem Description Now you are back,and have a task to do:Given you a string s consist of lower…