随笔分类 - 计算几何—叉积
摘要:题意 "题目链接" Sol 讲一下我的乱搞做法。。。。 首先我们可以按极角排序。然后对$y$轴上方/下方的加起来分别求模长取个最大值。。 这样一次是$O(n)$的。 我们可以对所有向量每次随机化旋转一下,然后执行上面的过程。数据好像很水然后就艹过去了。。。 cpp include define LL
阅读全文
摘要:题意 "题目链接" 给定n条线段,确定是否存在一条直线,使得这n条线段在这条直线上的投影具有公共点。 n include include using namespace std; const int MAXN = 1001; const double eps = 1e 10; int N; stru
阅读全文
摘要:题意 世上最良心题目描述qwq 平面上有N个点. 求出所有以这N个点为顶点的三角形的面积和 N<=3000 Sol 直接模拟是$n^3$的。 考虑先枚举一个$i$,那么我们要算的就是$\sum_{j = 1}^n \sum_{k = j + 1}^n |Cross((a_j, b_j), (a_k,
阅读全文
摘要:Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 5920 Accepted: 3545 Description Mom and dad have a problem: their child, Reza, never puts h
阅读全文
摘要:TOYS Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 16042 Accepted: 7688 Description Calculate the number of toys that land in each bin of
阅读全文