摘要:
倍增法求LCA 讲解见此:https://www.luogu.com.cn/blog/morslin/solution-p3379 P3379 #include<bits/stdc++.h> using namespace std; #define f(i, a, b) for(int i = (a 阅读全文
posted @ 2022-07-11 16:59
OIer某罗
阅读(84)
评论(0)
推荐(0)
摘要:
欧几里得距离:$\sqrt{(x_1-x_2)^2+(y_1-y_2)^2}$ 曼哈顿距离:$|x_1-x_2|+|y_1-y_2|$ 切比雪夫距离:$\max(|x_1-x_2|,|y_1-y_2|)$ 常见套路:将二维坐标系上 $(x,y) \rightarrow (x+y,x-y)$,原来任意 阅读全文
posted @ 2022-07-11 10:07
OIer某罗
阅读(230)
评论(0)
推荐(0)