All submissions for this problem are available.
Brazilian supermodel 'Genesis Koboi' fell from the ramp during a fashion show and lost her memory. The only thing she remembers is her twitter handle and her password. The only way to regain her entire memory is for her to read all the tweets she ever wrote.
Every tweet consists of a maximum length of 140 characters. Now, given an input string of SPACE SEPARATED words of equal length, which MAY OR MAY NOT make sense, form a tweet which can contain the MAXIMUM number of SPACE SEPARATED words from the input string. A word CAN REPEAT in each tweet ANY NUMBER of times. Calculate the maximum number of tweets N that you can form using this principle and help Genesis regain her memory.
Each input string will consist of words i.e. ONLY alphabets.
The First line contains the number of test cases, T.
T test cases follow.
Each test case contains a single line which is the string of space separated words of equal length.
N, where N is (the maximum possible number of tweets) % 10^9+7
Input: 1 abcdefghijklm mlkjihgfedcba Output: 1024
|Time Limit:||0.37 sec|
|Source Limit:||50000 Bytes|
|Languages:||C, GO, PYP3|
Fetching successful submissions
If you are still having problems, see a sample solution here.