题目链接:https://www.luogu.org/problemnew/show/P1553
转:https://www.cnblogs.com/LITTLESUNwl/p/10420557.html