Programs in java related to Google code jam contest