上一页 1 ··· 38 39 40 41 42 43 44 45 46 ··· 65 下一页
摘要: 原题链接 题解 abcdefg等价于求 a000000+b00000+c0000+d000+e00+f0+g code #include<bits/stdc++.h> #define ll long long using namespace std; ll ten[14]={0}; ll f[14] 阅读全文
posted @ 2024-03-21 22:50 纯粹的 阅读(13) 评论(0) 推荐(0)
摘要: 原题链接 题解 选的点一定是凸包上的点? code #include<bits/stdc++.h> using namespace std; struct poi { double x,y; }node[50005]; int q[100005]; double cal(int a,int b,in 阅读全文
posted @ 2024-03-21 18:13 纯粹的 阅读(16) 评论(0) 推荐(0)
摘要: 原题链接 题解 code #include<bits/stdc++.h> #define ll long long using namespace std; const ll mod=1e9+7; ll tag[25]={0}; ll a[25]={0}; ll f(ll now) { ll sum 阅读全文
posted @ 2024-03-21 15:31 纯粹的 阅读(21) 评论(0) 推荐(0)
摘要: 原题链接 题解 拓扑排序,层级标记,如果层级等于n,代表层次分明 code #include<bits/stdc++.h> using namespace std; vector<int> G[500005]; int in[500005]={0}; struct node { int id,lay 阅读全文
posted @ 2024-03-21 13:54 纯粹的 阅读(24) 评论(0) 推荐(0)
摘要: 原题链接 题解 1.\(A<B\) \(\to\) 建立一条A向B的边 2.由于数据范围小,所以可以输入一次进行一次拓扑遍历 3.如果存在矛盾,说明存在环 4.对于拓扑排序进行层次标记,如果最大层等于n,代表每个字母层次分明,有先后次序 code #include<bits/stdc++.h> us 阅读全文
posted @ 2024-03-21 13:43 纯粹的 阅读(52) 评论(0) 推荐(0)
摘要: 原题链接 题解 想象一下,从左上角无限大的地方开始,第一个看到的一定是斜率最小的且截距最大的,慢慢往右下角滑,第一个碰到的直线一定是斜率比前一个小(不一定是第二小)的但是是它的斜率所属直线里截距最大的 重复上述步骤,最外面的直线一定长这样 图片来自luogu,linaonao 所以我们可以按斜率排序 阅读全文
posted @ 2024-03-20 21:24 纯粹的 阅读(28) 评论(0) 推荐(0)
摘要: 原题链接 题解 这么优质的文章我写什么题解 好难解释必然性感觉像模拟?? code #include<bits/stdc++.h> using namespace std; int q[100005]={0}; struct node { double x,y; }a[100005]; double 阅读全文
posted @ 2024-03-20 19:39 纯粹的 阅读(25) 评论(0) 推荐(0)
摘要: 原题链接 题解 1.将雷达建在海岸线上最优,覆盖的面积最大 2.根据光线可逆,雷达安装的位置覆盖多少小岛,等价于小岛被覆盖需要在哪个范围的位置上安装雷达 3.想象把雷达安装在最左边,然后慢慢往右移,这个时候雷达覆盖的小岛数量会越来越多,当右移到某个原本能覆盖的小岛覆盖不了时,在那个位置安装一个雷达 阅读全文
posted @ 2024-03-20 18:01 纯粹的 阅读(80) 评论(0) 推荐(0)
摘要: 原题链接 题解 叉积的运用,scanf控制输入格式 code #include<bits/stdc++.h> using namespace std; struct node { int x,y; }a[100005]; int x[200005],y[200005]; int main() { f 阅读全文
posted @ 2024-03-20 16:18 纯粹的 阅读(15) 评论(0) 推荐(0)
摘要: 原题链接 题解 由于本题数据范围小,所以考虑暴力 两点确定一条直线,所以我们先确定两个点AB,然后再遍历所有点C,如果向量AB叉乘AC等于0代表共线(没说从哪里起飞) code #include<bits/stdc++.h> #define ll long long using namespace 阅读全文
posted @ 2024-03-20 15:32 纯粹的 阅读(57) 评论(0) 推荐(0)
上一页 1 ··· 38 39 40 41 42 43 44 45 46 ··· 65 下一页