Downloads

Runner.jar Runner.java
To run tests offline, you must modify your submission so that it reads input from standard in and writes output to standard out. If you want to output debugging information, you must use standard error, which will be forwarded to the console. You should first read N, C, and L (the length of the original sequence) each on one line. You should then read the L elements of the sequence on the next line. You should then output N*L whitespace delimited doubles, representing your return from the mark method. Next, you will read 100 sequences, each of which will be given as a length on one line, followed by the sequencec on the next line. After reading each sequence, you should output a single integer representing the sequence's identification. Be sure to flush standard out after writing. In pseudocode:
    N = nextInt()
    C = nextInt()
    L = nextInt()
    for(i = 0; i<L; i++)
        seq[i] = nextDouble()
    marked = mark(seq,N,C)
    for(i = 0; i<N*L; i++)
        println(marked[i])
    flush()
    for(i = 0; i<100; i++)
        K = nextInt()
        for(j = 0; j<K; j++)
            d[j] = nextDouble()
        id = identify(d)
        println(id)
        flush()
Once you've implemented and compiled the above, you may run the visualizer by doing:
java -Xmx256M -jar Runner.jar -exec <cmd> -seed <seed>
<cmd> is the command to run your executable (for Java users this will be something like "java MyClass", with the quotes) and <seed> is the seed for the random number generator (the examples have seeds 1-10).