Subtitle: https://www.luogu.org/problemnew/show/P2634#sub
Solution: https://www.zybuluo.com/wsndy-xx/note/1141506