This problem is used in private contest:寒假下午班
C++挑战赛4
C++挑战赛6