Three new solutions to SPOJ problems