Girl falls in love with boy going to exams. She writes 1/2 poem and gives it to him. He writes half. He takes his civil service exams and is so good he meets the emperor. The emperor quizzes him and the girl's poem is the answer. He's made an adviser, then returns to marry her; their poem is "double happiness".