Downloads:
To use the offline tester for testing your solution locally, you'll have to adopt your solution to read the parameters from standard in and write the output to standard out. This doesn't affect the functioning of the solution you submit to our server.

Your program should first read the size of the board N, followed by the number of words W and W elements of words. Finally, exactly 4 elements of weights should be read. Each variables is printed in a separate line. After reading these variables output your return from generateCrossword. Remember to flush standard output after writing to it.

To do this, you should implement the following pseudocode:
    N = int(readLine())
    W = int(readLine())
    for (i=0; i<W; i++)
        words[i] = readLine()
    for (i=0; i<4; i++)
        weights[i] = int(readLine())
    ret = generateCrossword(N, words, weights)
    for (i=0; i<N; i++)
        printLine(ret[i])
    flush(stdout)
To run the offline tester with your solution, you should execute:
java -jar Tester.jar -exec "<command>" -seed <seed>
Here, <command> is the command to execute your program, and <seed> is seed for test case generation.

Please note that the tester reads the dictionary from the file "words.txt". Therefore, in order for the tester to work properly, please make sure to put the appropriate dictionary into "words.txt" file located in the directory from which you run the tester. You can download the dictionary that we will use to test your solution here. You can also put some custom dictionary into "words.txt" (for example, for debugging purposes).

Finally, you can print any debug information of your solution to standard error, and it will be forwarded to the standard out of the visualizer.

For more information on using the offline tester, see the following thread (it is devoted to visualizers, but there's almost no difference from usage point of view). Note that this is not a troubleshooting thread; please use the match forum for questions.