Visualizer.jar
ReliefMapVis.java
To use the visualizer for testing your solution locally, you'll have to adopt your solution to read 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 rows in the map H and H elements of contourMap, one string per line. To imitate one call of Relief.measure, you should output '?' character (quotes for clarity only), x and y values of the call, each in a new line, and flush standard out. After each such triple written to output, you should read one line representing the return of the function call. Finally, you should output any non-'?' character (in a separate line) and W*H lines containing the elements of your return and flush standard out.

To do this, you should implement the following pseudocode:
    double measure(x, y)
    {   printLine('?')
        printLine(x)
        printLine(y)
        flush(stdout)
        return double(readLine())
    }
    main
    {   H = int(readLine())
        for (i=0; i<H; i++)
            contourMap[i] = readLine()
        ret = getMap(contourMap)
        printLine('!')
        for (i=0; i<W*H; i++)
            printLine(ret[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 "-vis <name>" option to generate a file <name>.png which shows the elevation map of the area with the contour map drawn on top of it. Blue marks the lowest parts of the area, while red marks the highest.
Another visualization option is "-diff <name>" to generate a file <name>.png which shows the differences of your return and the correct elevation map. Negative errors are marked with blue, positive - with red, darker colors correspond to smaller absolute values. A parameter -diffscale controls the point at which color clipping begins to occur in the diff image.
If you set <name> to "-" (quotes for clarity only) for either -vis or -diff, the image will be displayed in a window instead of written to the file.