Assume that we have a poem whose length is
Input: In the first line you have n, which shows the number of beautiful words. Then, in the next line, you'll have Ci s. In the n following lines, you'll get n beautiful words.
Sample Input | Output |
---|---|
1 10 aa |
10.000000 |
4 2 3 4 5 abb bba aab baa |
3.500000 |
Note: Only around 16% of students could solve this problem 100% correctly for all of the test cases