Solutions to problem in OnlineJudge.org