题解:https://blog.nowcoder.net/n/780bbee2028e4dfab77464006df1f794