第一篇题解 https://www.luogu.com.cn/blog/yr300506/solution-p9040
抄袭了 https://www.cnblogs.com/Kobe303/p/16782573.html