https://www.luogu.com.cn/discuss/720590
另外 O(m2)O(m^2)O(m2) 做法的题解:
https://www.luogu.com.cn/paste/50wqj1ts