Solution to PKU online judge problems