上一页 1 ··· 29 30 31 32 33 34 35 36 37 ··· 63 下一页
摘要: 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 阅读(105) 评论(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 阅读(77) 评论(0) 推荐(0)
摘要: 最大数量 一个无向图有 $n$ 个点,编号 $1 \sim n$。 这些点之间没有任何边。 给定 $d$ 个需求,编号 $1 \sim d$。 其中,第 $i$ 个需求是让点 $x_i$ 和点 $y_i$ 连通。 需求可能存在重复。 在本题中,你需要依次解决 $d$ 个问题,编号 $1 \sim d 阅读全文
posted @ 2023-03-01 10:46 onlyblues 阅读(26) 评论(0) 推荐(0)
摘要: 裁剪序列 给定一个长度为 $N$ 的序列 $A$,要求把该序列分成若干段,在满足“每段中所有数的和”不超过 $M$ 的前提下,让“每段中所有数的最大值”之和最小。 试计算这个最小值。 输入格式 第一行包含两个整数 $N$ 和 $M$。 第二行包含 $N$ 个整数,表示完整的序列 $A$。 输出格式 阅读全文
posted @ 2023-02-24 19:49 onlyblues 阅读(172) 评论(0) 推荐(2)
摘要: Devu和鲜花 Devu 有 $N$ 个盒子,第 $i$ 个盒子中有 $A_i$ 枝花。 同一个盒子内的花颜色相同,不同盒子内的花颜色不同。 Devu 要从这些盒子中选出 $M$ 枝花组成一束,求共有多少种方案。 若两束花每种颜色的花的数量都相同,则认为这两束花是相同的方案。 结果需对 $10^9+ 阅读全文
posted @ 2023-02-22 15:33 onlyblues 阅读(57) 评论(0) 推荐(0)
摘要: 构造新矩阵 给定一个 $m$ 行 $n$ 列的整数矩阵,行编号 $1 \sim m$,列编号 $1 \sim n$。 其中,第 $i$ 行第 $j$ 列的元素为 $p_{ij}$。 你可以任意抽取其中不超过 $n−1$ 行元素,这些元素之间保持同一行列关系不变,构成一个新矩阵。 构成新矩阵后,我们可 阅读全文
posted @ 2023-02-20 17:14 onlyblues 阅读(156) 评论(0) 推荐(0)
摘要: The Number of Good Subsets You are given an integer array nums . We call a subset of nums good if its product can be represented as a product of one o 阅读全文
posted @ 2023-02-19 19:41 onlyblues 阅读(171) 评论(0) 推荐(0)
摘要: Count the Number of Square-Free Subsets You are given a positive integer 0-indexed array nums . A subset of the array nums is square-free if the produ 阅读全文
posted @ 2023-02-19 18:53 onlyblues 阅读(241) 评论(0) 推荐(0)
摘要: Handling Sum Queries After Update You are given two 0-indexed arrays nums1 and nums2 and a 2D array queries of queries. There are three types of queri 阅读全文
posted @ 2023-02-19 10:16 onlyblues 阅读(30) 评论(0) 推荐(0)
摘要: D. Triangle Coloring You are given an undirected graph consisting of $n$ vertices and $n$ edges, where $n$ is divisible by $6$. Each edge has a weight 阅读全文
posted @ 2023-02-18 16:19 onlyblues 阅读(112) 评论(0) 推荐(0)
上一页 1 ··· 29 30 31 32 33 34 35 36 37 ··· 63 下一页
Web Analytics