All my SPOJ solutions.. :D