题目链接:https://ac.nowcoder.com/acm/contest/21592/H
博客链接:https://blog.csdn.net/qq_51354600/article/details/120940918