Processing math: 2%
摘要: Problem:Try Booking \text{Solution}: 首先不难发现对于所有 x,租借出公寓的总数是 O(n\ln n) 级别的。 对于某个固定的 x,按照以下方式求出答案:在 [1,n] 中找到编号最小的区间 \([l 阅读全文
posted @ 2021-10-27 08:44 zkdxl 阅读(81) 评论(1) 推荐(0)
摘要: \text{Problem}:Phys Ed Online \text{Solution}:b_{i}=\min\{a_{j}\},i-k\leq j\leq i,可以得到一个区间的 [l,r] 答案形式为 \(a_{l}+\sum\limits_{i=1}^{ 阅读全文
posted @ 2021-10-26 20:06 zkdxl 阅读(87) 评论(1) 推荐(0)
摘要: \text{Problem}:XOR and Distance \text{Solution}: 首先策略是,最高一位 a_{i}\oplus xa_{j}\oplus x 不同,使得这个最高位最低。然后尽量多的使后面位置 a_{i}\oplus x阅读全文
posted @ 2021-10-11 17:58 zkdxl 阅读(153) 评论(0) 推荐(0)
摘要: \text{Problem}:Common Divisor Graph \text{Solution}: 第一步就把我这种🤡吊打了。 首先考虑答案上界为 2,这是因为 2\mid \gcd(a_{s}(a_{s}+1),a_{t}(a_{t}+1))。确定上界后,可 阅读全文
posted @ 2021-10-11 17:39 zkdxl 阅读(58) 评论(1) 推荐(0)
摘要: 众所周知虽然这个 cjb 暑假没怎么学 whk,但是考试还是要参加一下的,结果就来一波疏通肠道了(反向致命节奏拉满) 一(数学):我就不懂了还有人连加减法都看错 \lambda x+\lambda x=0 是什么操作。 二(数学):你好,指数上面除法不是让你直接拆掉除的,谢谢。 三(数学): 阅读全文
posted @ 2021-09-05 15:23 zkdxl 阅读(131) 评论(0) 推荐(1)
摘要: \text{Problem}:Sonya and Bitwise OR \text{Solution}: 分析一下 OR 的性质。对于左端点 l 固定的区间,其前缀至多只会有 \lceil \log_{2}V\rceil 个不同的取值,且每种取值都是连续的。当右端点固 阅读全文
posted @ 2021-08-26 22:00 zkdxl 阅读(62) 评论(0) 推荐(0)
摘要: \text{Problem}:Help Shrek and Donkey \text{Solution}:f_{n,m} 表示先手剩 n 张牌,后手剩 m 张牌,先手的胜率。 首先显然的,当可以获得更多的信息时,一定不会选择直接猜测。故先手有两种决策: 阅读全文
posted @ 2021-08-26 18:02 zkdxl 阅读(48) 评论(0) 推荐(0)
摘要: \text{Problem}:Prince's Problem \text{Solution}: 套路的,把询问拆成若干条从 1\rightarrow u 的路径。 在 1\rightarrow u 的路径上,对于质数 p 与指数 k(\(k\geq 阅读全文
posted @ 2021-08-25 22:12 zkdxl 阅读(49) 评论(2) 推荐(0)
摘要: \text{Problem A}:Arithmetic Array \text{Solution}: 即让 \sum b_{i}=n。故当初始的 \sum b_{i}<n 时,答案为 1;否则为 \sum b_{i}-n。 \(\text{Code}: 阅读全文
posted @ 2021-08-24 17:43 zkdxl 阅读(79) 评论(0) 推荐(0)
摘要: \text{Problem A}:​Cherry \text{Solution}: 考虑取 a_{i}\times a_{i+1} 肯定最优。可以通过加入一个 a_{i-1} 来证明。 \text{Code}:Link \text{Problem B}:C 阅读全文
posted @ 2021-08-24 08:20 zkdxl 阅读(67) 评论(1) 推荐(0)
点击右上角即可分享
微信分享提示