摘要: #include <cstdio> #include <cmath> #include <vector> #include <cstring> #include <algorithm> #define point Vector #define ll long long #define setIO(s 阅读全文
posted @ 2022-01-19 00:47 guangheli 阅读(55) 评论(0) 推荐(0)
摘要: 计算几何基础 1. 判断点是否在线段上 叉积必为 0 保证在延长线上,点积不大于 0 保证不会在线段的两侧. int Onsegment(point tmp, point a, point b) { if(dcmp(cross(a - tmp, b - tmp)) == 0 && dcmp(dot( 阅读全文
posted @ 2022-01-19 00:45 guangheli 阅读(41) 评论(0) 推荐(0)