谢楼主分享,学到很多,下次也来牛客搬原题!
b:https://blog.csdn.net/pall_scall/article/details/97969403 f:https://ac.nowcoder.com/acm/problem/23058