In order to use the offline tester / visualizer tool for testing your solution locally, you'll have to modify your solution
by adding the main method that interacts with the tester / visualizer via reading data from standard input and
writing data to standard output. As long as you do not change the implementation of method improve, this
doesn't affect the way your solution works when submitted to our server.
To simulate a single test case, your program should first read the number of elements in maze H. After this it should read H elements of maze, one per line.
Finally, read the number of cells that can be fixed F. After the calculations are done, print the number of elements
in your return, followed by elements themselves, one per line.
Finally, flush standard out.
To do this, you should implement the following pseudocode:
H = int(readLine())
for (i=0; i < H; i++)
maze[i] = readLine()
F = int(readLine())
ret = improve(maze, F)
for (i=0; i < ret.size(); i++)
To run the tester with your solution, you should run:
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.
If your compiled solution is an executable file, the command
will be the full path to it, for example, "C:\TopCoder\solution.exe" or
"~/topcoder/solution". In case your compiled solution is to be run
with the help of an interpreter, for example, if you program in Java,
the command will be something like "java -cp C:\TopCoder Solution".
Additionally you can use the following options:
Finally, you can print any debug information of your solution to standard error,
and it will be forwarded to the standard out of the tester.
-vis to turn on visualization. Light-gray cells are ones visited by some of the paths; you can see all the paths found by mouse-clicking on the visualizer; each click shows next path, circle marks the beginning of the path.
-debug to turn on extra information: detailed reports on maze generated and paths found.
-size <sz> to change size of the cells for visualization (in pixels).
For more information on using visualizers, please check the following recipe draft
from TopCoder Cookbook (a Google Doc copy available here). Note that this is not a troubleshooting thread, please use the match forum for questions instead.