跳到内容
当前位置:首页>考研真题>【复习笔记09】带移动和删除的并查集

【复习笔记09】带移动和删除的并查集

  • 2026-09-23 01:56:01
【复习笔记09】带移动和删除的并查集

09 带移动和删除的并查集 ★★★☆☆

普通并查集只能把整个集合合并,无法把单个元素从集合中「删除」或「移动」到另一个集合——因为一个节点可能是别人的父亲,直接摘掉会破坏树结构。用「虚拟节点」技巧可以  完成删除和移动。

Tips:部分内容由 AI 生成,如发现问题请在评论区留言。

一、为什么不能直接删除/移动

普通并查集里,每个元素就是树中的一个节点,节点可能有孩子。若想「删除 x」,把 fa[x] 改成别的并不管用——x 的孩子们仍指向 x,根本无法把它单独摘出来,也无法干净地「移动」到别的集合。

二、核心技巧:虚拟节点

思路:给每个真实元素分配一个虚点,并查集只在虚点上操作,用 id[x] 记录元素 x 当前对应的虚点。

  • • 初始:id[x] = x,每个元素对应编号相同的虚点。
  • • 删除 x:给 x 换一个新虚点 id[x] = ++tot,x 变成孤立点;旧虚点仍留在原集合,不影响其它元素。
  • • 移动 x 到 y 的集合:先删除 x(换新虚点),再 union(id[x], id[y])

模板:

const int N = 100005;   // 真实元素个数const int Q = 100005;   // 最多删除/移动操作次数int fa[N + Q];          // 虚点并查集,容量 = 元素数 + 操作数int id[N];              // id[x]:元素 x 当前对应的虚点int tot;                // 已分配的最大虚点编号void init(int n){    tot = n;    for (int i = 1; i <= n; i++) id[i] = i;    for (int i = 1; i <= n + Q; i++) fa[i] = i;}int find(int x){ return fa[x] == x ? x : fa[x] = find(fa[x]); }void erase(int x){ id[x] = ++tot; }   // 删除:换新虚点(fa[tot] 已在 init 初始化为 tot)void move(int x, int y){              // 移动:删 + 并    erase(x);    fa[find(id[x])] = find(id[y]);}void merge(int x, int y){    int fx = find(id[x]), fy = find(id[y]);    if (fx != fy) fa[fx] = fy;}

每次删除/移动会新增一个虚点,所以 fa[] 要开到「元素数 + 操作数」那么大。旧虚点不能删掉也不能复用——它代表原集合里剩余的元素。

三、带删除:HDU 2473 Junk-Mail Filter (洛谷:SP5150)

题意:n 个元素(编号 0 ~ n-1),m 个操作:M x y 合并 x、y;S x 把 x 从当前集合中删除(孤立)。最后输出剩余的不同集合个数。

思路:删除就是给 x 换一个新虚点。最后把所有元素的 find(id[i]) 去重计数即可。

#include <cstdio>#include <set>using namespace std;const int N = 100005;int fa[2 * N], id[N];int find(int x){ return fa[x] == x ? x : fa[x] = find(fa[x]); }int main(){    int n, m, kase = 0;    while (~scanf("%d%d", &n, &m) && (n || m)) {        int tot = n;        for (int i = 0; i < n; i++) fa[i] = i, id[i] = i;        while (m--) {            char op; scanf(" %c", &op);            if (op == 'M') {                int x, y; scanf("%d%d", &x, &y);                int fx = find(id[x]), fy = find(id[y]);                if (fx != fy) fa[fx] = fy;            } else {                int x; scanf("%d", &x);                id[x] = ++tot;                fa[id[x]] = id[x];   // 新虚点自成一个集合            }        }        set<int> roots;        for (int i = 0; i < n; i++) roots.insert(find(id[i]));        printf("Case #%d: %d\n", ++kase, (int)roots.size());    }    return 0;}

四、带移动:UVA 11987 Almost Union-Find

题意:n 个元素(编号 1 ~ n,元素值 = 编号),m 个操作:

  • • 1 p q:合并 p、q 所在集合;
  • • 2 p q:把 p 移到 q 所在集合;
  • • 3 p:输出 p 所在集合的元素个数与元素值之和。

思路:移动时除了换虚点,还要维护每个集合根的 cnt(大小)和 sum(和):p 从旧集合扣除、并入新集合。

#include <cstdio>using namespace std;const int N = 100005;int fa[2 * N], cnt[2 * N];long long sum[2 * N];int id[N];int find(int x){ return fa[x] == x ? x : fa[x] = find(fa[x]); }int main(){    int n, m;    while (~scanf("%d%d", &n, &m)) {        int tot = n;        for (int i = 1; i <= n; i++) {            fa[i] = i; cnt[i] = 1; sum[i] = i;   // 元素值 = 编号            id[i] = i;        }        while (m--) {            int op; scanf("%d", &op);            if (op == 1) {                       // 合并 p、q                int p, q; scanf("%d%d", &p, &q);                int fp = find(id[p]), fq = find(id[q]);                if (fp != fq) { fa[fp] = fq; cnt[fq] += cnt[fp]; sum[fq] += sum[fp]; }            } else if (op == 2) {                // 移动 p 到 q 的集合                int p, q; scanf("%d%d", &p, &q);                int fp = find(id[p]), fq = find(id[q]);                if (fp != fq) {                    cnt[fp]--; sum[fp] -= p;     // p 从旧集合扣除                    id[p] = ++tot;               // 新虚点                    fa[id[p]] = id[p];                    cnt[id[p]] = 1; sum[id[p]] = p;                    fa[id[p]] = fq;              // 并入 q 的集合                    cnt[fq]++; sum[fq] += p;                }            } else {                             // 查询 p 所在集合                int p; scanf("%d", &p);                int fp = find(id[p]);                printf("%d %lld\n", cnt[fp], sum[fp]);            }        }    }    return 0;}

五、进阶 CF1725K Kingdom of Criticism

题意:维护长度为 n 的序列,q 次操作:

  • • 1 k w:把第 k 个数改成 w;
  • • 2 k:输出第 k 个数;
  • • 3 l r:把值落在  内的所有位置,改成  或 (靠近哪个改哪个, 为奇数保证唯一)。

思路:把「虚点」从"位置"推广到"值"——每个出现过的值建一个虚点,每个位置指向它当前值对应的虚点。单点修改就是给位置换一个新身份节点并指向新值;操作 3 用 map 按值找出  内的所有虚点,分别并入  的集合。

#include <bits/stdc++.h>using namespace std;const int N = 2500005;int fa[N], val[N];int find(int x){ return fa[x] == x ? x : fa[x] = find(fa[x]); }int main(){    ios::sync_with_stdio(false); cin.tie(nullptr);    int n; cin >> n;    vector<int> id(n + 1);    map<int,int> mp;                    // 值 -> 虚点    int tot = 0;    auto getNode = [&](int v) {         // 取/新建 值为 v 的虚点        auto it = mp.find(v);        if (it != mp.end()) return it->second;        int u = ++tot; fa[u] = u; val[u] = v;        mp[v] = u;        return u;    };    for (int i = 1; i <= n; i++) {        int x; cin >> x;        id[i] = ++tot; fa[id[i]] = getNode(x);    }    int q; cin >> q;    while (q--) {        int op; cin >> op;        if (op == 1) {            int k, w; cin >> k >> w;            id[k] = ++tot; fa[id[k]] = getNode(w);   // 换身份节点 = 移动        } else if (op == 2) {            int k; cin >> k;            cout << val[find(id[k])] << '\n';        } else {            int l, r; cin >> l >> r;            int m = (l + r) >> 1;            vector<int> roots;            for (auto it = mp.lower_bound(l); it != mp.end() && it->first <= r; )                roots.push_back(it->second), it = mp.erase(it);            for (int root : roots) {                int t = (val[root] <= m) ? (l - 1) : (r + 1);                int fr = find(root), ft = find(getNode(t));                if (fr != ft) fa[fr] = ft;            }        }    }    return 0;}

只是多了一步按值域批量合并,复杂度 

六、树上删除(离线倒序)P4092 [HEOI2016/TJOI2016] 树

题意:一棵以 1 为根的树,初始只有结点 1 有标记。两种操作:C x 给 x 打标记;Q x 询问 x 最近的有标记祖先(含 x 自己)。

思路:换个思路——离线倒序。正向"加标记"难处理,倒过来"加标记"就变成"取消标记",而并查集"删标记"很容易:把该点的 fa 从"指向自己"改回"指向父亲"。

