Compilation:  PASSED
Style:        PASSED
Findbugs:     No potential bugs found.
API:          PASSED

Correctness:  13/36 tests passed
Memory:       1/1 tests passed
Timing:       17/17 tests passed

Raw score: 58.47% [Correctness: 65%, Memory: 10%, Timing: 25%, Style: 0%]

Didn't completely get how it should be done. Will need to revise it when I've got more time. It was a tough one..