会员
商店
众包
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
menu
menu
little_pinkpig
博客园
首页
归档
搜索
新随笔
联系
订阅
随笔 - 17
文章 - 4
评论 - 5
阅读 -
1139
随笔分类 -
「Codeforces」做题记录
「CF715E」Complete the Permutations
摘要:
「
CF715E
」
Complete the Permutations
「CF715E」Complete the Permutations
Link
Link
Describe
Describe
给定长为
n
n
的且部分确定的置换
p
,
q
p
,
q
。定义
p
,
q
p
,
q
距离为通过交换
p
p
任意两项变为
q
q
的最
阅读全文
posted @
2023-10-28 23:10
little_pinkpig
阅读(11)
评论(0)
推荐(0)
编辑
「CF1491H」Yuezheng Ling and Dynamic Tree
摘要:
「
CF1491H
」
Yuezheng Ling and Dynamic Tree
「CF1491H」Yuezheng Ling and Dynamic Tree
Solution
Solution
根据弹飞绵羊的思路,考虑分块维护一个
top
(
u
)
top
(
u
)
表示
u
u
第一个不在当前块的祖先,设块长为
O
(
B
)
O
(
B
)
,考虑如何求 \
阅读全文
posted @
2023-10-07 18:12
little_pinkpig
阅读(81)
评论(0)
推荐(0)
编辑
「CF848D」Shake It!
摘要:
「
CF848D
」
Shake It!
「CF848D」Shake It!
Solution
Solution
我们可以发现题目中的图可以拆分为若干个递归的子结构,可以对这些子结构考虑
DP
DP
,设
f
(
i
,
j
)
f
(
i
,
j
)
表示考虑对一个子结构
(
s
,
t
)
(
s
,
t
)
加入
i
i
个点后形成的图
阅读全文
posted @
2023-10-06 20:27
little_pinkpig
阅读(55)
评论(0)
推荐(1)
编辑
「CF1713F」Lost Array
摘要:
「
CF1713F
」
Lost
Array
「CF1713F」Lost Array
Link
Link
Solution
Solution
考虑将前缀贡献转换为路径计数,为方便,将列编号从右向左依次编号为
0
∼
n
0
∼
n
。考虑
(
0
,
i
)
(
0
,
i
)
到
(
j
,
0
)
(
j
,
0
)
的贡献次数其实是
阅读全文
posted @
2023-09-20 19:44
little_pinkpig
阅读(98)
评论(0)
推荐(1)
编辑
「CF1710D」Recover the Tree
摘要:
「
CF1710D
」
Recover
the
Tree
「CF1710D」Recover the Tree
Solution
Solution
考虑好区间
I
1
,
I
2
(
I
1
∩
I
2
≠
∅
)
I
1
,
I
2
(
I
1
∩
I
2
≠
∅
)
,
I
1
∩
I
2
I
1
∩
I
2
和
I
1
∪
I
2
I
1
∪
I
2
都是好区间。于是我们考虑从长度小开始构建。 初
阅读全文
posted @
2022-10-15 12:41
little_pinkpig
阅读(123)
评论(0)
推荐(1)
编辑
Codeforces Round #815 (Div. 2)
摘要:
Codeforces
Round
#815
(Div.2)
Codeforces Round #815 (Div.2)
「
CF1720A
」
Burenka
Plays
with
Fractions
「CF1720A」 Burenka Plays with Fractions
Codeforces 链接
Solution
Solution
每次可以对分子分母同时乘上
k
k
,相当于对分数乘
阅读全文
posted @
2022-08-19 22:07
little_pinkpig
阅读(57)
评论(1)
推荐(0)
编辑
「CF1661E」 Narrow Components
摘要:
「
CF1661E
」
Narrow
Components
「CF1661E」 Narrow Components
Describe
Describe
给你一个
3
3
行
n
n
列的
01
01
矩阵
a
a
,其中
0
0
表示黑色格子,
1
1
表示白色格子。 再给出
q
q
次讯问,每次询问给出两个整数
l
,
r
l
,
r
让你回答区间
阅读全文
posted @
2022-08-18 01:14
little_pinkpig
阅读(28)
评论(0)
推荐(1)
编辑
「CF1174E」 Ehab and the Expected GCD Problem
摘要:
「
CF1174E
」
Ehab
and
the
Expected
GCD
Problem
「CF1174E」 Ehab and the Expected GCD Problem
Describe
Describe
给定一个有
n
n
个数的排列
p
p
,定义
g_i=\gcd_{j=1}^i\left{p_i\right}
g_i=\gcd_{j=1}^i\left{p_i\right}
则
f
(
p
)
f
(
p
)
为 $g_1
阅读全文
posted @
2022-04-09 13:52
little_pinkpig
阅读(24)
评论(0)
推荐(0)
编辑
公告
昵称:
little_pinkpig
园龄:
3年2个月
粉丝:
6
关注:
6
+加关注
<
2025年3月
>
日
一
二
三
四
五
六
23
24
25
26
27
28
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
1
2
3
4
5
搜索
常用链接
我的随笔
我的评论
我的参与
最新评论
我的标签
最新随笔
1.Significant Suffixes
2.Solution Set 2
3.THUWC2024 游记
4.Solution Set 1
5.「模拟赛」Solution Set
6.「GLR-R3」惊蛰
7.「CF715E」Complete the Permutations
8.「CF1491H」Yuezheng Ling and Dynamic Tree
9.「CF848D」Shake It!
10.「CF1713F」Lost Array
我的标签
组合数学
(13)
题解
(10)
数论
(10)
多项式
(9)
DS
(7)
微积分
(7)
数学
(7)
DP
(6)
树上问题
(5)
线性代数
(3)
更多
积分与排名
积分 - 1558
排名 - 274971
随笔分类
「Codeforces」做题记录(8)
「模拟赛」做题记录(1)
DP(7)
DS(7)
多项式(5)
概率(2)
数论(1)
思维&构造(3)
图论(3)
线性代数(1)
组合数学(7)
随笔档案
2024年10月(1)
2024年9月(1)
2024年1月(1)
2023年11月(3)
2023年10月(3)
2023年9月(2)
2022年10月(2)
2022年9月(1)
2022年8月(2)
2022年4月(1)
文章分类
代数(2)
多项式(2)
数论(2)
线性代数(2)
文章档案
2022年8月(2)
阅读排行榜
1. THUWC2024 游记(149)
2. 「CF1710D」Recover the Tree(123)
3. 「CF1713F」Lost Array(98)
4. 分拆数(91)
5. 「CF1491H」Yuezheng Ling and Dynamic Tree(81)
推荐排行榜
1. Significant Suffixes(1)
2. THUWC2024 游记(1)
3. 「CF848D」Shake It!(1)
4. 「CF1713F」Lost Array(1)
5. 分拆数(1)
最新评论
1. Re:Solution Set
学文化课还卷十八!
--TulipeNoire
2. Re:「模拟赛」Solution Set
我想看「区间」!!!
--TulipeNoire
3. Re:多项式重工业「基础篇」
催更
--TulipeNoire
4. Re:Codeforces Round #815 (Div. 2)
杰哥厉害👍
--TulipeNoire
5. Re:分拆数
非常有用,我用这个结论过了学校练习的两道题!感谢!
--TulipeNoire
点击右上角即可分享
more_horiz
keyboard_arrow_up
light_mode
palette
选择主题
more_horiz
keyboard_arrow_up
light_mode
palette
选择主题