my answers to SPOJ problems