my codes is here:https://ac.nowcoder.com/acm/contest/992/H
范巨巨是这样做滴:https://ac.nowcoder.com/acm/contest/view-submission?submissionId=40846348&returnHomeType=1&uid=2505093
截图如下: