both of your solutions were properly formatted. The problem was on our side - during the weekend we had some hardware-related problems with the evaluation system. This is our first competition on this platform which is under continous development... Please accept my apologies for this inconvenience.
If something similar happens in the future, please contact us via email: AAIA14Contest@mimuw.edu.pl. It will allow us for an earlier response to a problem.