24.12.25
圣诞节快乐!接龙哈!发给你最好的 \(\blacksquare\) 个朋友,超过 \(\blacksquare\blacksquare\) 个就永远幸福,不许在你这里断了。
今天必须发完,不许偷懒,想起谁,发给谁,包括我,别小气,如果我不是你的朋友,你也可以不发。
传送 \(\blacksquare\) 人 万事如意;幸运一辈子!
传送 \(\blacksquare\) 人 万事如意;幸运一辈子!
传送 \(\blacksquare\) 人 万事如意;幸运一辈子!
传送 \(\blacksquare\blacksquare\) 人 万事如意;幸运一辈子!
传送 \(\blacksquare\blacksquare\) 人 万事如意;幸运一辈子!
传送 \(\blacksquare\blacksquare\) 人 万事如意;幸运一辈子!
传送 \(\blacksquare\blacksquare\blacksquare\) 人 万事如意;幸运 \(\blacksquare\) 辈子!
传送 \(\blacksquare\blacksquare\blacksquare\blacksquare\) 人 万事如意;幸运 \(\blacksquare\blacksquare\) 辈子!
传送 \(\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\) 人 万事如意;幸运 \(\blacksquare\blacksquare\blacksquare\blacksquare\) 辈子!
传送 \(\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\) 人 万事如意;幸运 \(\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\blacksquare\) 辈子!
圣诞节往模拟赛里放两道 CF *3500 计算几何是吧。
你做的好啊。
A
给定 \(2n\) 张卡牌,编号为 \(1\sim 2n\),卡牌的类型有 \(n\) 种,每种分别有 \(2\) 张。
维护一个初始为空的卡牌集合 \(S\),每次询问时,你可以向 \(S\) 中加入或删除任意一张卡牌,交互库会告诉你 \(S\) 中有多少种类型的卡牌。
你至多可以询问 \(10^6\) 次,要求给相同类型的卡牌配对。
结合 \(x_i \in [1, n], y_i \in [n + 1, 2n]\) 的特殊性质。先思考如果已经分成两堆了怎么解决。
设两堆为 \(L\) 和 \(R\),两堆之间配对。
那么可以先把 \(L\) 里面一些放入 \(S\),然后把 \(R\) 里的所有放入 \(S\),如果放入 \(R\) 中的某个元素时计数器不变,那么这个元素和 \(L\) 中放入 \(S\) 的某个元素配对。以此可以分治下去。
但是为了“放入”,无意义的取出太多了,实际上根据当前总的 \(L\) 和 \(R\) 是否放入 \(S\) 的状态一样来判断当计数器变化时分到哪个集合里。
实现中调整 先把 \(L\) 放入 \(S\) 的比例可以减小操作次数,取 \(1/3\) 可以通过。
B
emmm
考虑枚举一个点,二分找到覆盖这个点的最小的合法圆半径。
考虑如何 check:
如果给定了半径 \(R\) 和两点,那么能覆盖这两个点的圆心应该在这一个范围里:

现在我们要必须覆盖一个点,那么把这个点的圆拿出来,别的每个能与其放在同一圆里的(\(dis <= 2R \wedge |i - j| \le L\))都会有一个圆心范围,我们只要看能不能交出一个合法区域即可(指选出 \(k - 1\) 个在序列中下标距离 \(\le L\) 的点的范围交集不空)。
给长成这种样子图形求交多少有点抽象了,考虑最终圆心不妨就选在(以必选点为圆心的)圆上,那么相当于每个点会覆盖一段圆弧,询问是否有一点合法。
那么把圆弧转成对应的圆心角,以必选点为坐标原点建坐标系,每个范围转化成对应的方位角。
然后知道了每个区间就可以扫描线了。
但是求是否有一个长为 \(L\) 的区间和 \(\ge k - 1\) 似乎也是困难的,钦定每个下标 \(j\) 被选中向 \([j, j + L - 1]\) 做贡献,那么最后询问是否有单点 \(\ge k - 1\),维护区间修改全局最大值的线段树就好了。
对于有交的点由于距离一定 \(\le 2R\) 有一个 trick 是把平面划分成若干 \(2R \times 2R\) 的格子,这样只需要扫以点所在格子为中心的周围九个格子的点。
枚举的点在半径可能减小的情况下再去二分,更新 \(R\) 值后重新分格子。
题解神秘的证明了复杂度,不是很会证,摆了。
C
释怀的死了。

18/0/0 战绩可查
晚上被 PC 掳走刷 LCT 了。
好久没写 LCT 了,一道题写了我两个小时,还是菜了/kk
但是第二道只用了一个小时,不是很懂几乎双倍经验为什么还要重打一遍/kk

浙公网安备 33010602011771号