摘要: Solution 线段树分治, 然后直接在线段树上dfs, 在进入/回溯的过程中维护并查集的merge/split. 对于split操作, 可以在merge时按秩合并, 然后利用栈记录, split时恢复即可. Code include include include include include 阅读全文
posted @ 2019-03-27 16:28 Ubospica 阅读(337) 评论(0) 推荐(0) 编辑