Files

Executable JAR
Source Code

Usage

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 each of the parameter arrays N, N elements of objectX, N elements of objectY and R (in order, each number in a separate line). After this, you should output the number of elements in your return M and M lines containing the elements of your return and flush standard out.

To do this, you should implement the following pseudocode:
    N = int(readLine())
    for (i=0; i<N; i++)
        objectX[i] = int(readLine())
    for (i=0; i<N; i++)
        objectY[i] = int(readLine())
    R = int(readLine())
    obstacles = placeObstacles(objectX, objectY, R)
    printLine(obstacles.length)
    for (i=0; i<obstacles.length; i++)
        printLine(obstacles[i])
    flush(stdout)
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 yous solution to standard error, and it will be forwarded to the standard out of the visualizer.