Downloads
Helpful information
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 getPath, this
doesn't affect the way your solution works when submitted to our server.
Here are example solutions for C++ and Java, modified to be executed with visualizer. They implement the same approach: a hardcoded solution which completes the task for seed 1.
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:
-
-manual : Turn on manual play mode. Use Left, Right, Up and Down keys to navigate the maze, and Escape to stop the simulation. Tiles which are your next goal are marked with red letters; the holes are dark grey squares without letters; the tiles which are less than or equal to your last visited goal number (and thus can not be destroyed) have light grey background; your current position is marked with a blue frame.
-
-novis : Turn off visualization.
-
-size <SZ> : Sets size of a tile for visualization. By default it is set to 0, which automatically fits the visualizer to screen size.
-
-debug : Print debug information during test run.
-
-delay <delay> : Sets the delay (in milliseconds) between visualizing consecutive steps of the path. The default value is 100.
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.