Base solver class for Google Code Jam (and similar competitions).