Ran both your inputs and get exactly the same results, also can't figure out where's the error. Apparently there's some edge case when you should use different strategy than splitting it in 2 equal piles.
Re:Google Code Jam 2015 has begun
by imaginenore on Saturday April 11, 2015 @11:09AM
(#9359594)
Finally solved it. Apparently splitting in half isn't always the optimal step, sometimes you have to move a different amount.
Example:
9 3 3
6 3 3 3
3 3 3 3 3
2 2 2 2 2
1 1 1 1 1
EDIT:
I just tried again without a blank line at the end, and still got INCORRECT.
Second attempt data:
Input: http://paste.ofcode.org/jCNBZw6vPJT7ryZA4GUziM
My incorrect output: http://paste.ofcode.org/eNx74e35rqF54Uvm5bRa8K