会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Gariton
Welcome to Gariton!
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
3
4
5
6
7
8
9
10
11
···
18
下一页
2021年5月1日
[CF995F] Cowmpany Cowmpensation
摘要: \(\text{Problem}:\)Cowmpany Cowmpensation \(\text{Solution}:\) 不难发现,虽然权值种类很多,但在一种分配方案中,不同的权值个数只有 \(O(n)\) 个。故设 \(f_{i}\) 表示分配了 \(i\) 种权值的方案数,答案为: \[ \
阅读全文
posted @ 2021-05-01 08:53 zkdxl
阅读(181)
评论(1)
推荐(0)
2021年4月30日
[CF702F] T-Shirts
摘要: \(\text{Problem}:\)T-Shirts \(\text{Solution}:\) 在序列操作的问题中,一种常规的思想是使得被操作物品的信息尽可能少。故转化题目为:将物品以 \(q_{i}\) 从大到小为第一关键字,\(c_{i}\) 从小到大为第二关键字排序。枚举物品 \(i\),对
阅读全文
posted @ 2021-04-30 21:58 zkdxl
阅读(57)
评论(0)
推荐(0)
[CF809D] Hitchhiking in the Baltic States
摘要: \(\text{Problem}:\)Hitchhiking in the Baltic States \(\text{Solution}:\) 设 \(f_{i}\) 表示长度为 \(i\) 的严格上升子序列中第 \(i\) 个数的最小值,有转移: \(f_{j-1}< l_{i}\),\(f_{
阅读全文
posted @ 2021-04-30 19:32 zkdxl
阅读(62)
评论(0)
推荐(0)
[CF809E] Surprise me!
摘要: \(\text{Problem}:\)Surprise me! \(\text{Solution}:\) 发现 \(\varphi\) 内有两数相乘,将其展开,有: \[ \sum\limits_{i=1}^{n}\sum\limits_{j=1}^{n}\frac{\varphi(a_{i})\v
阅读全文
posted @ 2021-04-30 16:07 zkdxl
阅读(56)
评论(2)
推荐(0)
2021年4月29日
[CF662C] Binary Table
摘要: \(\text{Problem}:\)Binary Table \(\text{Solution}:\) 考虑枚举翻转的行的集合 \(S\)。设 \(cnt_{i}\) 表示数 \(i\) 和 \((2^{n}-1)\oplus i\) 对应二进制位中 \(1\) 的个数的较小值,\(f_{i}\)
阅读全文
posted @ 2021-04-29 20:08 zkdxl
阅读(48)
评论(2)
推荐(0)
[HAOI2015] 按位或
摘要: \(\text{Problem}:\)[HAOI2015]按位或 \(\text{Solution}:\) 设二进制上第 \(i\) 位变为 \(1\) 的期望时间为 \(t_{i}\),\(\max(S)\) 表示集合 \(S\) 中最大的 \(t_{i}\),\(\min(S)\) 表示集合 \
阅读全文
posted @ 2021-04-29 19:04 zkdxl
阅读(58)
评论(0)
推荐(0)
[CF1278F] Cards 加强版
摘要: \(\text{Problem}:\)CF1278F Cards 加强版 \(\text{Solution}:\) 设 \(p=\frac{1}{m}\),要求的是: \[ \sum\limits_{i=0}^{n}\binom{n}{i}p^{i}(1-p)^{n-i}i^{k} \] 将 \(i
阅读全文
posted @ 2021-04-29 12:05 zkdxl
阅读(44)
评论(0)
推荐(0)
2021年4月28日
[ZJOI2015] 幻想乡战略游戏
摘要: \(\text{Problem}:\)[ZJOI2015] 幻想乡战略游戏 \(\text{Solution}:\) 设当前补给站 \(u\) 为根,\(siz_{u}\) 表示 \(u\) 子树内点权之和。考虑从 \(u\rightarrow v\in son_{u}\),花费的增量为 \(val
阅读全文
posted @ 2021-04-28 16:38 zkdxl
阅读(79)
评论(1)
推荐(0)
[CF515E] Drazil and Park
摘要: \(\text{Problem}:\)Drazil and Park \(\text{Solution}:\) 先破环为链,根据给出的限制 \(a,b\) 确定查询区间 \([l,r]\)。 考虑处理出 \(d\) 的前缀和,则现在两个点的答案为 \(d_{y}-d_{x}+2(h_{x}+h_{y
阅读全文
posted @ 2021-04-28 10:16 zkdxl
阅读(54)
评论(0)
推荐(0)
[CF107D] Crime Management
摘要: \(\text{Problem}:\)Crime Management \(\text{Solution}:\) 设 \(m_{i}\) 表示第 \(i\) 个字符限制的乘积。设 \(f_{i,a,b,...,z}\) 表示枚举到字符串第 \(i\) 位,每个字符 \(i\) 出现次数模 \(m_{
阅读全文
posted @ 2021-04-28 09:10 zkdxl
阅读(66)
评论(1)
推荐(0)
上一页
1
···
3
4
5
6
7
8
9
10
11
···
18
下一页
公告