Files

MegaParty.jar
MegaParty.java

Usage

To use the visualizer, you'll have to adopt your solution to read parameters from standard in and write the output to standard out. Your program should read the number of elements in A m, m elements of A, the number of elements in B N, N elements of B, e1 and e2 (in order, each number in a separate line). After this, you should output 2*N lines containing the elements of your return and flush standard out. To do this, you should implement the following pseudocode:
    m = int(readLine())
    for (i=0; i<m; i++)
        A[i] = int(readLine())
    N = int(readLine())
    for (i=0; i<N; i++)
        B[i] = int(readLine())
    e1 = double(readLine())
    e2 = double(readLine())
    coords = arrangement(A, B, e1, e2)
    for (i=0; i<2*N; i++)
        printLine(coords[i])
    flush(stdout)
To run the visualizer with your solution, you should run:
java -jar MegaParty.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:

-vis <name> to generate a file <name>.png which shows the resulting arrangement of the points on the plane (for valid arrangements only). If you set <name> to "-" (quotes for clarity only), the image will be displayed in a window instead of being written to the file. Points with positive values of hi*bi are shown in green, with negative - in red, with zero - in black, brighter colors correspond to larger absolute values of hi*bi.

-edges to draw the lines denoting "friends" and "enemies" relationships which affected the score.

-pointsize <size> to set the size of the dots (default value is 2).