摘要: 2023 Hubei Provincial Collegiate Programming Contest A Prime Magic Walk Alone has a sequence $a_1,a_2,...,a_n$, and he can use a magic on it: Choose a 阅读全文
posted @ 2023-05-07 20:25 JU5T4FUN 阅读(541) 评论(0) 推荐(0)
摘要: rand 一些题目做一下,持续更新 平衡树 gym101261A Persistent Deque You need to process the following queries: B v x — Add x to the beginning of the deque with version 阅读全文
posted @ 2023-05-01 16:29 JU5T4FUN 阅读(58) 评论(0) 推荐(0)
摘要: A. EhAb AnD gCd 给定 $x$ 求解任意一个数对 $(a,b)$ 使得 $gcd(a,b)+lcm(a,b) = x$ $1\le a,b\le1e9,2\le x\le1e9$ 签到,$a,b$ 可以为 $1$ 所以直接输出 $1,x - 1$ 即可 void AC() { int 阅读全文
posted @ 2023-04-12 15:10 JU5T4FUN 阅读(34) 评论(0) 推荐(0)
摘要: 题目大意:给出 d 维空间的 n 个点,求曼哈顿距离最大的两个点的曼哈顿距离 暴力:$O(n^2)$,需要考虑优化 首先考虑二维 对于两个点$(x_1,y_1) , (x_2,y_2)$,它们的曼哈顿距离为$d=|x_1-x_2|+|y_1-y_2|$ 去掉绝对值,有四种情况,整理得 $d_1=x_ 阅读全文
posted @ 2022-07-13 16:05 JU5T4FUN 阅读(136) 评论(0) 推荐(0)
摘要: #include<iostream> using namespace std; int main() { cout << "hello world" << endl; return 0; } 第一篇博客! 阅读全文
posted @ 2022-07-12 18:51 JU5T4FUN 阅读(26) 评论(0) 推荐(0)