并查集含义是"跳到最近的标记祖先":有标记的点 fa[x] = x,无标记的点 fa[x] = 父节点find(x) 一路压缩跳到最近的标记点。

#include <bits/stdc++.h>using namespace std;const int N = 100005;vector<int> g[N];int fa[N], f[N], cnt[N];int op[N], x[N];int find(int x){ return fa[x] == x ? x : fa[x] = find(fa[x]); }void dfs(int u, int p){    f[u] = p;    for (int v : g[u]) if (v != p) dfs(v, u);}int main(){    ios::sync_with_stdio(false); cin.tie(nullptr);    int n, q; cin >> n >> q;    for (int i = 1; i < n; i++) {        int u, v; cin >> u >> v;        g[u].push_back(v);        g[v].push_back(u);    }    dfs(1, 1);                          // 求每个点的直接父亲    for (int i = 1; i <= q; i++) {        char c; cin >> c >> x[i];        op[i] = (c == 'C');        if (op[i]) cnt[x[i]]++;         // 统计每个点被标记的次数    }    cnt[1] += 1;                        // 根节点初始就带一个标记    for (int i = 1; i <= n; i++)        fa[i] = (cnt[i] > 0) ? i : f[i]; // 有标记指向自己,无标记指向父亲    vector<int> ans;    for (int i = q; i >= 1; i--) {        if (op[i]) {                    // 倒序:C 变成取消标记            if (--cnt[x[i]] == 0) fa[x[i]] = f[x[i]];        } else {                        // Q:最近标记祖先            ans.push_back(find(x[i]));        }    }    reverse(ans.begin(), ans.end());    for (int v : ans) cout << v << '\n';    return 0;}

同类型的还有 P1197 星球大战;P3273 [SCOI2011] 棘手的操作 是"并查集 + 左偏树 + 单点删除"的进阶题。

七、总结

  • • 普通并查集无法单独删除/移动元素,用虚拟节点技巧解决。
  • • 每个元素通过 id[x] 映射到虚点,删除/移动就是给元素换一个新虚点,旧虚点留在原集合。
  • • 删除/移动 ,find/merge 复杂度同普通并查集。
  • • 数组要开「元素数 + 删除/移动次数」,旧虚点不可复用。
