|시간 제한||메모리 제한||제출||정답||맞은 사람||정답 비율|
|1 초||128 MB||13||3||3||23.077%|
In the game of Scrabble you are given a number of tiles with letters on them. The challenge is to create a word using some (or all) of these tiles. Write a program which, with the help of a dictionary, determines the longest word you can make with the given letters. Those of you who know this game may note that we ignore the board upon which the letters are placed, as well as the value of the letters.
The input file consists of:
The words in the dictionary are given in alphabetical order.
Per test case:
6 algorithm balloon bapc code submit utrecht 5 abcdeop abcdeoq chuttep chutter iamhotgirl
bapc code IMPOSSIBLE utrecht algorithm