Solved SPOJ problems