摘要:
原题链接 题解 在日期上设计 无后效性 但是 \(1e9\) 发现真空点去掉对答案也没有影响,故对所有线段的端点离散化处理,然后再做无后效性处理 code #include<bits/stdc++.h> #define ll long long using namespace std; const 阅读全文
posted @ 2024-07-28 15:41
纯粹的
阅读(34)
评论(0)
推荐(0)
摘要:
原题链接 题解 很巧妙的一道题 对于任意给定的的 \(nm\) 矩阵,有且仅有一种构造方法使得 \((n+1)(m+1)\) 矩阵为合法 阅读全文
posted @ 2024-07-28 14:52
纯粹的
阅读(12)
评论(0)
推荐(0)
摘要:
原题链接 题解 看到“最大值”“曼哈顿距离”,我们不禁想到转换成切比雪夫距离之后求最大值 code #include<bits/stdc++.h> #define ll long long using namespace std; const ll inf=1e8; struct node { ll 阅读全文
posted @ 2024-07-28 14:31
纯粹的
阅读(27)
评论(0)
推荐(0)
摘要:
原题链接 题解 对于点 \((a_1,b_1),(a_2,b_2)\) 的切比雪夫距离,可以看做成点 \((\frac{a_1+b_1}{2},\frac{a_1-b_1}{2}),(\frac{a_2+b_2}{2},\frac{a_2-b_2}{2})\) 的曼哈顿距离 不信你分类讨论看看 某一 阅读全文
posted @ 2024-07-28 14:07
纯粹的
阅读(27)
评论(0)
推荐(0)
摘要:
原题链接 题解 暴力:二进制表示所有状态 为了减少重复运算:设计一个数组,代表 \(x\) 为某值的时候最小的 \(y\) 但是还需要知道吃了多少个:再加一层状态不就好了 code #include<bits/stdc++.h> #define ll long long using namespac 阅读全文
posted @ 2024-07-28 12:29
纯粹的
阅读(25)
评论(0)
推荐(0)
摘要:
原题链接 题解 when you are asked to find the “k-th whatever-est something,” binary search is often adopted as the first step of the solution 以 \(d_k\) 为半径的线 阅读全文
posted @ 2024-07-28 12:03
纯粹的
阅读(43)
评论(0)
推荐(0)
摘要:
原题链接 题解 把美丽看成 1+有多少相邻的不同的连接块 这样就能贡献来做了 code #include<bits/stdc++.h> #define ll long long using namespace std; ll a[100005]; void solve() { ll n,q; cin 阅读全文
posted @ 2024-07-28 10:40
纯粹的
阅读(23)
评论(0)
推荐(0)

浙公网安备 33010602011771号