Some optimization of the code in the post "ACM题目：信使"