Downloads


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 ROI_Finder this doesn't affect the way your solution works when being submitted to our server.

To simulate a single test case, your program should implement the following protocol (each integer is to be read from / printed in a separate line):

In other words, you should implement the following pseudocode in the main method of your solution:

    N = parseInt(readLine())    
    for (i=0; i < N; i++)
        imageData[i] = readInt()
    Rows = parseInt(readLine())    
    Columns = parseInt(readLine())    
    
    results = ROI_Finder(imageData, Rows, Columns);
    printLine(length(results))
    flush(stdout)      

    for (i=0;i < length(results); i++)
        printLine(results[i])
    flush(stdout)      

The tester can be run as follows.

java -jar tester.jar -folder <folder> -test <testcase file> -gtf <ground truth file> -exec <exec command> -vis <output image> -seed <test number>

<command> is the command you would use to execute your solution. If your compiled solution is an executable file, the command will just be the full path to it, for example, "C:\TopCoder\solution.exe" or "~/topcoder/solution".

Additionally you can use the following parameters:

 

Final notes

You can print any debug information of your solution to the standard error stream and it will be forwarded to the standard output of the tester.

For more information on using visualizers, please check the following recipe draft from TopCoder Cookbook. Note that this is not a troubleshooting thread, please use the match forum for questions instead.