exercise of google code jam