My SPOJ solutions