摘要: E. Wooden Game You are given a forest of $k$ rooted trees$^{\text{∗}}$. Lumberjack Timofey wants to cut down the entire forest by applying the followi 阅读全文
posted @ 2024-07-20 17:59 onlyblues 阅读(0) 评论(0) 推荐(0) 编辑
摘要: parent 树上启发式合并 题目描述 $LH$ 拿到了一个字符串 $S$,他想要和你玩个游戏,每次 $LH$ 询问你一个字符串 $T$,和一个整数 $k$,你需要回答,字符串 $T$ 在 $S$ 中从左到右出现第 $k$ 次的位置在哪。 假如 $S[l \sim r]=T$,那么字符串 $T$ 在 阅读全文
posted @ 2024-07-18 16:11 onlyblues 阅读(1) 评论(0) 推荐(0) 编辑
摘要: D. The Omnipotent Monster Killer You, the monster killer, want to kill a group of monsters. The monsters are on a tree with $n$ vertices. On vertex wi 阅读全文
posted @ 2024-07-16 21:11 onlyblues 阅读(10) 评论(0) 推荐(0) 编辑
摘要: G2. Permutation Problem (Hard Version) This is the hard version of the problem. The only difference is that in this version $n \leq 5 \cdot 10^5$ and 阅读全文
posted @ 2024-06-26 20:50 onlyblues 阅读(27) 评论(0) 推荐(0) 编辑
摘要: G - AtCoder Tour Problem Statement AtCoder Land is represented by a grid with $H$ rows and $W$ columns. Let $(i, j)$ denote the cell at the $i$-th row 阅读全文
posted @ 2024-06-18 21:53 onlyblues 阅读(3) 评论(0) 推荐(0) 编辑
摘要: C2. Magnitude (Hard Version) The two versions of the problem are different. You may want to read both versions. You can make hacks only if both versio 阅读全文
posted @ 2024-06-13 19:29 onlyblues 阅读(16) 评论(0) 推荐(0) 编辑
摘要: F - Two Sequence Queries Problem Statement You are given sequences of length $N$, $A=(A_1,A_2,\ldots,A_N)$ and $B=(B_1,B_2,\ldots,B_N)$.You are also g 阅读全文
posted @ 2024-06-09 18:05 onlyblues 阅读(34) 评论(0) 推荐(1) 编辑
摘要: G. Yasya and the Mysterious Tree Yasya was walking in the forest and accidentally found a tree with $n$ vertices. A tree is a connected undirected gra 阅读全文
posted @ 2024-06-05 19:46 onlyblues 阅读(11) 评论(0) 推荐(0) 编辑
摘要: D. Invertible Bracket Sequences A regular bracket sequence is a bracket sequence that can be transformed into a correct arithmetic expression by inser 阅读全文
posted @ 2024-05-31 15:43 onlyblues 阅读(100) 评论(0) 推荐(0) 编辑
摘要: D. XORificator You are given a binary (consisting only of 0s and 1s) $n \times m$ matrix. You are also given a XORificator, using which you can invert 阅读全文
posted @ 2024-05-30 21:25 onlyblues 阅读(35) 评论(0) 推荐(0) 编辑
Web Analytics