版本比较
【数据结构-可持久化】可持久化 0-1 Trie
正文
增加 3 行删除 3 行
189 行未改动全部展开19019119219319419419519619719719819920020113 行未改动21521621721821921922022122222331 行未改动189 行未改动全部展开 } }}
int query1(int root,int w){ int query1(int root,int w){ return trie.query(trie.Root[dfn[root] - 1],trie.Root[dfn[root] + siz[root] - 1],w);}int query2(int u,int v,int w){ int query2(int u,int v,int w){ int l,r,ret = 0; while(top[u] != top[v]){ if(dep[top[u]] < dep[top[v]]) swap(u,v);13 行未改动signed main(){ ios::sync_with_stdio(false); cin.tie(0);cout.tie(0); cin >> n >> m; root = 1; root = 1; for(int i = 1;i <= n;i++) cin >> a[i]; for(int i = 1;i < n;i++){ int u,v;31 行未改动