上一页 1 ··· 20 21 22 23 24 25 26 27 28 ··· 53 下一页
摘要: 构造新矩阵 给定一个 $m$ 行 $n$ 列的整数矩阵,行编号 $1 \sim m$,列编号 $1 \sim n$。 其中,第 $i$ 行第 $j$ 列的元素为 $p_{ij}$。 你可以任意抽取其中不超过 $n−1$ 行元素,这些元素之间保持同一行列关系不变,构成一个新矩阵。 构成新矩阵后,我们可 阅读全文
posted @ 2023-02-20 17:14 onlyblues 阅读(69) 评论(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 阅读(27) 评论(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 阅读(45) 评论(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 阅读(14) 评论(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 阅读(31) 评论(0) 推荐(0) 编辑
摘要: 约数之和 假设现在有两个自然数 $A$ 和 $B$,$S$ 是 $A^B$ 的所有约数之和。 请你求出 $S \bmod 9901$ 的值是多少。 输入格式 在一行中输入用空格隔开的两个整数 $A$ 和 $B$。 输出格式 输出一个整数,代表 $S \bmod 9901$ 的值。 数据范围 $0 \ 阅读全文
posted @ 2023-02-18 11:50 onlyblues 阅读(23) 评论(0) 推荐(0) 编辑
摘要: 台阶-Nim游戏 现在,有一个 $n$ 级台阶的楼梯,每级台阶上都有若干个石子,其中第 $i$ 级台阶上有 $a_i$ 个石子$(i \geq 1)$。 两位玩家轮流操作,每次操作可以从任意一级台阶上拿若干个石子放到下一级台阶中(不能不拿)。 已经拿到地面上的石子不能再拿,最后无法进行操作的人视为失 阅读全文
posted @ 2023-02-16 19:01 onlyblues 阅读(40) 评论(0) 推荐(0) 编辑
摘要: Nim游戏 给定 $n$ 堆石子,两位玩家轮流操作,每次操作可以从任意一堆石子中拿走任意数量的石子(可以拿完,但不能不拿),最后无法进行操作的人视为失败。 问如果两人都采用最优策略,先手是否必胜。 输入格式 第一行包含整数 $n$。 第二行包含 $n$ 个数字,其中第 $i$ 个数字表示第 $i$ 阅读全文
posted @ 2023-02-15 23:35 onlyblues 阅读(31) 评论(0) 推荐(0) 编辑
摘要: 能被整除的数 给定一个整数 $n$ 和 $m$ 个不同的质数 $p_1,p_2, \ldots ,p_m$。 请你求出 $1 \sim n$ 中能被 $p_1,p_2, \ldots ,p_m$ 中的至少一个数整除的整数有多少个。 输入格式 第一行包含整数 $n$ 和 $m$。 第二行包含 $m$ 阅读全文
posted @ 2023-02-14 20:29 onlyblues 阅读(44) 评论(0) 推荐(0) 编辑
摘要: D. Moscow Gorillas In winter, the inhabitants of the Moscow Zoo are very bored, in particular, it concerns gorillas. You decided to entertain them and 阅读全文
posted @ 2023-02-13 17:52 onlyblues 阅读(139) 评论(0) 推荐(0) 编辑
上一页 1 ··· 20 21 22 23 24 25 26 27 28 ··· 53 下一页
Web Analytics