摘要:
作物杂交 作物杂交是作物栽培中重要的一步。 已知有 $N$ 种作物 (编号 $1$ 至 $N$),第 $i$ 种作物从播种到成熟的时间为 $T_i$。 作物之间两两可以进行杂交,杂交时间取两种中时间较长的一方。 如作物 $A$ 种植时间为 $5$ 天,作物 $B$ 种植时间为 $7$ 天,则 $AB 阅读全文
摘要:
异或值 给定一个长度为 $n$ 的整数序列 $a_1,a_2, \ldots, a_n$。 请你找到一个非负整数 $X$,使得 $\max\limits_{1 \leq i \leq n} \{ a_i \oplus X \}$ 的值尽可能小,其中 $\oplus$ 表示按位异或。 输出 $\max 阅读全文
摘要:
F. Dasha and Nightmares Dasha, an excellent student, is studying at the best mathematical lyceum in the country. Recently, a mysterious stranger broug 阅读全文
摘要:
D. Remove Two Letters Dmitry has a string $s$, consisting of lowercase Latin letters. Dmitry decided to remove two consecutive characters from the str 阅读全文
摘要:
D. Maximum Subarray You are given an array $a_1, a_2, \dots, a_n$, consisting of $n$ integers. You are also given two integers $k$ and $x$. You have t 阅读全文
摘要:
C. Maximum Set A set of positive integers $S$ is called beautiful if, for every two integers $x$ and $y$ from this set, either $x$ divides $y$ or $y$ 阅读全文
摘要:
D. Serval and Shift-Shift-Shift Serval has two $n$-bit binary integer numbers $a$ and $b$. He wants to share those numbers with Toxel. Since Toxel lik 阅读全文
摘要:
最大数量 一个无向图有 $n$ 个点,编号 $1 \sim n$。 这些点之间没有任何边。 给定 $d$ 个需求,编号 $1 \sim d$。 其中,第 $i$ 个需求是让点 $x_i$ 和点 $y_i$ 连通。 需求可能存在重复。 在本题中,你需要依次解决 $d$ 个问题,编号 $1 \sim d 阅读全文
摘要:
裁剪序列 给定一个长度为 $N$ 的序列 $A$,要求把该序列分成若干段,在满足“每段中所有数的和”不超过 $M$ 的前提下,让“每段中所有数的最大值”之和最小。 试计算这个最小值。 输入格式 第一行包含两个整数 $N$ 和 $M$。 第二行包含 $N$ 个整数,表示完整的序列 $A$。 输出格式 阅读全文
摘要:
Devu和鲜花 Devu 有 $N$ 个盒子,第 $i$ 个盒子中有 $A_i$ 枝花。 同一个盒子内的花颜色相同,不同盒子内的花颜色不同。 Devu 要从这些盒子中选出 $M$ 枝花组成一束,求共有多少种方案。 若两束花每种颜色的花的数量都相同,则认为这两束花是相同的方案。 结果需对 $10^9+ 阅读全文