基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-09-23 05:32:41 HTTP/1.1 GET : http://www.sjds.net/a/515273.html
  2. 运行时间 : 0.073919s [ 吞吐率:13.53req/s ] 内存消耗:4,414.91kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=7689aff39218d33ad65f901ac54ae064
  1. /www/wwwroot/www.sjds.net/public/index.php ( 0.79 KB )
  2. /www/wwwroot/www.sjds.net/vendor/autoload.php ( 0.17 KB )
  3. /www/wwwroot/www.sjds.net/vendor/composer/autoload_real.php ( 2.49 KB )
  4. /www/wwwroot/www.sjds.net/vendor/composer/platform_check.php ( 0.90 KB )
  5. /www/wwwroot/www.sjds.net/vendor/composer/ClassLoader.php ( 14.03 KB )
  6. /www/wwwroot/www.sjds.net/vendor/composer/autoload_static.php ( 4.90 KB )
  7. /www/wwwroot/www.sjds.net/vendor/topthink/think-helper/src/helper.php ( 8.34 KB )
  8. /www/wwwroot/www.sjds.net/vendor/topthink/think-validate/src/helper.php ( 2.19 KB )
  9. /www/wwwroot/www.sjds.net/vendor/topthink/think-orm/src/helper.php ( 1.47 KB )
  10. /www/wwwroot/www.sjds.net/vendor/topthink/think-orm/stubs/load_stubs.php ( 0.16 KB )
  11. /www/wwwroot/www.sjds.net/vendor/topthink/framework/src/think/Exception.php ( 1.69 KB )
  12. /www/wwwroot/www.sjds.net/vendor/topthink/think-container/src/Facade.php ( 2.71 KB )
  13. /www/wwwroot/www.sjds.net/vendor/symfony/deprecation-contracts/function.php ( 0.99 KB )
  14. /www/wwwroot/www.sjds.net/vendor/symfony/polyfill-mbstring/bootstrap.php ( 8.26 KB )
  15. /www/wwwroot/www.sjds.net/vendor/symfony/polyfill-mbstring/bootstrap80.php ( 9.78 KB )
  16. /www/wwwroot/www.sjds.net/vendor/symfony/var-dumper/Resources/functions/dump.php ( 1.49 KB )
  17. /www/wwwroot/www.sjds.net/vendor/topthink/think-dumper/src/helper.php ( 0.18 KB )
  18. /www/wwwroot/www.sjds.net/vendor/symfony/var-dumper/VarDumper.php ( 4.30 KB )
  19. /www/wwwroot/www.sjds.net/vendor/topthink/framework/src/think/App.php ( 15.30 KB )
  20. /www/wwwroot/www.sjds.net/vendor/topthink/think-container/src/Container.php ( 15.76 KB )
  21. /www/wwwroot/www.sjds.net/vendor/psr/container/src/ContainerInterface.php ( 1.02 KB )
  22. /www/wwwroot/www.sjds.net/app/provider.php ( 0.19 KB )
  23. /www/wwwroot/www.sjds.net/vendor/topthink/framework/src/think/Http.php ( 6.04 KB )
  24. /www/wwwroot/www.sjds.net/vendor/topthink/think-helper/src/helper/Str.php ( 7.29 KB )
  25. /www/wwwroot/www.sjds.net/vendor/topthink/framework/src/think/Env.php ( 4.68 KB )
  26. /www/wwwroot/www.sjds.net/app/common.php ( 0.03 KB )
  27. /www/wwwroot/www.sjds.net/vendor/topthink/framework/src/helper.php ( 18.78 KB )
  28. /www/wwwroot/www.sjds.net/vendor/topthink/framework/src/think/Config.php ( 5.54 KB )
  29. /www/wwwroot/www.sjds.net/config/app.php ( 0.95 KB )
  30. /www/wwwroot/www.sjds.net/config/cache.php ( 0.78 KB )
  31. /www/wwwroot/www.sjds.net/config/console.php ( 0.23 KB )
  32. /www/wwwroot/www.sjds.net/config/cookie.php ( 0.56 KB )
  33. /www/wwwroot/www.sjds.net/config/database.php ( 2.48 KB )
  34. /www/wwwroot/www.sjds.net/vendor/topthink/framework/src/think/facade/Env.php ( 1.67 KB )
  35. /www/wwwroot/www.sjds.net/config/filesystem.php ( 0.61 KB )
  36. /www/wwwroot/www.sjds.net/config/lang.php ( 0.91 KB )
  37. /www/wwwroot/www.sjds.net/config/log.php ( 1.35 KB )
  38. /www/wwwroot/www.sjds.net/config/middleware.php ( 0.19 KB )
  39. /www/wwwroot/www.sjds.net/config/route.php ( 1.89 KB )
  40. /www/wwwroot/www.sjds.net/config/session.php ( 0.57 KB )
  41. /www/wwwroot/www.sjds.net/config/trace.php ( 0.34 KB )
  42. /www/wwwroot/www.sjds.net/config/view.php ( 0.82 KB )
  43. /www/wwwroot/www.sjds.net/app/event.php ( 0.25 KB )
  44. /www/wwwroot/www.sjds.net/vendor/topthink/framework/src/think/Event.php ( 7.67 KB )
  45. /www/wwwroot/www.sjds.net/app/service.php ( 0.13 KB )
  46. /www/wwwroot/www.sjds.net/app/AppService.php ( 0.26 KB )
  47. /www/wwwroot/www.sjds.net/vendor/topthink/framework/src/think/Service.php ( 1.64 KB )
  48. /www/wwwroot/www.sjds.net/vendor/topthink/framework/src/think/Lang.php ( 7.35 KB )
  49. /www/wwwroot/www.sjds.net/vendor/topthink/framework/src/lang/zh-cn.php ( 13.70 KB )
  50. /www/wwwroot/www.sjds.net/vendor/topthink/framework/src/think/initializer/Error.php ( 3.31 KB )
  51. /www/wwwroot/www.sjds.net/vendor/topthink/framework/src/think/initializer/RegisterService.php ( 1.33 KB )
  52. /www/wwwroot/www.sjds.net/vendor/services.php ( 0.14 KB )
  53. /www/wwwroot/www.sjds.net/vendor/topthink/framework/src/think/service/PaginatorService.php ( 1.52 KB )
  54. /www/wwwroot/www.sjds.net/vendor/topthink/framework/src/think/service/ValidateService.php ( 0.99 KB )
  55. /www/wwwroot/www.sjds.net/vendor/topthink/framework/src/think/service/ModelService.php ( 2.04 KB )
  56. /www/wwwroot/www.sjds.net/vendor/topthink/think-trace/src/Service.php ( 0.77 KB )
  57. /www/wwwroot/www.sjds.net/vendor/topthink/framework/src/think/Middleware.php ( 6.72 KB )
  58. /www/wwwroot/www.sjds.net/vendor/topthink/framework/src/think/initializer/BootService.php ( 0.77 KB )
  59. /www/wwwroot/www.sjds.net/vendor/topthink/think-orm/src/Paginator.php ( 11.86 KB )
  60. /www/wwwroot/www.sjds.net/vendor/topthink/think-validate/src/Validate.php ( 63.20 KB )
  61. /www/wwwroot/www.sjds.net/vendor/topthink/think-orm/src/Model.php ( 23.55 KB )
  62. /www/wwwroot/www.sjds.net/vendor/topthink/think-orm/src/model/concern/Attribute.php ( 21.05 KB )
  63. /www/wwwroot/www.sjds.net/vendor/topthink/think-orm/src/model/concern/AutoWriteData.php ( 4.21 KB )
  64. /www/wwwroot/www.sjds.net/vendor/topthink/think-orm/src/model/concern/Conversion.php ( 6.44 KB )
  65. /www/wwwroot/www.sjds.net/vendor/topthink/think-orm/src/model/concern/DbConnect.php ( 5.16 KB )
  66. /www/wwwroot/www.sjds.net/vendor/topthink/think-orm/src/model/concern/ModelEvent.php ( 2.33 KB )
  67. /www/wwwroot/www.sjds.net/vendor/topthink/think-orm/src/model/concern/RelationShip.php ( 28.29 KB )
  68. /www/wwwroot/www.sjds.net/vendor/topthink/think-helper/src/contract/Arrayable.php ( 0.09 KB )
  69. /www/wwwroot/www.sjds.net/vendor/topthink/think-helper/src/contract/Jsonable.php ( 0.13 KB )
  70. /www/wwwroot/www.sjds.net/vendor/topthink/think-orm/src/model/contract/Modelable.php ( 0.09 KB )
  71. /www/wwwroot/www.sjds.net/vendor/topthink/framework/src/think/Db.php ( 2.88 KB )
  72. /www/wwwroot/www.sjds.net/vendor/topthink/think-orm/src/DbManager.php ( 8.52 KB )
  73. /www/wwwroot/www.sjds.net/vendor/topthink/framework/src/think/Log.php ( 6.28 KB )
  74. /www/wwwroot/www.sjds.net/vendor/topthink/framework/src/think/Manager.php ( 3.92 KB )
  75. /www/wwwroot/www.sjds.net/vendor/psr/log/src/LoggerTrait.php ( 2.69 KB )
  76. /www/wwwroot/www.sjds.net/vendor/psr/log/src/LoggerInterface.php ( 2.71 KB )
  77. /www/wwwroot/www.sjds.net/vendor/topthink/framework/src/think/Cache.php ( 4.92 KB )
  78. /www/wwwroot/www.sjds.net/vendor/psr/simple-cache/src/CacheInterface.php ( 4.71 KB )
  79. /www/wwwroot/www.sjds.net/vendor/topthink/think-helper/src/helper/Arr.php ( 16.63 KB )
  80. /www/wwwroot/www.sjds.net/vendor/topthink/framework/src/think/cache/driver/File.php ( 7.84 KB )
  81. /www/wwwroot/www.sjds.net/vendor/topthink/framework/src/think/cache/Driver.php ( 9.03 KB )
  82. /www/wwwroot/www.sjds.net/vendor/topthink/framework/src/think/contract/CacheHandlerInterface.php ( 1.99 KB )
  83. /www/wwwroot/www.sjds.net/app/Request.php ( 0.09 KB )
  84. /www/wwwroot/www.sjds.net/vendor/topthink/framework/src/think/Request.php ( 55.78 KB )
  85. /www/wwwroot/www.sjds.net/app/middleware.php ( 0.25 KB )
  86. /www/wwwroot/www.sjds.net/vendor/topthink/framework/src/think/Pipeline.php ( 2.61 KB )
  87. /www/wwwroot/www.sjds.net/vendor/topthink/think-trace/src/TraceDebug.php ( 3.40 KB )
  88. /www/wwwroot/www.sjds.net/vendor/topthink/framework/src/think/middleware/SessionInit.php ( 1.94 KB )
  89. /www/wwwroot/www.sjds.net/vendor/topthink/framework/src/think/Session.php ( 1.80 KB )
  90. /www/wwwroot/www.sjds.net/vendor/topthink/framework/src/think/session/driver/File.php ( 6.27 KB )
  91. /www/wwwroot/www.sjds.net/vendor/topthink/framework/src/think/contract/SessionHandlerInterface.php ( 0.87 KB )
  92. /www/wwwroot/www.sjds.net/vendor/topthink/framework/src/think/session/Store.php ( 7.12 KB )
  93. /www/wwwroot/www.sjds.net/vendor/topthink/framework/src/think/Route.php ( 23.73 KB )
  94. /www/wwwroot/www.sjds.net/vendor/topthink/framework/src/think/route/RuleName.php ( 5.75 KB )
  95. /www/wwwroot/www.sjds.net/vendor/topthink/framework/src/think/route/Domain.php ( 2.53 KB )
  96. /www/wwwroot/www.sjds.net/vendor/topthink/framework/src/think/route/RuleGroup.php ( 22.43 KB )
  97. /www/wwwroot/www.sjds.net/vendor/topthink/framework/src/think/route/Rule.php ( 26.95 KB )
  98. /www/wwwroot/www.sjds.net/vendor/topthink/framework/src/think/route/RuleItem.php ( 9.78 KB )
  99. /www/wwwroot/www.sjds.net/route/app.php ( 1.72 KB )
  100. /www/wwwroot/www.sjds.net/vendor/topthink/framework/src/think/facade/Route.php ( 4.70 KB )
  101. /www/wwwroot/www.sjds.net/vendor/topthink/framework/src/think/route/dispatch/Controller.php ( 4.74 KB )
  102. /www/wwwroot/www.sjds.net/vendor/topthink/framework/src/think/route/Dispatch.php ( 10.44 KB )
  103. /www/wwwroot/www.sjds.net/app/controller/Index.php ( 4.81 KB )
  104. /www/wwwroot/www.sjds.net/app/BaseController.php ( 2.05 KB )
  105. /www/wwwroot/www.sjds.net/vendor/topthink/think-orm/src/facade/Db.php ( 0.93 KB )
  106. /www/wwwroot/www.sjds.net/vendor/topthink/think-orm/src/db/connector/Mysql.php ( 5.44 KB )
  107. /www/wwwroot/www.sjds.net/vendor/topthink/think-orm/src/db/PDOConnection.php ( 52.47 KB )
  108. /www/wwwroot/www.sjds.net/vendor/topthink/think-orm/src/db/Connection.php ( 8.39 KB )
  109. /www/wwwroot/www.sjds.net/vendor/topthink/think-orm/src/db/ConnectionInterface.php ( 4.57 KB )
  110. /www/wwwroot/www.sjds.net/vendor/topthink/think-orm/src/db/builder/Mysql.php ( 16.58 KB )
  111. /www/wwwroot/www.sjds.net/vendor/topthink/think-orm/src/db/Builder.php ( 24.06 KB )
  112. /www/wwwroot/www.sjds.net/vendor/topthink/think-orm/src/db/BaseBuilder.php ( 27.50 KB )
  113. /www/wwwroot/www.sjds.net/vendor/topthink/think-orm/src/db/Query.php ( 15.71 KB )
  114. /www/wwwroot/www.sjds.net/vendor/topthink/think-orm/src/db/BaseQuery.php ( 45.13 KB )
  115. /www/wwwroot/www.sjds.net/vendor/topthink/think-orm/src/db/concern/TimeFieldQuery.php ( 7.43 KB )
  116. /www/wwwroot/www.sjds.net/vendor/topthink/think-orm/src/db/concern/AggregateQuery.php ( 3.26 KB )
  117. /www/wwwroot/www.sjds.net/vendor/topthink/think-orm/src/db/concern/ModelRelationQuery.php ( 20.07 KB )
  118. /www/wwwroot/www.sjds.net/vendor/topthink/think-orm/src/db/concern/ParamsBind.php ( 3.66 KB )
  119. /www/wwwroot/www.sjds.net/vendor/topthink/think-orm/src/db/concern/ResultOperation.php ( 7.01 KB )
  120. /www/wwwroot/www.sjds.net/vendor/topthink/think-orm/src/db/concern/WhereQuery.php ( 19.37 KB )
  121. /www/wwwroot/www.sjds.net/vendor/topthink/think-orm/src/db/concern/JoinAndViewQuery.php ( 7.11 KB )
  122. /www/wwwroot/www.sjds.net/vendor/topthink/think-orm/src/db/concern/TableFieldInfo.php ( 2.63 KB )
  123. /www/wwwroot/www.sjds.net/vendor/topthink/think-orm/src/db/concern/Transaction.php ( 2.77 KB )
  124. /www/wwwroot/www.sjds.net/vendor/topthink/framework/src/think/log/driver/File.php ( 5.96 KB )
  125. /www/wwwroot/www.sjds.net/vendor/topthink/framework/src/think/contract/LogHandlerInterface.php ( 0.86 KB )
  126. /www/wwwroot/www.sjds.net/vendor/topthink/framework/src/think/log/Channel.php ( 3.89 KB )
  127. /www/wwwroot/www.sjds.net/vendor/topthink/framework/src/think/event/LogRecord.php ( 1.02 KB )
  128. /www/wwwroot/www.sjds.net/vendor/topthink/think-helper/src/Collection.php ( 16.47 KB )
  129. /www/wwwroot/www.sjds.net/vendor/topthink/framework/src/think/facade/View.php ( 1.70 KB )
  130. /www/wwwroot/www.sjds.net/vendor/topthink/framework/src/think/View.php ( 4.39 KB )
  131. /www/wwwroot/www.sjds.net/vendor/topthink/framework/src/think/Response.php ( 8.81 KB )
  132. /www/wwwroot/www.sjds.net/vendor/topthink/framework/src/think/response/View.php ( 3.29 KB )
  133. /www/wwwroot/www.sjds.net/vendor/topthink/framework/src/think/Cookie.php ( 6.06 KB )
  134. /www/wwwroot/www.sjds.net/vendor/topthink/think-view/src/Think.php ( 8.38 KB )
  135. /www/wwwroot/www.sjds.net/vendor/topthink/framework/src/think/contract/TemplateHandlerInterface.php ( 1.60 KB )
  136. /www/wwwroot/www.sjds.net/vendor/topthink/think-template/src/Template.php ( 46.61 KB )
  137. /www/wwwroot/www.sjds.net/vendor/topthink/think-template/src/template/driver/File.php ( 2.41 KB )
  138. /www/wwwroot/www.sjds.net/vendor/topthink/think-template/src/template/contract/DriverInterface.php ( 0.86 KB )
  139. /www/wwwroot/www.sjds.net/runtime/temp/022a5b1eae5a9e3c31e54f699d8ae600.php ( 8.05 KB )
  140. /www/wwwroot/www.sjds.net/vendor/topthink/think-trace/src/Html.php ( 4.42 KB )
  1. CONNECT:[ UseTime:0.000714s ] mysql:host=172.18.0.4;port=3306;dbname=www_sjds;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.001222s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.000397s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000380s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.000522s ]
  6. SELECT * FROM `set` [ RunTime:0.000311s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.000707s ]
  8. SELECT * FROM `article` WHERE `id` = 515273 LIMIT 1 [ RunTime:0.000481s ]
  9. UPDATE `article` SET `lasttime` = 1790112761 WHERE `id` = 515273 [ RunTime:0.002425s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 65 LIMIT 1 [ RunTime:0.000354s ]
  11. SELECT * FROM `article` WHERE `id` < 515273 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.000453s ]
  12. SELECT * FROM `article` WHERE `id` > 515273 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.000393s ]
  13. SELECT * FROM `article` WHERE `id` < 515273 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.000752s ]
  14. SELECT * FROM `article` WHERE `id` < 515273 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.000609s ]
  15. SELECT * FROM `article` WHERE `id` < 515273 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.000735s ]
0.082583s