题解:https://blog.nowcoder.net/n/0c3b1eee747447398064e34c641bc9e6