To use the visualizer 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 number of elements in grid R,
followed by R strings representing elements of grid
(in order, each string in a separate line).
After this, read a string rules and integers N and K.
Finally, output the elements of your return from configure,
each string in a separate line.
Remember to flush standard output after writing to it.
To do this, you should implement the following pseudocode:
R = int(readLine())
for (i=0; i<R; i++)
grid[i] = readLine()
rules = readLine()
N = int(readLine())
K = int(readLine())
String res = configure(grid, rules, N, K)
for (i=0; i<R; i++)
To run the visualizer with your solution, you should run:
java -jar Visualizer.jar -exec "<command>" -seed <seed>
Here, <command> is the command to execute your program,
and <seed> is seed for test case generation.
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 visualizer.
-novis to turn off the visualization (by default it is turned on).
-manual to configure the game yourself. Click on the cell to change its state.
The counter in top right corner shows the number of changed cells
and becomes red if it exceeds N.
To finish configuring the grid, click outside of the grid.
During simulation of iterations the counter shows number of live cells.
Use both -manual and -exec options to run your solution and adjust its results manually.
-delay <ms> to set the delay between visualizing iterations, in milliseconds.
-size <S> to set the size of grid cell to S pixels.
-R/-C/-K/-N <value> to set the value of corresponding parameter.
-rules <value> to set the rules to new value.
For more information on using visualizer see http://forums.topcoder.com/?module=Thread&threadID=670892&start=0.