CCF CSP-J/S 2026 游记

· · 生活·游记

CCF CSP-J/S 2026 游记

初赛

这还要写吗?

大概是 S 组最后放了个已经寄了的格雷码。表达了作者的乡思之情。

直接进入正题。

Day -5

停课。

停课的时间肯定是要全力冲刺竞赛,但是文化课是不能落下的。

你都停课了,还能不写作业?

请输入文本。

Day -4 to Day -1

模拟赛。

Day -2 的模拟赛爆了,死因是 all in 了 T2 的组合计数,最后没搞出来。希望正赛不要考组合计数。

Day 0

模板赛。手都打麻了,还有 4 个题没打。事实上好像没有用到任何一个模板?注意到 Floyd 和树的直径都不在模板赛里面。简直拉完了。

Day 1

来!

J

还能不 AK 吗?

9:26 AK,9:58 完成对拍。

进行了一些整活。

::::info[lieqi 内容]

# CCF CSP-J 2026 Solution

Also output something lieqi here. Let's see how MoCaRabbit becomes 3=. He is just speaking P-hua.

## T1 travel

Just a lieqi problem. Do it yourself.

## T2 string

~~This is the problem that I solve it with the longest code. How gay I am!~~

First, merge the segments which have the same character. Then, use two-pointers to scan the array, and try to match the segments with the same length. If the characters are not the same, it turns out that it needs to be changed.

## T3 and

A binary search answer template problem.

Noticed that if $x$ can be the answer, there are more than $m$ numbers in $a$ that satisfied `(y&x)==x`. Test from highbit to lowbit, if this bit filled with $1$ is OK, just fill it with $1$, or fill it with $0$.

## T4 card

Something intersting.

Noticed that the first card always survives, then it will break down the cards between it and the last card which has the same color with it. Then it becomes a subquestion.

Obviously, the answer of a subquestion is $m$ numbers and it takes lots of time to copy the answer. Then, we just add edges, turn it into a tree. The color of $i$ contributes to the answer just of the size of the subtree of node $i$ times. Make an DFS to calculate it, or just make an DP.

::::

这次终于找到 Emacs 的小游戏了,但是一点也不好玩,简直拉完了。

尝试睡觉。精神不好。

考完听说有人因为 T1 没有注意到 D 和 F 是相邻的而爆掉。lieqi。

S

怎么是【数据删除】特有的复盘表格式?

开题,定计划。

T1 简单题。T2 这个建图怎么都得 O(m) 吧,怎么建 O(n) 的图跑 Floyd?T3 神秘,T4 神秘。考虑前两(三?)题正解,剩下的拼部分分。

14:58 完成 T1 代码。

T2 怎么是最小步行时间?我直接让你绕着 7 号线坐到末班车收车。

这样建图就简单了。O(n^3+md^2)。15:11 完成。

怎么不到 1h 就切了两个题了?这把有搞。

尝试 T3 正解。大概尝试了 30 min 就放弃了,转去拼部分分。进行暴力、A 性质、B 性质,获得 56 pts。16:16 完成。

T4 就不想了,直接暴力,搞 15 pts 再说。

发现 A 性质好像有搞,进行简单的分讨,又搞了 10 pts。17:13 完成。

算算分:100+100+56+25=281。难以 WC。

但是还有时间 struggle 一点分。

发现 k=2 时选点一定在直径上,于是可以直接二分答案,直径上每个点的限制就是一段区间,于是跑个超速检测就可以了。又搞到 15 pts。注意到超速检测是在正赛中估分不为 100 pts 且我唯一改到 100 pts 的题目。

好了这下 296 应该能进 WC 了吧?

下来之后怎么一车人都会做 T3?吓飞了。

回家和 MoCaRabbit 线上 bark。他看上去很弘文。

Day 2

whking.

Day 3 to 5

在【数据删除】的压力下制定到 NOIP 的计划。

Day 6

搞到代码了。测测测民间数据。

J AK。

S 前面三个都符合预期。怎么 T4 挂了 10 pts?

希望 CCF 的数据放过我。

看分。

$S=100+100+56+30=286$。 氧化钙。怎么少了 10 pts? 死因是 T4 A 性质的公式推的还有一些问题,被卡掉了。 听说 T4 优秀的指数暴力可以多创一个点。哎我怎么总是学不会暴力优化让自己反向挂分啊。。。 有些 MoCaRabbit 考完之后一直大叫自己考爆了,出分之后分还比我高。我造密码的。 现在我要弘文了。 ## Day 8 听说 WC 线要涨啊,$286$ 能去 WC 吗?有点难搞啊。。。