Medium Accuracy: 18.89% Submissions: 4065 Points: 4
Given an array of size N, which denotes the number of characters in one word. The task is simple, count the number of words in a single line with space character between two words.
First line contains the number of test cases T. First line of every test case consists of N, denoting number of elements in array. Second line consists of elements in array. Third line consists of characters allowed per line.
Single line output,print 2*L spaced integers (where L is the number of lines required to adjust the words with given limit of character per line), denoting from which word to word in every line.(for more clearance of output, look the output in example).