solutions for zoj problems