This problem is used in private contest:一星-嵌套循环