Gardener

CF1593E-Gardener-and-Tree-题解

title: CF1593E Gardener and Tree 题解 date: 2022-05-27 21:30:48 categories: - 题解 原题面 题意: 给出一个 \(n\) 个点的树,删除 \(k\) 次叶子节点,求剩下的节点数。 思路: 设 \(cnt_i\) 为 \(k\) ......

Codeforces Round 843 (Div. 2) A2. Gardener and the Capybaras (hard version)

有三个字符串 $s_1, s_2, s_3$ ,每个字符串只有 $a, b$ 组成。三个字符串顺序连接在了一起。满足以下条件之一: * $s1 \leq s_2, s_3\leq s_2$ * $s1 \geq s_2, s_3\geq s_2$ 以上为字典序比较。 给出连接的三个字符串,输出一组可 ......
Codeforces Capybaras Gardener version Round

CF1220F Gardener Alex 题解--zhengjun

发现根节点一定是 $1$,所以考虑两边的子树深度,然后发现只需要考虑一段后缀或前缀的深度即可。 所以循环位移后,可以从中间往两边构建笛卡尔树,实时维护深度即可。 ### 代码 ```cpp #include using namespace std; using ll=long long; const ......
题解 Gardener zhengjun 1220F 1220
共3篇  :1/1页 首页上一页1下一页尾页