摘要: 【LCA】最近公共祖先 LCA(x,y) 模版代码 模版题 https://www.luogu.com.cn/problem/P3379 树上倍增 基础封装:针对无权图 把空间开到全局 struct Tree { int n; vector<vector<int>> ver, val; vector 阅读全文
posted @ 2025-08-15 15:04 White_ink 阅读(7) 评论(0) 推荐(0)
摘要: 【C++魅力时刻】 记录一些因为语法问题不报RECE导致的WA 边界问题 本题n,m,a[i][j]范围 <=500 注意multiset特判if(son>min(n,m)) continue;否则count计数会比较奇怪 const int N=500; int n,m; multiset<int 阅读全文
posted @ 2025-08-15 11:24 White_ink 阅读(6) 评论(0) 推荐(0)