随笔分类 - 数据结构 - K-D树
摘要:题目:https://www.lydsy.com/JudgeOnline/problem.php?id=4066 https://www.lydsy.com/JudgeOnline/problem.php?id=2683 高仿:https://www.cnblogs.com/Narh/p/96055
阅读全文
摘要:题目:https://www.lydsy.com/JudgeOnline/problem.php?id=2850 只要暴力判断是否全选一个子树或全不选,如果都不是就进入查询; 要注意值有负,所以不是直接看 min 和 max 的组合,而是各种都试一遍; pushup 时不要把 sum 累加写在循环里
阅读全文
摘要:题目:https://www.lydsy.com/JudgeOnline/problem.php?id=2716 果然和 bzoj 2648 是一样的吧; 只是数组要迷之开大,3e5+5 会RE? 代码如下: #include<cstdio> #include<cstring> #include<a
阅读全文
摘要:题目:https://www.lydsy.com/JudgeOnline/problem.php?id=1941 曼哈顿最小距离估价:max( 0, t[x].mn[i] - v.p[i] ) + max( 0, v.p[i] - t[x].mx[i] ),可理解为到边界; 曼哈顿最大距离估价:ma
阅读全文
摘要:题目:https://www.lydsy.com/JudgeOnline/problem.php?id=2648 学习资料:https://blog.csdn.net/zhl30041839/article/details/9277807 https://www.cnblogs.com/galaxi
阅读全文

浙公网安备 33010602011771号