Some of my SPOJ solutions.