Solutions for some ZOJ problems.