上一页 1 ··· 30 31 32 33 34 35 36 37 38 ··· 64 下一页
摘要: D. Buying gifts Little Sasha has two friends, whom he wants to please with gifts on the Eighth of March. To do this, he went to the largest shopping c 阅读全文
posted @ 2023-03-09 23:43 onlyblues 阅读(353) 评论(2) 推荐(0)
摘要: 城市通电 平面上遍布着 $n$ 座城市,编号 $1 \sim n$。 第 $i$ 座城市的位置坐标为 $(x_i,y_i)$。 不同城市的位置有可能重合。 现在要通过建立发电站和搭建电线的方式给每座城市都通电。 一个城市如果建有发电站,或者通过电线直接或间接的与建有发电站的城市保持连通,则该城市通电 阅读全文
posted @ 2023-03-09 14:36 onlyblues 阅读(64) 评论(0) 推荐(0)
摘要: 构造有向无环图 给定一个由 $n$ 个点和 $m$ 条边构成的图。 不保证给定的图是连通的。 图中的一部分边的方向已经确定,你不能改变它们的方向。 剩下的边还未确定方向,你需要为每一条还未确定方向的边指定方向。 你需要保证在确定所有边的方向后,生成的图是一个有向无环图(即所有边都是有向的且没有有向环 阅读全文
posted @ 2023-03-08 20:01 onlyblues 阅读(437) 评论(0) 推荐(0)
摘要: 作物杂交 作物杂交是作物栽培中重要的一步。 已知有 $N$ 种作物 (编号 $1$ 至 $N$),第 $i$ 种作物从播种到成熟的时间为 $T_i$。 作物之间两两可以进行杂交,杂交时间取两种中时间较长的一方。 如作物 $A$ 种植时间为 $5$ 天,作物 $B$ 种植时间为 $7$ 天,则 $AB 阅读全文
posted @ 2023-03-08 12:02 onlyblues 阅读(225) 评论(0) 推荐(0)
摘要: 异或值 给定一个长度为 $n$ 的整数序列 $a_1,a_2, \ldots, a_n$。 请你找到一个非负整数 $X$,使得 $\max\limits_{1 \leq i \leq n} \{ a_i \oplus X \}$ 的值尽可能小,其中 $\oplus$ 表示按位异或。 输出 $\max 阅读全文
posted @ 2023-03-05 20:44 onlyblues 阅读(202) 评论(0) 推荐(0)
摘要: F. Dasha and Nightmares Dasha, an excellent student, is studying at the best mathematical lyceum in the country. Recently, a mysterious stranger broug 阅读全文
posted @ 2023-03-04 16:43 onlyblues 阅读(122) 评论(0) 推荐(0)
摘要: D. Remove Two Letters Dmitry has a string $s$, consisting of lowercase Latin letters. Dmitry decided to remove two consecutive characters from the str 阅读全文
posted @ 2023-03-04 14:36 onlyblues 阅读(187) 评论(0) 推荐(0)
摘要: 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 阅读全文
posted @ 2023-03-04 10:14 onlyblues 阅读(168) 评论(0) 推荐(0)
摘要: 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$ 阅读全文
posted @ 2023-03-03 21:53 onlyblues 阅读(113) 评论(0) 推荐(0)
摘要: 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 阅读全文
posted @ 2023-03-01 21:05 onlyblues 阅读(82) 评论(0) 推荐(0)
上一页 1 ··· 30 31 32 33 34 35 36 37 38 ··· 64 下一页
Web Analytics